618 строки
18 KiB
JSON
618 строки
18 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "AutoRest DateTime Test Service",
|
|
"description": "Test Infrastructure for AutoRest",
|
|
"version": "1.0.0"
|
|
},
|
|
"host": "localhost:3000",
|
|
"schemes": [
|
|
"http"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/datetime/null": {
|
|
"get": {
|
|
"operationId": "datetime_getNull",
|
|
"description": "Get null datetime value",
|
|
"x-ms-examples": {
|
|
"datetime_getNull": {
|
|
"$ref": "./examples/datetime_getNull.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The null datetime value",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"x-nullable": true
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/invalid": {
|
|
"get": {
|
|
"operationId": "datetime_getInvalid",
|
|
"description": "Get invalid datetime value",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The invalid datetime value",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/overflow": {
|
|
"get": {
|
|
"operationId": "datetime_getOverflow",
|
|
"description": "Get overflow datetime value",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The overflow datetime value",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/underflow": {
|
|
"get": {
|
|
"operationId": "datetime_getUnderflow",
|
|
"description": "Get underflow datetime value",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The underflow datetime value",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/utc": {
|
|
"put": {
|
|
"operationId": "datetime_putUtcMaxDateTime",
|
|
"description": "Put max datetime value 9999-12-31T23:59:59.999Z",
|
|
"x-ms-examples": {
|
|
"datetime_putUtcMaxDateTime": {
|
|
"$ref": "./examples/datetime_putUtcMaxDateTime.json"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.999Z"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/utc7ms": {
|
|
"put": {
|
|
"operationId": "datetime_putUtcMaxDateTime7Digits",
|
|
"description": "This is against the recommendation that asks for 3 digits, but allow to test what happens in that scenario",
|
|
"summary": "Put max datetime value 9999-12-31T23:59:59.9999999Z",
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.9999999Z"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/utc/lowercase": {
|
|
"get": {
|
|
"operationId": "datetime_getUtcLowercaseMaxDateTime",
|
|
"description": "Get max datetime value 9999-12-31t23:59:59.999z",
|
|
"x-ms-examples": {
|
|
"datetime_getUtcLowercaseMaxDateTime": {
|
|
"$ref": "./examples/datetime_getUtcLowercaseMaxDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31t23:59:59.999z",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/utc/uppercase": {
|
|
"get": {
|
|
"operationId": "datetime_getUtcUppercaseMaxDateTime",
|
|
"description": "Get max datetime value 9999-12-31T23:59:59.999Z",
|
|
"x-ms-examples": {
|
|
"datetime_getUtcUppercaseMaxDateTime": {
|
|
"$ref": "./examples/datetime_getUtcUppercaseMaxDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.999Z",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/utc7ms/uppercase": {
|
|
"get": {
|
|
"operationId": "datetime_getUtcUppercaseMaxDateTime7Digits",
|
|
"description": "This is against the recommendation that asks for 3 digits, but allow to test what happens in that scenario",
|
|
"summary": "Get max datetime value 9999-12-31T23:59:59.9999999Z",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.9999999Z",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localpositiveoffset": {
|
|
"put": {
|
|
"operationId": "datetime_putLocalPositiveOffsetMaxDateTime",
|
|
"description": "Put max datetime value with positive numoffset 9999-12-31t23:59:59.999+14:00",
|
|
"x-ms-examples": {
|
|
"datetime_putLocalPositiveOffsetMaxDateTime": {
|
|
"$ref": "./examples/datetime_putLocalPositiveOffsetMaxDateTime.json"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value with positive num offset 9999-12-31T23:59:59.999+14:00"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localpositiveoffset/lowercase": {
|
|
"get": {
|
|
"operationId": "datetime_getLocalPositiveOffsetLowercaseMaxDateTime",
|
|
"description": "Get max datetime value with positive num offset 9999-12-31t23:59:59.999+14:00",
|
|
"x-ms-examples": {
|
|
"datetime_getLocalPositiveOffsetLowercaseMaxDateTime": {
|
|
"$ref": "./examples/datetime_getLocalPositiveOffsetLowercaseMaxDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31t23:59:59.999+14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localpositiveoffset/uppercase": {
|
|
"get": {
|
|
"operationId": "datetime_getLocalPositiveOffsetUppercaseMaxDateTime",
|
|
"description": "Get max datetime value with positive num offset 9999-12-31T23:59:59.999+14:00",
|
|
"x-ms-examples": {
|
|
"datetime_getLocalPositiveOffsetUppercaseMaxDateTime": {
|
|
"$ref": "./examples/datetime_getLocalPositiveOffsetUppercaseMaxDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.999+14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localnegativeoffset": {
|
|
"put": {
|
|
"operationId": "datetime_putLocalNegativeOffsetMaxDateTime",
|
|
"description": "Put max datetime value with positive numoffset 9999-12-31t23:59:59.999-14:00",
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value with positive num offset 9999-12-31T23:59:59.999+14:00"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localnegativeoffset/uppercase": {
|
|
"get": {
|
|
"operationId": "datetime_getLocalNegativeOffsetUppercaseMaxDateTime",
|
|
"description": "Get max datetime value with positive num offset 9999-12-31T23:59:59.999-14:00",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31T23:59:59.999-14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/max/localnegativeoffset/lowercase": {
|
|
"get": {
|
|
"operationId": "datetime_getLocalNegativeOffsetLowercaseMaxDateTime",
|
|
"description": "Get max datetime value with positive num offset 9999-12-31t23:59:59.999-14:00",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The max datetime value 9999-12-31t23:59:59.999-14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/min/utc": {
|
|
"put": {
|
|
"operationId": "datetime_putUtcMinDateTime",
|
|
"description": "Put min datetime value 0001-01-01T00:00:00Z",
|
|
"x-ms-examples": {
|
|
"datetime_putUtcMinDateTime": {
|
|
"$ref": "./examples/datetime_putUtcMinDateTime.json"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00Z"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "datetime_getUtcMinDateTime",
|
|
"description": "Get min datetime value 0001-01-01T00:00:00Z",
|
|
"x-ms-examples": {
|
|
"datetime_getUtcMinDateTime": {
|
|
"$ref": "./examples/datetime_getUtcMinDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00Z",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"enum": [
|
|
"0001-01-01T00:00:00Z"
|
|
]
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/min/localpositiveoffset": {
|
|
"put": {
|
|
"operationId": "datetime_putLocalPositiveOffsetMinDateTime",
|
|
"description": "Put min datetime value 0001-01-01T00:00:00+14:00",
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00+14:00"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "datetime_getLocalPositiveOffsetMinDateTime",
|
|
"description": "Get min datetime value 0001-01-01T00:00:00+14:00",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00+14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"enum": [
|
|
"0001-01-01t00:00:00+14:00"
|
|
]
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/min/localnegativeoffset": {
|
|
"put": {
|
|
"operationId": "datetime_putLocalNegativeOffsetMinDateTime",
|
|
"description": "Put min datetime value 0001-01-01T00:00:00-14:00",
|
|
"x-ms-examples": {
|
|
"datetime_putLocalNegativeOffsetMinDateTime": {
|
|
"$ref": "./examples/datetime_putLocalNegativeOffsetMinDateTime.json"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "datetimeBody",
|
|
"description": "datetime body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00+14:00"
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "datetime_getLocalNegativeOffsetMinDateTime",
|
|
"description": "Get min datetime value 0001-01-01T00:00:00-14:00",
|
|
"x-ms-examples": {
|
|
"datetime_getLocalNegativeOffsetMinDateTime": {
|
|
"$ref": "./examples/datetime_getLocalNegativeOffsetMinDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00-14:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"enum": [
|
|
"0001-01-01t00:00:00-14:00"
|
|
]
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/datetime/min/localnooffset": {
|
|
"get": {
|
|
"operationId": "datetime_getLocalNoOffsetMinDateTime",
|
|
"description": "Get min datetime value 0001-01-01T00:00:00",
|
|
"x-ms-examples": {
|
|
"datetime_getLocalNoOffsetMinDateTime": {
|
|
"$ref": "./examples/datetime_getLocalNoOffsetMinDateTime.json"
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "The min datetime value 0001-01-01T00:00:00",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |