{
  "definitions": {
    "date": {
      "title": "date",
      "properties": {
        "date": { "type": "string", "format": "date" },
        "_id": { "type": "string", "description": "ObjectId" }
      }
    }
  },
  "paths": {
    "/test/date": {
      "get": {
        "tags": ["date"],
        "summary": "List multiple date resources.",
        "description": "This operation allows you to list and search for date resources provided query arguments.",
        "operationId": "getdates",
        "responses": {
          "200": {
            "description": "Resource(s) found.  Returned as array.",
            "schema": {
              "type": "array",
              "items": { "$ref": "#/definitions/date" }
            }
          },
          "401": { "description": "Unauthorized." }
        },
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "description": "How many records to skip when listing. Used for pagination.",
            "required": false,
            "type": "integer",
            "default": 0
          },
          {
            "name": "limit",
            "in": "query",
            "description": "How many records to limit the output.",
            "required": false,
            "type": "integer",
            "default": 10
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Which fields to sort the records on.",
            "type": "string",
            "required": false,
            "default": ""
          },
          {
            "name": "select",
            "in": "query",
            "description": "Select which fields will be returned by the query.",
            "type": "string",
            "required": false,
            "default": ""
          },
          {
            "name": "populate",
            "in": "query",
            "description": "Select which fields will be fully populated with the reference.",
            "type": "string",
            "required": false,
            "default": ""
          }
        ]
      },
      "post": {
        "tags": ["date"],
        "summary": "Create a new date",
        "description": "Create a new date",
        "operationId": "createdate",
        "responses": {
          "201": { "description": "The resource has been created." },
          "400": {
            "description": "An error has occured trying to create the resource."
          },
          "401": {
            "description": "Unauthorized.  Note that anonymous submissions are *enabled* by default."
          }
        },
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Data used to create a new date",
            "required": true,
            "schema": { "$ref": "#/definitions/date" }
          }
        ]
      }
    },
    "/test/date/{dateId}": {
      "get": {
        "tags": ["date"],
        "summary": "Return a specific date instance.",
        "description": "Return a specific date instance.",
        "operationId": "getdate",
        "responses": {
          "200": {
            "description": "Resource found",
            "schema": { "$ref": "#/definitions/date" }
          },
          "401": { "description": "Unauthorized." },
          "404": { "description": "Resource not found" },
          "500": { "description": "An error has occurred." }
        },
        "parameters": [
          {
            "name": "dateId",
            "in": "path",
            "description": "The ID of the date that will be retrieved.",
            "required": true,
            "type": "string"
          }
        ]
      },
      "put": {
        "tags": ["date"],
        "summary": "Update a specific date instance.",
        "description": "Update a specific date instance.",
        "operationId": "updatedate",
        "responses": {
          "200": {
            "description": "Resource updated",
            "schema": { "$ref": "#/definitions/date" }
          },
          "400": { "description": "Resource could not be updated." },
          "401": { "description": "Unauthorized." },
          "404": { "description": "Resource not found" },
          "500": { "description": "An error has occurred." }
        },
        "parameters": [
          {
            "name": "dateId",
            "in": "path",
            "description": "The ID of the date that will be updated.",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Data used to update date",
            "required": true,
            "schema": { "$ref": "#/definitions/date" }
          }
        ]
      },
      "delete": {
        "tags": ["date"],
        "summary": "Delete a specific date",
        "description": "Delete a specific date",
        "operationId": "deletedate",
        "responses": {
          "204": { "description": "Resource was deleted" },
          "400": { "description": "Resource could not be deleted." },
          "401": { "description": "Unauthorized." },
          "404": { "description": "Resource not found" },
          "500": { "description": "An error has occurred." }
        },
        "parameters": [
          {
            "name": "dateId",
            "in": "path",
            "description": "The ID of the date that will be deleted.",
            "required": true,
            "type": "string"
          }
        ]
      }
    }
  }
}
