Created
May 10, 2018 15:22
-
-
Save raulanatol/eda497a39e5fe886cae6d55e0dc844e5 to your computer and use it in GitHub Desktop.
Componets Object Example (OAS) - JSON
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
"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