Files
redocly-cli/resources/petstore-with-errors.yaml
2023-05-31 12:01:20 +02:00

156 lines
3.6 KiB
YAML

openapi: '3.0.0'
info:
version: 1.0.0
title: Swagger Petstore
description:
$ref: ./description.md
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
tags:
- name: aaa
- name: pets
paths:
/pets?id:
get:
summary: List all pets
operationId: listPets
requestBody:
content:
'application/json':
schema:
type: object
properties:
summary:
type: string
externalValue:
type: number
example:
summary: A foo example
value: { 'foo': 'bar' }
externalValue: 'http://example.org/foo.json'
examples:
foo:
summary: A foo example
value: { 'foo': 'bar' }
externalValue: 'http://example.org/foo.json'
tags:
- pets
parameters:
- name: limit
in: quer
description: How many items to return at one time (max 100)
required: false
schema:
type: integer
format: int32
- name: test
in: path
description: How many items to return at one time (max 100)
required: false
schema:
type: boolean
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Pets'
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Create a pet
description: afasf
operationId: test
tags:
- pets
responses:
'201':
description: Null response
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/pets/{petId}/TesSt:
get:
summary: Info for a specific pet
description: aaa
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: boolean
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
parameters:
anotherParam:
nname: anotherParam
schema:
type: intege
in: query
schemas:
Some:
type: integer
enum:
- 1
- 'adsad'
- 2
Pet:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Pets:
type: array
items:
$ref: '#/components/schemas/Pet'
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string