UNPKG

@microsoft.azure/autorest.testserver

Version:
149 lines (148 loc) 4.19 kB
{ "swagger": "2.0", "info": { "title": "Body Forms Data URLEncoded", "description": "Test Infrastructure for AutoRest Swagger BAT", "version": "1.0.0" }, "host": "localhost:3000", "schemes": ["http"], "paths": { "/formsdataurlencoded/pet/add/{petId}": { "post": { "tags": ["formsdataurlencoded"], "summary": "Updates a pet in the store with form data", "description": "", "operationId": "formdataurlencoded_updatePetWithForm", "consumes": ["application/x-www-form-urlencoded"], "produces": ["application/json"], "parameters": [ { "name": "petId", "in": "path", "description": "ID of pet that needs to be updated", "required": true, "type": "integer" }, { "$ref": "#/parameters/Pet_type" }, { "$ref": "#/parameters/Pet_food" }, { "$ref": "#/parameters/Pet_count" }, { "name": "name", "in": "formData", "description": "Updated name of the pet", "required": false, "type": "string" }, { "name": "status", "in": "formData", "description": "Updated status of the pet", "required": false, "type": "string" } ], "responses": { "200": { "description": "Pet updated." }, "405": { "description": "Invalid input" } } } }, "/formsdataurlencoded/partialConstantBody": { "post": { "description": "Test a partially constant formdata body. Pass in { grant_type: 'access_token', access_token: 'foo', service: 'bar' } to pass the test.", "operationId": "formdataurlencoded_partialConstantBody", "consumes": ["application/x-www-form-urlencoded"], "parameters": [ { "$ref": "#/parameters/Grant_type" }, { "$ref": "#/parameters/Service" }, { "$ref": "#/parameters/AccessToken" } ], "responses": { "200": { "description": "Pet updated." } } } } }, "parameters": { "Pet_type": { "name": "pet_type", "description": "Can take a value of dog, or cat, or fish", "type": "string", "in": "formData", "required": true, "enum": ["dog", "cat", "fish"], "x-ms-parameter-location": "method", "x-ms-enum": { "name": "PetType", "modelAsString": false } }, "Pet_food": { "name": "pet_food", "description": "Can take a value of meat, or fish, or plant", "type": "string", "in": "formData", "required": true, "enum": ["meat", "fish", "plant"], "x-ms-parameter-location": "method", "x-ms-enum": { "name": "PetFood", "modelAsString": true } }, "Pet_count": { "name": "pet_age", "description": "How many years is it old?", "type": "integer", "in": "formData", "required": true, "x-ms-parameter-location": "method" }, "Grant_type": { "name": "grant_type", "description": "Constant part of a formdata body.", "type": "string", "in": "formData", "required": true, "enum": ["access_token"], "x-ms-parameter-location": "method", "x-ms-enum": { "modelAsString": false } }, "Service": { "name": "service", "in": "formData", "required": true, "description": "Indicates the name of your Azure container registry.", "type": "string", "x-ms-parameter-location": "method" }, "AccessToken": { "name": "access_token", "x-ms-client-name": "aadAccessToken", "in": "formData", "required": true, "description": "AAD access token, mandatory when grant_type is access_token_refresh_token or access_token.", "type": "string", "x-ms-parameter-location": "method" } } }