Skip to content

Instantly share code, notes, and snippets.

@yewton
Last active December 21, 2015 12:29
Show Gist options
  • Save yewton/de73d1d1fd5695731e7d to your computer and use it in GitHub Desktop.
Save yewton/de73d1d1fd5695731e7d to your computer and use it in GitHub Desktop.
test
{
"swagger": "2.0",
"info": {
"description": "",
"version": "1.0.0",
"title": "Swagger Petstore"
},
"host": "petstore.swagger.io",
"basePath": "/v2",
"schemes": [
"http"
],
"paths": {
"/int": {
"get": {
"description": "",
"produces": [
"text/plain"
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "integer",
"format": "int64"
}
}
}
}
},
"/string": {
"get": {
"description": "",
"produces": [
"text/plain"
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
}
}
}
},
"/object": {
"get": {
"description": "",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
}
swagger: '2.0'
info:
description: >
This is a sample server Petstore server.
[Learn about Swagger](http://swagger.io) or join the IRC channel `#swagger`
on irc.freenode.net.
For this sample, you can use the api key `special-key` to test the
authorization filters
version: 1.0.0
title: Swagger Petstore
termsOfService: 'http://helloreverb.com/terms/'
contact:
name: [email protected]
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: petstore.swagger.io
basePath: /v2
schemes:
- http
paths:
/int64:
get:
description: ''
produces:
- text/plain
responses:
'200':
description: success
examples:
text/plain: 123
schema:
type: integer
format: int64
'405':
description: Invalid input
/string:
get:
description: ''
produces:
- text/plain
responses:
'200':
description: success
examples:
text/plain: "plain text"
schema:
type: string
'405':
description: Invalid input
definitions:
User:
type: object
properties:
id:
type: integer
format: int64
username:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
password:
type: string
phone:
type: string
userStatus:
type: integer
format: int32
description: User Status
Category:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
Pet:
type: object
required:
- name
- photoUrls
properties:
id:
type: integer
format: int64
category:
$ref: '#/definitions/Category'
name:
type: string
example: doggie
photoUrls:
type: array
items:
type: string
tags:
type: array
items:
$ref: '#/definitions/Tag'
status:
type: string
description: pet status in the store
Tag:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
Order:
type: object
properties:
id:
type: integer
format: int64
petId:
type: integer
format: int64
quantity:
type: integer
format: int32
shipDate:
type: string
format: date-time
status:
type: string
description: Order Status
complete:
type: boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment