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.

76 lines (75 loc) 1.8 kB
{ "swagger": "2.0", "info": { "title": "AutoRest Parameterized Host Test Client", "description": "Test Infrastructure for AutoRest", "version": "1.0.0" }, "host": "badhost", "x-ms-parameterized-host": { "hostTemplate": "{accountName}{host}", "positionInOperation": "last", "parameters": [ { "name": "accountName", "description": "Account Name", "required": true, "type": "string", "in": "path", "x-ms-skip-url-encoding": true }, { "$ref": "#/parameters/host" } ] }, "produces": [ "application/json" ], "consumes": [ "application/json" ], "paths": { "/customuri": { "get": { "operationId": "paths_getEmpty", "description": "Get a 200 to test a valid base uri", "tags": [ "Path Operations" ], "responses": { "200": { "description": "Successfully received a 200 response" }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "parameters": { "host": { "name": "host", "description": "A string value that is used as a global part of the parameterized host", "type": "string", "required": true, "default": "host", "in": "path", "x-ms-skip-url-encoding": true } }, "definitions": { "Error": { "type": "object", "properties": { "status": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } } }