UNPKG

@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.

163 lines (162 loc) 5.01 kB
{ "swagger": "2.0", "info": { "title": "Multiapi Service Client", "description": "Service client for multiapi client testing", "version": "3.0.0" }, "host": "localhost:3000", "produces": [ "application/json" ], "paths": { "/multiapi/one/testTwoEndpoint": { "get": { "consumes": [ "application/json" ], "operationId": "OperationGroupOne_testTwo", "description": "TestTwo should be in OperationGroupOneOperations. Takes in ModelThree and ouputs ModelThree", "parameters": [ { "name": "parameterOne", "in": "body", "description": "A ModelThree parameter", "schema": { "$ref": "#/definitions/ModelThree" } }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Returns ModelThree", "schema": { "$ref": "#/definitions/ModelThree" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/multiapi/two/testFourEndpoint": { "post": { "consumes": [ "application/pdf", "application/json", "image/jpeg", "image/png", "image/tiff" ], "operationId": "OperationGroupTwo_testFour", "description": "TestFour should be in OperationGroupTwoOperations", "x-ms-request-id": "request-id", "parameters": [ { "$ref": "#/parameters/Input" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Empty response" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/multiapi/two/testFiveEndpoint": { "put": { "consumes": [ "application/json" ], "operationId": "OperationGroupTwo_testFive", "description": "TestFive should be in OperationGroupTwoOperations.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Empty response" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Error": { "type": "object", "properties": { "status": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } }, "ModelThree": { "type": "object", "description": "Only exists in api version 3.0.0", "properties": { "optionalProperty": { "type": "string" } } }, "SourcePath": { "description": "Uri or local path to source data.", "type": "object", "properties": { "source": { "description": "File source path.", "maxLength": 2048, "minLength": 0, "type": "string" } } } }, "parameters": { "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "The API version to use for this operation.", "minLength": 1 }, "Input": { "name": "input", "description": "Input parameter.", "x-ms-parameter-location": "method", "in": "body", "schema": { "$ref": "#/definitions/SourcePath" } } } }