{
  "swagger": "2.0",
  "info": {
    "description": "todolist API",
    "title": "todolist API",
    "contact": {
      "name": "API Support",
      "url": "http://localhost:5000",
      "email": "nexters@kakao.com"
    },
    "version": "21.0.0"
  },
  "host": "localhost:5000",
  "basePath": "/",
  "paths": {
    "/todos": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "todo get all",
        "produces": [
          "application/json"
        ],
        "tags": [
          "todo"
        ],
        "summary": "todo get all",
        "operationId": "todo-get-all",
        "parameters": [
          {
            "minimum": 1,
            "type": "integer",
            "default": 10,
            "example": 10,
            "name": "limit",
            "in": "query"
          },
          {
            "minimum": 1,
            "type": "integer",
            "default": 1,
            "example": 1,
            "name": "page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/todo.ManyItemResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "type": "object"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "todo post",
        "produces": [
          "application/json"
        ],
        "tags": [
          "todo"
        ],
        "summary": "todo post",
        "operationId": "todo-post",
        "parameters": [
          {
            "description": "body",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/todo.Body"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/todo.Item"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "type": "object"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    },
    "/todos/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "todo get",
        "produces": [
          "application/json"
        ],
        "tags": [
          "todo"
        ],
        "summary": "todo get",
        "operationId": "todo-get",
        "parameters": [
          {
            "type": "integer",
            "description": "id",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/todo.Item"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "type": "object"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "todo delete",
        "produces": [
          "application/json"
        ],
        "tags": [
          "todo"
        ],
        "summary": "todo delete",
        "operationId": "todo-delete",
        "parameters": [
          {
            "type": "integer",
            "description": "id",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "type": "object"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "type": "object"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "todo patch",
        "produces": [
          "application/json"
        ],
        "tags": [
          "todo"
        ],
        "summary": "todo patch",
        "operationId": "todo-patch",
        "parameters": [
          {
            "type": "integer",
            "description": "id",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "body",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/todo.Body"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "type": "object"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "type": "object"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "todo.Body": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        }
      }
    },
    "todo.Item": {
      "type": "object",
      "properties": {
        "checked": {
          "type": "boolean"
        },
        "created": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "updated": {
          "type": "string"
        }
      }
    },
    "todo.ManyItemResponse": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "example": 10
        },
        "page": {
          "type": "integer",
          "example": 1
        },
        "todos": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/todo.Item"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKeyAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  }
}