Skip to content

Instantly share code, notes, and snippets.

@wshirey
Last active March 12, 2017 02:43
Show Gist options
  • Save wshirey/b6b9964506153808d747d2e5b74571dd to your computer and use it in GitHub Desktop.
Save wshirey/b6b9964506153808d747d2e5b74571dd to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: '1.0.0'
title: Swagger Petstore (Simple)
description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
termsOfService: http://helloreverb.com/terms/
contact:
name: Swagger API team
email: foo@example.com
url: http://swagger.io
license:
name: MIT
url: http://opensource.org/licenses/MIT
host: petstore.swagger.io
basePath: /api
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/pets:
post:
description: Creates a new pet in the store. Duplicates are allowed
operationId: addPet
produces:
- application/json
parameters:
- name: pet
in: body
description: Pet to add to the store
required: true
schema:
$ref: '#/definitions/newPet'
responses:
'200':
description: OK
definitions:
newPet:
type: object
required:
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
test3:
type: array
enum: ["third", "time", "charm"]
items:
type: string
test2:
type: array
enum: ["some", "values", "here"]
test:
type: array
items:
type: string
enum: [1,2,3, "foo", "bar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment