Last active
September 20, 2021 17:37
-
-
Save giuliana-bezerra/4e0be720c5870e9690253279177f204f to your computer and use it in GitHub Desktop.
API da Petstore com parâmetros para modificar endpoints de acordo com o ambiente.
This file contains hidden or 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
--- | |
openapi: 3.0.0 | |
servers: | |
- url: https://petstore.swagger.io/v2 | |
- url: http://petstore.swagger.io/v2 | |
info: | |
description: | |
'This is a sample server Petstore server. You can find out more about | |
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For | |
this sample, you can use the api key `special-key` to test the authorization filters.' | |
version: 1.0.0 | |
title: Swagger Petstore New | |
termsOfService: http://swagger.io/terms/ | |
contact: | |
email: [email protected] | |
license: | |
name: Apache 2.0 | |
url: http://www.apache.org/licenses/LICENSE-2.0.html | |
tags: | |
- name: pet | |
description: Everything about your Pets | |
externalDocs: | |
description: Find out more | |
url: http://swagger.io | |
- name: store | |
description: Access to Petstore orders | |
- name: user | |
description: Operations about user | |
externalDocs: | |
description: Find out more about our store | |
url: http://swagger.io | |
x-wso2-basePath: /api/v3 | |
x-wso2-production-endpoints: '#/x-wso2-endpoints/dev' | |
paths: | |
'/pet/findByStatus': | |
get: | |
tags: | |
- pet | |
summary: Finds Pets by status | |
description: Multiple status values can be provided with comma separated strings | |
operationId: findPetsByStatus | |
x-wso2-production-endpoints: '#/x-wso2-endpoints/homol' | |
parameters: | |
- name: status | |
in: query | |
description: Status values that need to be considered for filter | |
required: true | |
explode: true | |
schema: | |
type: array | |
items: | |
type: string | |
enum: | |
- available | |
- pending | |
- sold | |
default: available | |
responses: | |
'200': | |
description: successful operation | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
'$ref': '#/components/schemas/Pet' | |
application/json: | |
schema: | |
type: array | |
items: | |
'$ref': '#/components/schemas/Pet' | |
'400': | |
description: Invalid status value | |
security: | |
- api_key: [] | |
'/pet/{petId}': | |
get: | |
tags: | |
- pet | |
summary: Find pet by ID | |
description: Returns a single pet | |
operationId: getPetById | |
parameters: | |
- name: petId | |
in: path | |
description: ID of pet to return | |
required: true | |
schema: | |
type: integer | |
format: int64 | |
responses: | |
'200': | |
description: successful operation | |
content: | |
application/xml: | |
schema: | |
'$ref': '#/components/schemas/Pet' | |
application/json: | |
schema: | |
'$ref': '#/components/schemas/Pet' | |
'400': | |
description: Invalid ID supplied | |
'404': | |
description: Pet not found | |
security: | |
- api_key: [] | |
components: | |
schemas: | |
Category: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int64 | |
name: | |
type: string | |
xml: | |
name: Category | |
Tag: | |
type: object | |
properties: | |
id: | |
type: integer | |
format: int64 | |
name: | |
type: string | |
xml: | |
name: Tag | |
Pet: | |
type: object | |
required: | |
- name | |
- photoUrls | |
properties: | |
id: | |
type: integer | |
format: int64 | |
category: | |
'$ref': '#/components/schemas/Category' | |
name: | |
type: string | |
example: doggie | |
photoUrls: | |
type: array | |
xml: | |
name: photoUrl | |
wrapped: true | |
items: | |
type: string | |
tags: | |
type: array | |
xml: | |
name: tag | |
wrapped: true | |
items: | |
'$ref': '#/components/schemas/Tag' | |
status: | |
type: string | |
description: pet status in the store | |
enum: | |
- available | |
- pending | |
- sold | |
xml: | |
name: Pet | |
requestBodies: | |
Pet: | |
content: | |
application/json: | |
schema: | |
'$ref': '#/components/schemas/Pet' | |
application/xml: | |
schema: | |
'$ref': '#/components/schemas/Pet' | |
description: Pet object that needs to be added to the store | |
required: true | |
securitySchemes: | |
api_key: | |
type: apiKey | |
name: api_key | |
in: header | |
x-wso2-endpoints: | |
- dev: | |
urls: | |
- https://petstore.swagger.io/v2 | |
- https://petstore.swagger.io/v5 | |
- homol: | |
urls: | |
- https://petstore.swagger.io/v2 | |
- https://petstore.swagger.io/v5 | |
securityConfig: | |
type: basic | |
username: rajith |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment