1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 04:22:22 +00:00
2018-12-16 12:40:54 +08:00

80 lines
1.4 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "helloworld.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/get/{value}": {
"get": {
"operationId": "Get",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/mainStringMessage"
}
}
},
"parameters": [
{
"name": "value",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"RestService"
]
}
},
"/post": {
"post": {
"operationId": "Post",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/mainStringMessage"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mainStringMessage"
}
}
],
"tags": [
"RestService"
]
}
}
},
"definitions": {
"mainStringMessage": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
}
}
}
}