mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
80 lines
1.4 KiB
JSON
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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|