Created
April 20, 2017 01:51
-
-
Save hadv/fbfb2b62de7166eb8dccd4d047137432 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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