You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
2 years ago
|
{
|
||
|
"swagger": "2.0",
|
||
|
"info": {
|
||
|
"description": "This is a sample server celler server.",
|
||
|
"title": "Swagger Example API",
|
||
|
"termsOfService": "http://swagger.io/terms/",
|
||
|
"contact": {
|
||
|
"name": "API Support",
|
||
|
"url": "http://www.swagger.io/support",
|
||
|
"email": "support@swagger.io"
|
||
|
},
|
||
|
"license": {
|
||
|
"name": "Apache 2.0",
|
||
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||
|
},
|
||
|
"version": "1.0"
|
||
|
},
|
||
|
"host": "localhost:8080",
|
||
|
"basePath": "/api/v1",
|
||
|
"paths": {
|
||
|
"/hello": {
|
||
|
"get": {
|
||
|
"description": "向你说Hello",
|
||
|
"consumes": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"tags": [
|
||
|
"测试"
|
||
|
],
|
||
|
"summary": "测试SayHello",
|
||
|
"parameters": [
|
||
|
{
|
||
|
"type": "string",
|
||
|
"description": "人名",
|
||
|
"name": "who",
|
||
|
"in": "query",
|
||
|
"required": true
|
||
|
}
|
||
|
],
|
||
|
"responses": {
|
||
|
"200": {
|
||
|
"description": "{\"msg\": \"hello Razeen\"}",
|
||
|
"schema": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
},
|
||
|
"400": {
|
||
|
"description": "{\"msg\": \"who are you\"}",
|
||
|
"schema": {
|
||
|
"type": "string"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"securityDefinitions": {
|
||
|
"BasicAuth": {
|
||
|
"type": "basic"
|
||
|
}
|
||
|
}
|
||
|
}
|