@microsoft.azure/autorest.testserver
Version:
Autorest test server.
396 lines (395 loc) • 9.88 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "AutoRest Integer Test Service",
"description": "Test Infrastructure for AutoRest",
"version": "1.0.0"
},
"host": "localhost:3000",
"schemes": ["http"],
"produces": ["application/json"],
"consumes": ["application/json"],
"paths": {
"/int/null": {
"get": {
"operationId": "int_getNull",
"description": "Get null Int value",
"x-ms-examples": {
"int_getNull": {
"$ref": "./examples/int_getNull.json"
}
},
"responses": {
"200": {
"description": "The null int value",
"schema": {
"type": "integer",
"x-nullable": true
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/invalid": {
"get": {
"operationId": "int_getInvalid",
"description": "Get invalid Int value",
"responses": {
"200": {
"description": "The invalid int value",
"schema": {
"type": "integer"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/overflowint32": {
"get": {
"operationId": "int_getOverflowInt32",
"description": "Get overflow Int32 value",
"responses": {
"200": {
"description": "The overflow Int32 value",
"schema": {
"type": "integer",
"format": "int32"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/underflowint32": {
"get": {
"operationId": "int_getUnderflowInt32",
"description": "Get underflow Int32 value",
"responses": {
"200": {
"description": "The underflow Int32 value",
"schema": {
"type": "integer",
"format": "int32"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/overflowint64": {
"get": {
"operationId": "int_getOverflowInt64",
"description": "Get overflow Int64 value",
"responses": {
"200": {
"description": "The overflow Int64 value",
"schema": {
"type": "integer",
"format": "int64"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/underflowint64": {
"get": {
"operationId": "int_getUnderflowInt64",
"description": "Get underflow Int64 value",
"responses": {
"200": {
"description": "The underflow Int64 value",
"schema": {
"type": "integer",
"format": "int64"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/max/32": {
"put": {
"operationId": "int_putMax32",
"description": "Put max int32 value",
"x-ms-examples": {
"int_putMax32": {
"$ref": "./examples/int_putMax32.json"
}
},
"parameters": [
{
"name": "intBody",
"description": "int body",
"in": "body",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
}
],
"responses": {
"200": {
"description": "The max int32 value"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/max/64": {
"put": {
"operationId": "int_putMax64",
"description": "Put max int64 value",
"x-ms-examples": {
"int_putMax64": {
"$ref": "./examples/int_putMax64.json"
}
},
"parameters": [
{
"name": "intBody",
"description": "int body",
"in": "body",
"schema": {
"type": "integer",
"format": "int64"
},
"required": true
}
],
"responses": {
"200": {
"description": "The max int64 value"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/min/32": {
"put": {
"operationId": "int_putMin32",
"description": "Put min int32 value",
"x-ms-examples": {
"int_putMin32": {
"$ref": "./examples/int_putMin32.json"
}
},
"parameters": [
{
"name": "intBody",
"description": "int body",
"in": "body",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
}
],
"responses": {
"200": {
"description": "The min int32 value"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/min/64": {
"put": {
"operationId": "int_putMin64",
"description": "Put min int64 value",
"x-ms-examples": {
"int_putMin64": {
"$ref": "./examples/int_putMin64.json"
}
},
"parameters": [
{
"name": "intBody",
"description": "int body",
"in": "body",
"schema": {
"type": "integer",
"format": "int64"
},
"required": true
}
],
"responses": {
"200": {
"description": "The min int64 value"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/unixtime": {
"get": {
"operationId": "int_getUnixTime",
"description": "Get datetime encoded as Unix time value",
"x-ms-examples": {
"int_getUnixTime": {
"$ref": "./examples/int_getUnixTime.json"
}
},
"responses": {
"200": {
"description": "The date value encoded as Unix time",
"schema": {
"type": "integer",
"format": "unixtime"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "int_putUnixTimeDate",
"description": "Put datetime encoded as Unix time",
"parameters": [
{
"name": "intBody",
"description": "int body",
"in": "body",
"schema": {
"type": "integer",
"format": "unixtime"
},
"required": true
}
],
"responses": {
"200": {
"description": "The datetime value encoded as Unix time"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/invalidunixtime": {
"get": {
"operationId": "int_getInvalidUnixTime",
"description": "Get invalid Unix time value",
"responses": {
"200": {
"description": "The invalid Unix time value",
"schema": {
"type": "integer",
"format": "unixtime"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/int/nullunixtime": {
"get": {
"operationId": "int_getNullUnixTime",
"description": "Get null Unix time value",
"x-ms-examples": {
"int_getNullUnixTime": {
"$ref": "./examples/int_getNullUnixTime.json"
}
},
"responses": {
"200": {
"description": "The null Unix time value",
"schema": {
"type": "integer",
"format": "unixtime",
"x-nullable": true
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}