ibm-openapi-validator
Version:
Configurable and extensible validator/linter for OpenAPI documents
213 lines (212 loc) • 5.45 kB
YAML
openapi: 3.1.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: apiteam@swagger.io
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:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: " "
operationId: " "
requestBody:
$ref: "#/components/requestBodies/Pet"
x-codegen-request-body-name: body
responses:
"405":
description: Invalid input
security:
- petstore_auth:
- write:pets
- read:pets
put:
tags:
- pet
summary: Update an existing pet
description: put new data for existing pet
operationId: " "
requestBody:
$ref: "#/components/requestBodies/Pet"
x-codegen-request-body-name: body
responses:
"400":
description: Invalid ID supplied
"404":
description: Pet not found
"405":
description: Validation exception
security:
- petstore_auth:
- write:pets
- read:pets
/pet/find_by_status:
get:
tags:
- pet
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated strings
operationId: find_pets_by_status
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
required: true
explode: true
schema:
type: array
minItems: 0
maxItems: 20
items:
type: string
enum:
- available
- pending
- sold
default: available
responses:
"200":
description: successful operation
content:
application/xml:
schema:
type: array
minItems: 0
maxItems: 20
items:
$ref: "#/components/schemas/Pet"
application/json:
schema:
type: array
minItems: 0
maxItems: 20
items:
$ref: "#/components/schemas/Pet"
"400":
description: Invalid status value
security:
- petstore_auth:
- write:pets
- read:pets
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: http://petstore.swagger.io/v2
components:
requestBodies:
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:
Category:
type: object
properties:
id:
type: integer
format: int64
minimum: 0
maximum: 1024
name:
type: string
description: string
Tag:
type: object
description: string
properties:
id:
type: integer
format: int64
minimum: 0
maximum: 1024
description: string
name:
type: string
description: string
Pet:
type: object
description: string
required:
- name
- photo_urls
- tags
- status
properties:
id:
type: integer
format: int64
minimum: 0
maximum: 1024
description: string
category:
$ref: "#/components/schemas/Category"
description: 'This ref sibling should cause an error'
name:
type: string
example: doggie
description: string
photo_urls:
type: array
description: string
minItems: 0
maxItems: 20
items:
type: string
tags:
type: array
description: string
minItems: 0
maxItems: 20
items:
$ref: "#/components/schemas/Tag"
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
UnusedString:
description: string
type: string