{
  "openapi": "3.2.0",
  "info": {
    "title": "API Challenges Simple Todo List",
    "description": "A Simple todo list",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://apichallenges.com",
      "description": "cloud hosted version"
    },
    {
      "url": "http://localhost:4567",
      "description": "local execution"
    }
  ],
  "paths": {
    "/api/todos": {
      "get": {
        "summary": "return all the instances of todo",
        "description": "return all the instances of todo",
        "parameters": [
          {
            "name": "_sortBy",
            "in": "query",
            "description": "Sort collection results by a field. Use +field or field for ascending order, and -field for descending order. Multiple fields can be combined with commas, e.g. +field,-other.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "+id"
          },
          {
            "name": "_limit",
            "in": "query",
            "description": "Limit collection results. Defaults to 10 and is capped at 20.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 20,
              "minimum": 0
            },
            "example": 10
          },
          {
            "name": "_offset",
            "in": "query",
            "description": "Zero-based number of collection results to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "All the todos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todos"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "array",
                  "description": "todos",
                  "items": {
                    "type": "object",
                    "description": "todo",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Field is an ID and should not be amended or set.",
                        "example": 30
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
                        "example": "A title"
                      },
                      "doneStatus": {
                        "type": "boolean",
                        "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
                        "example": false
                      },
                      "description": {
                        "type": "string",
                        "description": "Longer description of the todo. Maximum length allowed is 200.",
                        "example": "my description"
                      }
                    },
                    "required": [
                      "description",
                      "doneStatus",
                      "id",
                      "title"
                    ],
                    "title": "todo",
                    "xml": {
                      "name": "todo",
                      "wrapped": true
                    }
                  },
                  "title": "todos",
                  "xml": {
                    "name": "todos",
                    "wrapped": true
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "type": "array",
                  "description": "todos",
                  "items": {
                    "type": "object",
                    "description": "todo",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Field is an ID and should not be amended or set.",
                        "example": 30
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
                        "example": "A title"
                      },
                      "doneStatus": {
                        "type": "boolean",
                        "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
                        "example": false
                      },
                      "description": {
                        "type": "string",
                        "description": "Longer description of the todo. Maximum length allowed is 200.",
                        "example": "my description"
                      }
                    },
                    "required": [
                      "description",
                      "doneStatus",
                      "id",
                      "title"
                    ],
                    "title": "todo",
                    "xml": {
                      "name": "todo",
                      "wrapped": true
                    }
                  },
                  "title": "todos",
                  "xml": {
                    "name": "todos",
                    "wrapped": true
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "method not allowed",
        "description": "method not allowed",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK, Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Standard Status Code Meaning"
          },
          "409": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "post": {
        "summary": "we should be able to create todo without a ID using the field values in the body of the message. A maximum of 20 todos is allowed.",
        "description": "we should be able to create todo without a ID using the field values in the body of the message. A maximum of 20 todos is allowed.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/create_todo"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/create_todo"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/create_todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created a todo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "400": {
            "description": "Error when creating a todo"
          },
          "422": {
            "description": "Validation error when creating a todo"
          },
          "409": {
            "description": "Conflict when creating a todo"
          }
        }
      },
      "options": {
        "summary": "show all Options for endpoint of /api/todos",
        "description": "show all Options for endpoint of /api/todos",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "the endpoint verb options"
          }
        }
      },
      "head": {
        "summary": "headers for all the instances of todo",
        "description": "headers for all the instances of todo",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "query": {
        "summary": "query all the instances of todo using application/x-www-form-urlencoded, application/jsonpath, application/vnd.thingifier.query+json query content",
        "description": "query all the instances of todo using application/x-www-form-urlencoded, application/jsonpath, application/vnd.thingifier.query+json query content",
        "parameters": [
          {
            "name": "_sortBy",
            "in": "query",
            "description": "Sort collection results by a field. Use +field or field for ascending order, and -field for descending order. Multiple fields can be combined with commas, e.g. +field,-other.",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "+id"
          },
          {
            "name": "_limit",
            "in": "query",
            "description": "Limit collection results. Defaults to 10 and is capped at 20.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 20,
              "minimum": 0
            },
            "example": 10
          },
          {
            "name": "_offset",
            "in": "query",
            "description": "Zero-based number of collection results to skip.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 0
          },
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "All the matching todos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todos"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "array",
                  "description": "todos",
                  "items": {
                    "type": "object",
                    "description": "todo",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Field is an ID and should not be amended or set.",
                        "example": 84
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
                        "example": "A title"
                      },
                      "doneStatus": {
                        "type": "boolean",
                        "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
                        "example": false
                      },
                      "description": {
                        "type": "string",
                        "description": "Longer description of the todo. Maximum length allowed is 200.",
                        "example": "my description"
                      }
                    },
                    "required": [
                      "description",
                      "doneStatus",
                      "id",
                      "title"
                    ],
                    "title": "todo",
                    "xml": {
                      "name": "todo",
                      "wrapped": true
                    }
                  },
                  "title": "todos",
                  "xml": {
                    "name": "todos",
                    "wrapped": true
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "type": "array",
                  "description": "todos",
                  "items": {
                    "type": "object",
                    "description": "todo",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Field is an ID and should not be amended or set.",
                        "example": 84
                      },
                      "title": {
                        "type": "string",
                        "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
                        "example": "A title"
                      },
                      "doneStatus": {
                        "type": "boolean",
                        "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
                        "example": false
                      },
                      "description": {
                        "type": "string",
                        "description": "Longer description of the todo. Maximum length allowed is 200.",
                        "example": "my description"
                      }
                    },
                    "required": [
                      "description",
                      "doneStatus",
                      "id",
                      "title"
                    ],
                    "title": "todo",
                    "xml": {
                      "name": "todo",
                      "wrapped": true
                    }
                  },
                  "title": "todos",
                  "xml": {
                    "name": "todos",
                    "wrapped": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error processing request"
          },
          "413": {
            "description": "Standard Status Code Meaning"
          },
          "415": {
            "description": "Standard Status Code Meaning"
          },
          "422": {
            "description": "Standard Status Code Meaning"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "application/jsonpath": {
              "schema": {
                "type": "string"
              }
            },
            "application/vnd.thingifier.query+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter": {
                    "type": "object"
                  },
                  "sort": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "offset": {
                    "type": "integer",
                    "minimum": 0
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/todos/{id}": {
      "get": {
        "summary": "return a specific instances of todo using a id",
        "description": "return a specific instances of todo using a id",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "A specific todo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "404": {
            "description": "Could not find a specific todo"
          }
        }
      },
      "put": {
        "summary": "amend a specific instances of todo using a id with a body containing the fields to amend",
        "description": "amend a specific instances of todo using a id with a body containing the fields to amend",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK, Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Standard Status Code Meaning"
          },
          "409": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "post": {
        "summary": "amend a specific instances of todo using a id with a body containing the fields to amend",
        "description": "amend a specific instances of todo using a id with a body containing the fields to amend",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Amended the specific todo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "404": {
            "description": "Could not find a specific todo"
          },
          "422": {
            "description": "Validation error when amending a todo"
          },
          "409": {
            "description": "Conflict when amending a todo"
          }
        }
      },
      "delete": {
        "summary": "delete a specific instances of todo using a id",
        "description": "delete a specific instances of todo using a id",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted a specific todo"
          },
          "404": {
            "description": "Could not find a specific todo"
          }
        }
      },
      "options": {
        "summary": "show all Options for endpoint of /api/todos/:id",
        "description": "show all Options for endpoint of /api/todos/:id",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content",
            "headers": {
              "Accept-Patch": {
                "description": "application/json, application/merge-patch+json, application/json-patch+json",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "headers for a specific instances of todo using a id",
        "description": "headers for a specific instances of todo using a id",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "Headers for a specific todo"
          },
          "404": {
            "description": "Could not find a specific todo"
          }
        }
      },
      "patch": {
        "summary": "patch a specific instance of todo with a body containing the patch details",
        "description": "patch a specific instance of todo with a body containing the patch details",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/todo"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "application/jsonl": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json-seq": {
                "schema": {
                  "type": "string"
                }
              },
              "text/tab-separated-values": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/todo"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Standard Status Code Meaning"
          },
          "409": {
            "description": "Standard Status Code Meaning"
          },
          "400": {
            "description": "Error processing request"
          },
          "415": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          },
          "example": 93
        }
      ]
    },
    "/api/challenger/{guid}": {
      "get": {
        "summary": "Get a challenger in Json format to allow continued tracking of challenges.",
        "description": "Get a challenger in Json format to allow continued tracking of challenges.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "summary": "Restore a saved challenger matching the supplied X-CHALLENGER guid to allow continued tracking of challenges.",
        "description": "Restore a saved challenger matching the supplied X-CHALLENGER guid to allow continued tracking of challenges.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "OK, Created"
          },
          "400": {
            "description": "Error processing request"
          },
          "409": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "parameters": [
        {
          "name": "guid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "example": "f063726a-e4c2-439d-87fb-c2887bd5565b"
        }
      ]
    },
    "/api/challenger": {
      "post": {
        "summary": "Create a challenger using the X-CHALLENGER guid header.",
        "description": "Create a challenger using the X-CHALLENGER guid header.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Error processing request"
          },
          "405": {
            "description": "Method not allowed"
          }
        }
      }
    },
    "/api/challenger/database/{guid}": {
      "get": {
        "summary": "Get the todo data for the supplied X-CHALLENGER guid to allow later restoration of the todos.",
        "description": "Get the todo data for the supplied X-CHALLENGER guid to allow later restoration of the todos.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Error processing request"
          },
          "404": {
            "description": "Not Found"
          }
        }
      },
      "put": {
        "summary": "Restore a saved set of todos for a challenger matching the supplied X-CHALLENGER guid.",
        "description": "Restore a saved set of todos for a challenger matching the supplied X-CHALLENGER guid.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content"
          },
          "400": {
            "description": "Error processing request"
          }
        }
      },
      "parameters": [
        {
          "name": "guid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "example": "0555dfdc-0175-4824-a955-4ca87a692c92"
        }
      ]
    },
    "/api/challenges": {
      "get": {
        "summary": "Get list of challenges and their completion status",
        "description": "Get list of challenges and their completion status",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "431": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "options": {
        "summary": "Options for list of challenges endpoint",
        "description": "Options for list of challenges endpoint",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "head": {
        "summary": "Headers for list of challenges endpoint",
        "description": "Headers for list of challenges endpoint",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/heartbeat": {
      "get": {
        "summary": "Is the server running? YES 204",
        "description": "Is the server running? YES 204",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content"
          }
        }
      },
      "options": {
        "summary": "Options for heartbeat endpoint",
        "description": "Options for heartbeat endpoint",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content"
          }
        }
      },
      "head": {
        "summary": "Headers for heartbeat endpoint",
        "description": "Headers for heartbeat endpoint",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content"
          }
        }
      }
    },
    "/api/todos/export": {
      "get": {
        "summary": "Export todos using a format query parameter. Supported values are: json, xml, text-xml, csv, text, html, ndjson, jsonl, json-seq, tsv",
        "description": "Export todos using a format query parameter. Supported values are: json, xml, text-xml, csv, text, html, ndjson, jsonl, json-seq, tsv",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Content-Disposition": {
                "description": "attachment; filename=\"todos.{extension}\"",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Error processing request",
            "headers": {
              "Content-Disposition": {
                "description": "attachment; filename=\"todos.{extension}\"",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "431": {
            "description": "Standard Status Code Meaning",
            "headers": {
              "Content-Disposition": {
                "description": "attachment; filename=\"todos.{extension}\"",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "options": {
        "summary": "CORS preflight options for exporting todos",
        "description": "CORS preflight options for exporting todos",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "204": {
            "description": "OK, No Content",
            "headers": {
              "Allow": {
                "description": "GET, OPTIONS",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "format",
          "in": "path",
          "description": "Export format short name, e.g. csv, html, tsv, json, xml, text-xml, text, ndjson, jsonl, or json-seq",
          "required": true,
          "schema": {
            "type": "string"
          },
          "example": "scing elit, sed do e"
        }
      ]
    },
    "/api/secret/token": {
      "get": {
        "summary": "GET /api/secret/token with basic auth to get an X-AUTH-TOKEN header for read-only access to /api/secret/note.",
        "description": "GET /api/secret/token with basic auth to get an X-AUTH-TOKEN header for read-only access to /api/secret/note.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Standard Status Code Meaning"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/secret/token with basic auth to get a secret token to use as X-AUTH-TOKEN header, to allow access to the /api/secret/note end points.",
        "description": "POST /api/secret/token with basic auth to get a secret token to use as X-AUTH-TOKEN header, to allow access to the /api/secret/note end points.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "201": {
            "description": "OK, Created"
          },
          "401": {
            "description": "Standard Status Code Meaning"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    },
    "/api/secret/note": {
      "get": {
        "summary": "GET /api/secret/note with X-AUTH-TOKEN to return the secret note for the user.",
        "description": "GET /api/secret/note with X-AUTH-TOKEN to return the secret note for the user.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          },
          {
            "name": "X-AUTH-TOKEN",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Standard Status Code Meaning"
          },
          "403": {
            "description": "Standard Status Code Meaning"
          }
        }
      },
      "post": {
        "summary": "POST /api/secret/note with X-AUTH-TOKEN, and a payload of `{'note':'contents of note'}` to amend the contents of the secret note.",
        "description": "POST /api/secret/note with X-AUTH-TOKEN, and a payload of `{'note':'contents of note'}` to amend the contents of the secret note.",
        "parameters": [
          {
            "name": "X-CHALLENGER",
            "in": "header",
            "required": true,
            "schema": {}
          },
          {
            "name": "X-AUTH-TOKEN",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Error processing request"
          },
          "401": {
            "description": "Standard Status Code Meaning"
          },
          "403": {
            "description": "Standard Status Code Meaning"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "todo": {
        "type": "object",
        "description": "todo",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Field is an ID and should not be amended or set.",
            "example": 75
          },
          "title": {
            "type": "string",
            "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
            "example": "A title"
          },
          "doneStatus": {
            "type": "boolean",
            "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Longer description of the todo. Maximum length allowed is 200.",
            "example": "my description"
          }
        },
        "title": "todo",
        "xml": {
          "name": "todo",
          "wrapped": true
        }
      },
      "create_todo": {
        "type": "object",
        "description": "todo",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
            "example": "A title"
          },
          "doneStatus": {
            "type": "boolean",
            "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Longer description of the todo. Maximum length allowed is 200.",
            "example": "my description"
          }
        },
        "title": "create todo",
        "xml": {
          "name": "todo",
          "wrapped": true
        }
      },
      "todos": {
        "type": "object",
        "description": "todos",
        "properties": {
          "todos": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "todo",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Field is an ID and should not be amended or set.",
                  "example": 88
                },
                "title": {
                  "type": "string",
                  "description": "The title of the TODO Item. Value is mandatory. Value can not be empty. Maximum length allowed is 50.",
                  "example": "A title"
                },
                "doneStatus": {
                  "type": "boolean",
                  "description": "Status to track the todo completion. Value must be a Boolean (true, false) value.",
                  "example": false
                },
                "description": {
                  "type": "string",
                  "description": "Longer description of the todo. Maximum length allowed is 200.",
                  "example": "my description"
                }
              },
              "required": [
                "description",
                "doneStatus",
                "id",
                "title"
              ],
              "title": "todo",
              "xml": {
                "name": "todo",
                "wrapped": true
              }
            }
          }
        },
        "required": [
          "todos"
        ],
        "title": "todos"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}