Created
March 25, 2019 16:49
-
-
Save MasterGroosha/6e4ed847a53ba170273d41c5bea5c003 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: | |
description: Pistache test | |
version: 0.0.1 | |
title: Pistache-Test | |
host: '127.0.0.1:8081' | |
tags: | |
- name: echo | |
description: Check service status | |
- name: calc | |
description: Simple calculator | |
schemes: | |
- http | |
paths: | |
/calc: | |
post: | |
tags: | |
- calc | |
summary: Combines 2 numbers | |
consumes: | |
- application/x-www-form-urlencoded | |
produces: | |
- application/json | |
parameters: | |
- name: number1 | |
in: path | |
description: 1st number | |
required: true | |
type: integer | |
format: int64 | |
- name: number2 | |
in: path | |
description: 2nd number | |
required: true | |
type: integer | |
format: int64 | |
responses: | |
'200': | |
description: Result in JSON | |
/echo: | |
get: | |
tags: | |
- echo | |
summary: Returns OK | |
description: 'Test handler, serves absolutely no purpose!!!!' | |
operationId: getEcho | |
produces: | |
- text/plain | |
parameters: [] | |
responses: | |
'200': | |
description: successful operation | |
post: | |
tags: | |
- echo | |
summary: Returns text sent as POST data | |
description: 'Test handler, you send payload, it''s returned to you' | |
operationId: postEcho | |
consumes: | |
- text/plain | |
produces: | |
- text/plain | |
parameters: | |
- in: body | |
name: body | |
description: Any text you wish | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: OK | |
'413': | |
description: ' Error: Request Entity Too Large' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment