-
-
Save rohitsanj/bd1f1f6747c41299bf4ce714ec2cda80 to your computer and use it in GitHub Desktop.
Petstore OpenAPI spec containing hyphen-separated security scheme
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
openapi: 3.0.0 | |
info: | |
description: "This spec is mainly for testing Petstore server and contains fake\ | |
\ endpoints, models. Please do not use this for any other purpose. Special characters:\ | |
\ \" \\" | |
license: | |
name: Apache-2.0 | |
url: https://www.apache.org/licenses/LICENSE-2.0.html | |
title: OpenAPI Petstore | |
version: 1.0.0 | |
servers: | |
- description: petstore server | |
url: "http://{server}.swagger.io:{port}/v2" | |
variables: | |
server: | |
default: petstore | |
enum: | |
- petstore | |
- qa-petstore | |
- dev-petstore | |
port: | |
default: "80" | |
enum: | |
- "80" | |
- "8080" | |
- description: The local server | |
url: "https://localhost:8080/{version}" | |
variables: | |
version: | |
default: v2 | |
enum: | |
- v1 | |
- v2 | |
- description: The local server without variables | |
url: https://127.0.0.1/no_varaible | |
tags: | |
- description: Everything about your Pets | |
name: pet | |
- description: Access to Petstore orders | |
name: store | |
- description: Operations about user | |
name: user | |
paths: | |
/pet: | |
post: | |
description: "" | |
operationId: addPet | |
requestBody: | |
$ref: '#/components/requestBodies/Pet' | |
responses: | |
"200": | |
description: Successful operation | |
"405": | |
description: Invalid input | |
security: | |
- petstore-auth: | |
- write:pets | |
- read:pets | |
summary: Add a new pet to the store | |
tags: | |
- pet | |
x-content-type: application/json | |
x-accepts: | |
- application/json | |
put: | |
description: "" | |
operationId: updatePet | |
requestBody: | |
$ref: '#/components/requestBodies/Pet' | |
responses: | |
"200": | |
description: Successful operation | |
"400": | |
description: Invalid ID supplied | |
"404": | |
description: Pet not found | |
"405": | |
description: Validation exception | |
security: | |
- petstore-auth: | |
- write:pets | |
- read:pets | |
summary: Update an existing pet | |
tags: | |
- pet | |
x-webclient-blocking: true | |
x-content-type: application/json | |
x-accepts: | |
- application/json | |
servers: | |
- url: http://petstore.swagger.io/v2 | |
- url: http://path-server-test.petstore.local/v2 | |
- description: test server with variables | |
url: "http://{server}.swagger.io:{port}/v2" | |
variables: | |
server: | |
default: petstore | |
description: target server | |
enum: | |
- petstore | |
- qa-petstore | |
- dev-petstore | |
port: | |
default: "80" | |
enum: | |
- "80" | |
- "8080" | |
get: | |
operationId: fake-http-signature-test | |
parameters: | |
- description: query parameter | |
explode: true | |
in: query | |
name: query_1 | |
required: false | |
schema: | |
type: string | |
style: form | |
- description: header parameter | |
explode: false | |
in: header | |
name: header_1 | |
required: false | |
schema: | |
type: string | |
style: simple | |
requestBody: | |
$ref: '#/components/requestBodies/Pet' | |
responses: | |
"200": | |
description: The instance started successfully | |
security: | |
- http_signature_test: [] | |
summary: test http signature authentication | |
tags: | |
- fake | |
x-content-type: application/json | |
x-accepts: | |
- application/json | |
components: | |
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 | |
schemas: | |
Pet: | |
example: | |
photoUrls: | |
- photoUrls | |
- photoUrls | |
name: doggie | |
id: 0 | |
category: | |
name: default-name | |
id: 6 | |
tags: | |
- name: name | |
id: 1 | |
- name: name | |
id: 1 | |
status: available | |
properties: | |
id: | |
format: int64 | |
type: integer | |
x-is-unique: true | |
category: | |
$ref: '#/components/schemas/Category' | |
name: | |
example: doggie | |
type: string | |
photoUrls: | |
items: | |
type: string | |
type: array | |
uniqueItems: true | |
xml: | |
name: photoUrl | |
wrapped: true | |
tags: | |
items: | |
$ref: '#/components/schemas/Tag' | |
type: array | |
xml: | |
name: tag | |
wrapped: true | |
status: | |
description: pet status in the store | |
enum: | |
- available | |
- pending | |
- sold | |
type: string | |
required: | |
- name | |
- photoUrls | |
type: object | |
xml: | |
name: Pet | |
Category: | |
example: | |
name: default-name | |
id: 6 | |
properties: | |
id: | |
format: int64 | |
type: integer | |
name: | |
default: default-name | |
type: string | |
required: | |
- name | |
type: object | |
xml: | |
name: Category | |
Tag: | |
example: | |
name: name | |
id: 1 | |
properties: | |
id: | |
format: int64 | |
type: integer | |
name: | |
type: string | |
type: object | |
xml: | |
name: Tag | |
securitySchemes: | |
petstore-auth: | |
flows: | |
implicit: | |
authorizationUrl: http://petstore.swagger.io/api/oauth/dialog | |
scopes: | |
write:pets: modify pets in your account | |
read:pets: read your pets | |
type: oauth2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment