@microsoft.azure/autorest.testserver
Version:
This project contains a set of OpenAPI definitions and a server implementing the corresponding API. Use this to test compliance of AutoRest generators.
150 lines • 2.49 kB
JSON
{
"swagger": "2.0",
"info": {
"version": "2016-07-07",
"title": "PetStore Inc",
"description": "PetStore"
},
"host": "localhost:3000",
"schemes": [
"http"
],
"paths": {
"/extensibleenums/pet/{petId}": {
"get": {
"operationId": "Pet_GetByPetId",
"parameters": [
{
"$ref": "#/parameters/petid"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Pet"
}
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
},
"/extensibleenums/pet/addPet": {
"post": {
"operationId": "Pet_AddPet",
"parameters": [
{
"name": "petParam",
"in": "body",
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Pet"
}
}
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
]
}
}
},
"definitions": {
"Pet": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"DaysOfWeek": {
"type": "string",
"description": "Type of Pet",
"enum": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"x-ms-enum": {
"name": "DaysOfWeekExtensibleEnum",
"modelAsString": true
},
"default": "Friday"
},
"IntEnum": {
"type": "string",
"description": "",
"enum": [
"1",
"2",
"3"
],
"x-ms-enum": {
"modelAsString": true,
"name": "IntEnum",
"values": [
{
"value": "1",
"description": "one",
"name": "1",
"allowedValues": [
"1.1",
"1.2",
"1.3"
]
},
{
"value": "2",
"description": "two",
"name": "2",
"allowedValues": [
"2.1",
"2.2"
]
},
{
"value": "3",
"description": "three",
"name": "3",
"allowedValues": [
"3.1",
"3.3"
]
}
]
}
}
},
"required": [
"IntEnum"
]
}
},
"parameters": {
"petid": {
"name": "petId",
"in": "path",
"required": true,
"type": "string",
"description": "Pet id",
"x-ms-parameter-location": "method"
}
}
}