Skip to content

Instantly share code, notes, and snippets.

@vedashree29296
Last active January 25, 2021 10:59
Show Gist options
  • Save vedashree29296/a2b331aca5ec0269957a1c17fa5b44cc to your computer and use it in GitHub Desktop.
Save vedashree29296/a2b331aca5ec0269957a1c17fa5b44cc to your computer and use it in GitHub Desktop.
Example for POST call
paths: # all routes go under this
"/pet":
post: # define the type ie get/post/put/delete
tags:
- Pet
summary: Add a new pet to the store
requestBody: # define the request body under this
content:
application/json: # this shows that the request body is a JSON object
schema:
$ref: "#/components/schemas/Pet"
responses:
"200":
description: Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment