autorest.azure-functions-py.../test/data/swagger/azure-parameter-grouping.json

231 строка
6.1 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "AutoRest Parameter Grouping Test Service",
"description": "Test Infrastructure for AutoRest",
"version": "1.0.0"
},
"host": "localhost:3000",
"schemes": [
"http"
],
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"paths": {
"/parameterGrouping/postRequired/{path}": {
"post": {
"operationId": "parameterGrouping_postRequired",
"description": "Post a bunch of required parameters grouped",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true,
"x-ms-parameter-grouping": {
}
},
{
"name": "customHeader",
"in": "header",
"type": "string",
"required": false,
"x-ms-parameter-grouping": {
}
},
{
"name": "query",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"default": 30,
"description": "Query parameter with default",
"x-ms-parameter-grouping": {
}
},
{
"name": "path",
"in": "path",
"required": true,
"type": "string",
"description": "Path parameter",
"x-ms-parameter-grouping": {
}
}
],
"responses": {
"200": {
"description": "Success"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/parameterGrouping/postOptional": {
"post": {
"operationId": "parameterGrouping_postOptional",
"description": "Post a bunch of optional parameters grouped",
"parameters": [
{
"name": "customHeader",
"in": "header",
"type": "string",
"required": false,
"x-ms-parameter-grouping": {
}
},
{
"name": "query",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"default": 30,
"description": "Query parameter with default",
"x-ms-parameter-grouping": {
}
}
],
"responses": {
"200": {
"description": "Success"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/parameterGrouping/postMultipleParameterGroups": {
"post": {
"operationId": "parameterGrouping_postMultiParamGroups",
"description": "Post parameters from multiple different parameter groups",
"parameters": [
{
"name": "header-one",
"in": "header",
"type": "string",
"required": false,
"x-ms-parameter-grouping": {
"name": "first-parameter-group"
}
},
{
"name": "query-one",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"default": 30,
"description": "Query parameter with default",
"x-ms-parameter-grouping": {
"name": "first-parameter-group"
}
},
{
"name": "header-two",
"in": "header",
"type": "string",
"required": false,
"x-ms-parameter-grouping": {
"postfix": "second-param-group"
}
},
{
"name": "query-two",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"default": 30,
"description": "Query parameter with default",
"x-ms-parameter-grouping": {
"postfix": "second-param-group"
}
}
],
"responses": {
"200": {
"description": "Success"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/parameterGrouping/sharedParameterGroupObject": {
"post": {
"operationId": "parameterGrouping_postSharedParameterGroupObject",
"description": "Post parameters with a shared parameter group object",
"parameters": [
{
"name": "header-one",
"in": "header",
"type": "string",
"required": false,
"x-ms-parameter-grouping": {
"name": "first-parameter-group"
}
},
{
"name": "query-one",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"default": 30,
"description": "Query parameter with default",
"x-ms-parameter-grouping": {
"name": "first-parameter-group"
}
}
],
"responses": {
"200": {
"description": "Success"
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}