【发布时间】:2020-07-14 19:32:16
【问题描述】:
我是 swagger API 文档的新手,想部署一个具有查询字符串的 API。这是我在GET方法中传递参数后得到的API。
baseurl/v1/auth/getOTP?mobile=98XXXXXX14
我想要这个:-
baseurl/v1/auth/getOTP/mobile/98XXXXXX14
我正在实施的是:-
"/auth/getOTP": {
"get": {
"tags": [
"pet"
],
"summary": "",
"description": "",
"operationId": "findPetsByStatus",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "mobile",
"in": "query",
"description": "",
"required": true,
"type": "string",
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"400": {
"description": "Invalid value"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
【问题讨论】:
标签: swagger swagger-ui