Created
January 25, 2021 10:57
-
-
Save vedashree29296/cba1c56a8823df94722e6f72ad545560 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
paths: | |
"/pet": | |
get: | |
parameters: | |
- in: query # defines the query parameter that should be sent which is the category id | |
name: categoryId | |
schema: | |
type: integer | |
example: 1 | |
required: true | |
description: category id to fetch pets for | |
tags: | |
- Pet | |
summary: Get all pets based on category id | |
responses: | |
200: # define the response based on a success condition | |
description: Success | |
content: | |
application/json: # this shows that response is a JSON object | |
schema: | |
type: array # returns an array | |
items: | |
$ref: "#/components/schemas/Pet" # refers to the pet schema defined earlier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment