@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.
428 lines (427 loc) • 14.4 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "Microsoft Azure Redis Cache Management API",
"description": "Some cool documentation.",
"version": "1.0.0"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"produces": [ "application/json", "text/plain", "text/html"],
"consumes": [ "application/json", "text/plain", "text/html"],
"paths": {
"/subscriptions/{integer}/{int}/{long}/{number}/{float}/{double}/{string}/{penum}/{byte}/{boolean}/{date}/{dateTime}": {
"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": [
{
"name": "integer",
"in": "path",
"type": "integer",
"required": true
},
{
"name": "int",
"in": "path",
"type": "integer",
"format": "int32",
"required": true
},
{
"name": "long",
"in": "path",
"type": "integer",
"format": "int64",
"required": true
},
{
"name": "number",
"in": "path",
"type": "number",
"required": true
},
{
"name": "float",
"in": "path",
"type": "number",
"format": "float",
"required": true
},
{
"name": "double",
"in": "path",
"type": "number",
"format": "double",
"required": true
},
{
"name": "string",
"in": "path",
"type": "string",
"required": true
},
{
"name": "penum",
"in": "path",
"type": "string",
"enum": [ "red", "blue", "green" ],
"required": true
},
{
"name": "byte",
"in": "path",
"type": "string",
"format": "byte",
"required": true
},
{
"name": "boolean",
"in": "path",
"type": "boolean",
"required": true
},
{
"name": "date",
"in": "path",
"type": "string",
"format": "date",
"required": true
},
{
"name": "dateTime",
"in": "path",
"type": "string",
"format": "date-time",
"required": true
},
{
"name": "invalues",
"in": "query",
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
}
],
"tags": [
"Redis"
],
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"$ref": "#/definitions/Product"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/subscriptionsDictionaryObject": {
"get": {
"operationId": "getDictionaryObject",
"summary": "Product Types",
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"type": "string",
"additionalProperties": {
"$ref": "#/definitions/Product"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/subscriptionsDictionary": {
"get": {
"operationId": "getDictionaryString",
"summary": "Product Types",
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"type": "string",
"additionalProperties": {
"type": "string"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"head": {
"operationId": "getDictionaryInt",
"summary": "Product Types",
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"type": "string",
"additionalProperties": {
"type": "integer"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/subscriptions": {
"get": {
"operationId": "get",
"summary": "Product Types",
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "put",
"summary": "Create Product Types",
"parameters": [
{
"name": "product",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
}
],
"responses": {
"200": {
"description": "A list of caches",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"operationId": "post",
"summary": "Post product",
"parameters": [
{
"name": "product",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Object"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Product": {
"type": "object",
"properties": {
"integer": {
"type": "integer"
},
"int": {
"type": "integer",
"format": "int32"
},
"long": {
"type": "integer",
"format": "int64"
},
"number": {
"type": "number"
},
"float": {
"type": "number",
"format": "float"
},
"double": {
"type": "number",
"format": "double"
},
"string": {
"type": "string"
},
"penum": {
"type": "string",
"enum": [ "red", "blue", "green" ]
},
"byte": {
"type": "string",
"format": "byte"
},
"boolean": {
"type": "boolean"
},
"date": {
"type": "string",
"format": "date"
},
"dateTime": {
"type": "string",
"format": "date-time"
},
"integerArray": {
"type": "array",
"items": {
"type": "integer"
}
},
"intArray": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
},
"longArray": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"numberArray": {
"type": "array",
"items": {
"type": "number"
}
},
"floatArray": {
"type": "array",
"items": {
"type": "number",
"format": "float"
}
},
"doubleArray": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
},
"booleanArray": {
"type": "array",
"items": {
"type": "boolean"
}
},
"stringArray": {
"type": "array",
"items": {
"type": "string"
}
},
"byteArrayArray": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
},
"dateArray": {
"type": "array",
"items": {
"type": "string",
"format": "date"
}
},
"dateTimeArray": {
"type": "array",
"items": {
"type": "string",
"format": "date-time"
}
}
}
},
"Object": {
"type": "object",
"properties": {}
},
"Error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"fields": {
"type": "string"
}
}
}
}
}