Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "openapi": "3.0.0",
- "info": {
- "version": "1.0.0",
- "title": "Swagger Petstore",
- "license": {
- "name": "MIT"
- }
- },
- "servers": [],
- "paths": {
- "/pets": {
- "post": {
- "summary": "Create a pet",
- "operationId": "createPets",
- "tags": [
- "pets"
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Pet"
- },
- "example": {
- "id": "worldsCutestDog",
- "name": "Simba"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Null response"
- },
- "default": {
- "description": "unexpected error",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Error"
- }
- }
- }
- }
- }
- }
- }
- },
- "components": {
- "schemas": {
- "Pet": {
- "type": "object",
- "required": [
- "id",
- "name"
- ],
- "properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
- "name": {
- "type": "string"
- },
- "tag": {
- "type": "string"
- }
- }
- },
- "Error": {
- "type": "object",
- "required": [
- "code",
- "message"
- ],
- "properties": {
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "message": {
- "type": "string"
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement