{
  "swagger": "2.0",
  "info": {
    "title": "AutoRest Date Test Service",
    "description": "Test Infrastructure for AutoRest",
    "version": "1.0.0"
  },
  "host": "localhost:3000",
  "schemes": [
    "http"
  ],
  "produces": [
    "application/json"
  ],
  "consumes": [
    "application/json"
  ],
  "paths": {
    "/date/null": {
      "get": {
        "operationId": "date_getNull",
        "description": "Get null date value",
        "x-ms-examples": {
          "date_getNull": {
            "$ref": "./examples/date_getNull.json"
          }
        },
        "responses": {
          "200": {
            "description": "The null date value",
            "schema": {
              "type": "string",
              "format": "date",
              "x-nullable": true
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/date/invaliddate": {
      "get": {
        "operationId": "date_getInvalidDate",
        "description": "Get invalid date value",
        "responses": {
          "200": {
            "description": "The invalid date value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/date/overflowdate": {
      "get": {
        "operationId": "date_getOverflowDate",
        "description": "Get overflow date value",
        "responses": {
          "200": {
            "description": "The overflow date value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/date/underflowdate": {
      "get": {
        "operationId": "date_getUnderflowDate",
        "description": "Get underflow date value",
        "responses": {
          "200": {
            "description": "The underflow date value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/date/max": {
      "put": {
        "operationId": "date_putMaxDate",
        "description": "Put max date value 9999-12-31",
        "x-ms-examples": {
          "date_putMaxDate": {
            "$ref": "./examples/date_putMaxDate.json"
          }
        },
        "parameters": [
          {
            "name": "dateBody",
            "description": "date body",
            "in": "body",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The max date value"
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "get": {
        "operationId": "date_getMaxDate",
        "description": "Get max date value 9999-12-31",
        "x-ms-examples": {
          "date_getMaxDate": {
            "$ref": "./examples/date_getMaxDate.json"
          }
        },
        "responses": {
          "200": {
            "description": "The max date value",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/date/min": {
      "put": {
        "operationId": "date_putMinDate",
        "description": "Put min date value 0000-01-01",
        "x-ms-examples": {
          "date_putMinDate": {
            "$ref": "./examples/date_putMinDate.json"
          }
        },
        "parameters": [
          {
            "name": "dateBody",
            "description": "date body",
            "in": "body",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The min date value"
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "get": {
        "operationId": "date_getMinDate",
        "description": "Get min date value 0000-01-01",
        "x-ms-examples": {
          "date_getMinDate": {
            "$ref": "./examples/date_getMinDate.json"
          }
        },
        "responses": {
          "200": {
            "description": "The min date value 0000-01-01",
            "schema": {
              "type": "string",
              "format": "date",
              "enum":  ["0000-01-01"]
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Error": {
      "type":  "object",
      "properties": {
        "status": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}