81 строка
1.9 KiB
JSON
81 строка
1.9 KiB
JSON
{
|
|
"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",
|
|
"x-ms-examples": {
|
|
"paths_getEmpty": {
|
|
"$ref": "./examples/paths_getEmpty.json"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|