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.

273 lines (272 loc) 7.51 kB
{ "swagger": "2.0", "info": { "title": "Complex Model Client", "description": "Some cool documentation.", "version": "2014-04-01-preview" }, "host": "localhost:3000", "schemes": [ "http" ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/Microsoft.Cache/Redis": { "get": { "operationId": "list", "summary": "Product Types", "description": "The Products endpoint returns information about the Uber products offered at a given location. The response includes the display name and other details about each product, and lists the products in the proper display order.", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParamterer" }, { "name": "resourceGroupName", "in": "path", "description": "Resource Group ID.", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Redis" ], "responses": { "200": { "description": "A list of caches", "schema": { "$ref": "#/definitions/CatalogArray" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "create", "summary": "Create products", "description": "Resets products.", "parameters": [ { "name": "subscriptionId", "in": "path", "description": "Subscription ID.", "required": true, "type": "string" }, { "name": "resourceGroupName", "in": "path", "description": "Resource Group ID.", "required": true, "type": "string" }, { "name": "bodyParameter", "in": "body", "description": "body Parameter", "required": true, "schema": { "$ref": "#/definitions/CatalogDictionaryOfArray" } }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Redis" ], "responses": { "200": { "description": "A list of caches", "schema": { "$ref": "#/definitions/CatalogDictionary" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "put": { "operationId": "update", "summary": "Update products", "description": "Resets products.", "parameters": [ { "name": "subscriptionId", "in": "path", "description": "Subscription ID.", "required": true, "type": "string" }, { "name": "resourceGroupName", "in": "path", "description": "Resource Group ID.", "required": true, "type": "string" }, { "name": "bodyParameter", "in": "body", "description": "body Parameter", "required": true, "schema": { "$ref": "#/definitions/CatalogArrayOfDictionary" } }, { "$ref": "#/parameters/ApiVersionParameter" } ], "tags": [ "Redis" ], "responses": { "200": { "description": "A list of caches", "schema": { "$ref": "#/definitions/CatalogArray" } }, "default": { "description": "Unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Product": { "type": "object", "description": "The product documentation.", "properties": { "product_id": { "type": "string", "description": "Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles." }, "description": { "type": "string", "description": "Description of product." }, "display_name": { "type": "string", "description": "Display name of product." }, "capacity": { "type": "string", "description": "Capacity of product. For example, 4 people.", "default": "100" }, "image": { "type": "string", "description": "Image URL representing the product." } }, "example": { "name": "Puma", "id": 1 } }, "CatalogDictionary": { "type": "object", "properties": { "productDictionary": { "type": "object", "description": "Dictionary of products", "additionalProperties": { "$ref": "#/definitions/Product" } } } }, "CatalogArray": { "type": "object", "properties": { "productArray": { "description": "Array of products", "type": "array", "items": { "$ref": "#/definitions/Product" } } } }, "CatalogArrayOfDictionary": { "type": "object", "properties": { "productArrayOfDictionary": { "description": "Array of dictionary of products", "type": "array", "items": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Product" } } } } }, "CatalogDictionaryOfArray": { "type": "object", "properties": { "productDictionaryOfArray": { "type": "object", "description": "Dictionary of Array of product", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/Product" } } } } }, "Error": { "type": "object", "properties": { "status": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } } }, "parameters": { "SubscriptionIdParamterer": { "name": "subscriptionId", "in": "path", "description": "Subscription ID.", "required": true, "type": "string", "enum": [ "123456" ] }, "ApiVersionParameter": { "name": "api-version", "in": "query", "description": "API ID.", "required": true, "type": "string", "enum": [ "2014-04-01-preview" ] } } }