forked from stoplightio/prism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
769 additions
and
19 deletions.
There are no files selected for viewing
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
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
316 changes: 316 additions & 0 deletions
316
packages/http/src/utils/__tests__/__fixtures__/schema-refs.oas3.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,316 @@ | ||
--- | ||
openapi: 3.0.0 | ||
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 | ||
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 | ||
paths: | ||
"/pets": | ||
post: | ||
tags: | ||
- pet | ||
summary: Add a new pet to the store | ||
description: '' | ||
operationId: addPet | ||
requestBody: | ||
"$ref": "#/components/requestBodies/Pet" | ||
responses: | ||
'405': | ||
description: Invalid input | ||
security: | ||
- petstore_auth: | ||
- write:pets | ||
- read:pets | ||
put: | ||
tags: | ||
- pet | ||
summary: Update an existing pet | ||
description: '' | ||
operationId: updatePet | ||
requestBody: | ||
"$ref": "#/components/requestBodies/Pet" | ||
responses: | ||
'400': | ||
description: Invalid ID supplied | ||
'404': | ||
description: Pet not found | ||
'405': | ||
description: Validation exception | ||
security: | ||
- petstore_auth: | ||
- write:pets | ||
- read:pets | ||
"/pets/{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: | ||
$ref: "#/components/schemas/Id" | ||
responses: | ||
'200': | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
"$ref": "#/components/schemas/Pet" | ||
'400': | ||
description: Invalid ID supplied | ||
'404': | ||
description: Pet not found | ||
'418': | ||
description: teapot response | ||
content: | ||
application/json: | ||
schema: | ||
"$ref": "#/components/schemas/Pet" | ||
default: | ||
description: default response | ||
content: | ||
application/json: | ||
schema: | ||
required: | ||
- id | ||
- code | ||
- message | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string | ||
security: | ||
- api_key: [] | ||
put: | ||
tags: | ||
- pet | ||
summary: Updates a pet in the store with form data | ||
description: '' | ||
operationId: updatePetWithForm | ||
parameters: | ||
- name: petId | ||
in: path | ||
description: ID of pet that needs to be updated | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
type: object | ||
properties: | ||
name: | ||
description: Updated name of the pet | ||
type: string | ||
status: | ||
description: Updated status of the pet | ||
type: string | ||
responses: | ||
'405': | ||
description: Invalid input | ||
security: | ||
- petstore_auth: | ||
- write:pets | ||
- read:pets | ||
delete: | ||
tags: | ||
- pet | ||
summary: Deletes a pet | ||
description: '' | ||
operationId: deletePet | ||
parameters: | ||
- name: api_key | ||
in: header | ||
required: false | ||
schema: | ||
type: string | ||
- name: petId | ||
in: path | ||
description: Pet id to delete | ||
required: true | ||
schema: | ||
$ref: "#/components/schemas/Id" | ||
responses: | ||
'400': | ||
description: Invalid ID supplied | ||
'404': | ||
description: Pet not found | ||
security: | ||
- petstore_auth: | ||
- write:pets | ||
- read:pets | ||
externalDocs: | ||
description: Find out more about Swagger | ||
url: http://swagger.io | ||
servers: | ||
- url: https://petstore.swagger.io/v2 | ||
- url: http://petstore.swagger.io/v2 | ||
components: | ||
requestBodies: | ||
UserArray: | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
"$ref": "#/components/schemas/User" | ||
description: List of user object | ||
required: true | ||
Pet: | ||
content: | ||
application/json: | ||
schema: | ||
"$ref": "#/components/schemas/Pet" | ||
description: Pet object that needs to be added to the store | ||
required: true | ||
securitySchemes: | ||
petstore_auth: | ||
type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: http://petstore.swagger.io/oauth/dialog | ||
scopes: | ||
write:pets: modify pets in your account | ||
read:pets: read your pets | ||
api_key: | ||
type: apiKey | ||
name: api_key | ||
in: header | ||
schemas: | ||
Id: | ||
type: integer | ||
format: int64 | ||
Order: | ||
type: object | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
petId: | ||
$ref: "#/components/schemas/Id" | ||
quantity: | ||
type: integer | ||
format: int32 | ||
shipDate: | ||
type: string | ||
format: date-time | ||
status: | ||
type: string | ||
description: Order Status | ||
enum: | ||
- placed | ||
- approved | ||
- delivered | ||
complete: | ||
type: boolean | ||
default: false | ||
xml: | ||
name: Order | ||
Category: | ||
type: object | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
name: | ||
type: string | ||
xml: | ||
name: Category | ||
User: | ||
type: object | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
username: | ||
type: string | ||
firstName: | ||
type: string | ||
lastName: | ||
type: string | ||
email: | ||
type: string | ||
password: | ||
type: string | ||
phone: | ||
type: string | ||
userStatus: | ||
type: integer | ||
format: int32 | ||
description: User Status | ||
xml: | ||
name: User | ||
Tag: | ||
type: object | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
name: | ||
type: string | ||
xml: | ||
name: Tag | ||
Pet: | ||
type: object | ||
required: | ||
- name | ||
- photoUrls | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
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 |
Oops, something went wrong.