@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.
96 lines (95 loc) • 2.47 kB
JSON
{
"swagger": "2.0",
"info": {
"title": "Microsoft Azure Test Url",
"description": "Some cool documentation.",
"version": "2014-04-01-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"basePath": "/",
"produces": [ "application/json" ],
"consumes": [ "application/json" ],
"parameters": {
"subscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"description": "Subscription Id.",
"required": true,
"type": "string"
},
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"description": "API Version with value '2014-04-01-preview'.",
"required": true,
"type": "string"
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}": {
"get": {
"operationId": "group_getSampleResourceGroup",
"description": "Provides a resouce group with name 'testgroup101' and location 'West US'.",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"name": "resourceGroupName",
"in": "path",
"description": "Resource Group name 'testgroup101'.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "A sample resource group",
"schema": {
"$ref": "#/definitions/SampleResourceGroup"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"SampleResourceGroup": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "resource group name 'testgroup101'"
},
"location": {
"type": "string",
"description": "resource group location 'West US'"
}
}
},
"Error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}