Skip to content

Instantly share code, notes, and snippets.

@hadv
Created April 20, 2017 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadv/fbfb2b62de7166eb8dccd4d047137432 to your computer and use it in GitHub Desktop.
Save hadv/fbfb2b62de7166eb8dccd4d047137432 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"title": "Echo Service",
"description": "Echo Service API consists of a single service which returns a message.",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/example/echo/{id}": {
"post": {
"summary": "Echo method receives a simple message and returns it.\nThe message posted as the id parameter will also be returned.",
"operationId": "Echo",
"responses": {
"200": {
"description": "Description",
"schema": {
"$ref": "#/definitions/echoMessage"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string",
"format": "string"
}
],
"tags": [
"EchoService"
]
}
},
"/v1/example/echo_body": {
"post": {
"summary": "EchoBody method receives a simple message and returns it.",
"operationId": "EchoBody",
"responses": {
"200": {
"description": "Description",
"schema": {
"$ref": "#/definitions/echoMessage"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/echoMessage"
}
}
],
"tags": [
"EchoService"
]
}
}
},
"definitions": {
"echoMessage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "string",
"description": "Id represents the message identifier."
}
},
"description": "Message represents a simple message sent to the Echo service."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment