Skip to content

Instantly share code, notes, and snippets.

@raulanatol
Created May 10, 2018 15:26
Show Gist options
  • Save raulanatol/fd196bea83ea931e5e50843cd5373f35 to your computer and use it in GitHub Desktop.
Save raulanatol/fd196bea83ea931e5e50843cd5373f35 to your computer and use it in GitHub Desktop.
Componets Object Example (OAS) - YAML
components:
schemas:
Category:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
parameters:
skipParam:
name: skip
in: query
description: number of items to skip
required: true
schema:
type: integer
format: int32
limitParam:
name: limit
in: query
description: max records to return
required: true
schema:
type: integer
format: int32
responses:
NotFound:
description: Entity not found.
IllegalInput:
description: Illegal input for operation.
GeneralError:
description: General Error
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralError'
securitySchemes:
api_key:
type: apiKey
name: api_key
in: header
petstore_auth:
type: oauth2
flows:
implicit:
authorizationUrl: http://example.org/api/oauth/dialog
scopes:
write:pets: modify pets in your account
read:pets: read your pets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment