Skip to content

Instantly share code, notes, and snippets.

@jabrena
Created October 11, 2018 15:33
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 jabrena/126258a24e9ce75ccffc516ba5b57ece to your computer and use it in GitHub Desktop.
Save jabrena/126258a24e9ce75ccffc516ba5b57ece to your computer and use it in GitHub Desktop.
swagger: "2.0"
info:
description: ""
version: "1.0.0"
title: "TDD Sum"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "petstore.swagger.io"
basePath: "/v2"
schemes:
- "https"
- "http"
paths:
/sum:
post:
tags:
- "sum"
summary: "Sum 2 numbers"
description: ""
operationId: "addPet"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/SumRequest"
responses:
200:
description: "{result: 3}"
definitions:
SumRequest:
type: "object"
required:
- "number1"
- "number2"
properties:
number1:
type: "integer"
format: "int64"
example: "1"
number2:
type: "integer"
format: "int64"
example: "2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment