Skip to content

Instantly share code, notes, and snippets.

@fabiohecht
Created October 27, 2023 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiohecht/10428bfa704e1a712204f516f87d8c4e to your computer and use it in GitHub Desktop.
Save fabiohecht/10428bfa704e1a712204f516f87d8c4e to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: 1.0.6
title: Swagger Petstore
host: petstore.swagger.io
basePath: "/api/v2"
schemes:
- https
- http
paths:
"/pet":
post:
summary: Add a new pet to the store
operationId: addPet
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
"$ref": "#/definitions/Pet"
responses:
'405':
description: Invalid input
definitions:
Pet:
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
name:
type: string
example: doggie
photoUrls:
type: array
xml:
wrapped: true
items:
type: string
xml:
name: photoUrl
status:
type: string
description: pet status in the store
enum:
- available
- pending
- sold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment