-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
267 additions
and
105 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "1.0.0", | ||
"title": "Swagger Petstore", | ||
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", | ||
"termsOfService": "http://swagger.io/terms/", | ||
"contact": { | ||
"name": "Swagger API Team", | ||
"email": "[email protected]", | ||
"url": "http://madskristensen.net" | ||
}, | ||
"license": { | ||
"name": "MIT", | ||
"url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" | ||
} | ||
}, | ||
"host": "petstore.swagger.io", | ||
"basePath": "/api", | ||
"schemes": [ | ||
"http" | ||
], | ||
"consumes": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"produces": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"paths": { | ||
"/pets": { | ||
"post": { | ||
"description": "Creates a new pet in the store. Duplicates are allowed", | ||
"operationId": "addPet", | ||
"parameters": [ | ||
{ | ||
"name": "pet", | ||
"in": "body", | ||
"description": "Pet to add to the store", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/NewPet" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "pet response", | ||
"schema": { | ||
"$ref": "#/definitions/Pet" | ||
} | ||
}, | ||
"default": { | ||
"description": "unexpected error", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Pet": { | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/NewPet" | ||
}, | ||
{ | ||
"required": [ | ||
"id" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"NewPet": { | ||
"type": "object", | ||
"required": [ | ||
"name" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"tag": { | ||
"type": "string" | ||
}, | ||
"age": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"Error": { | ||
"type": "object", | ||
"required": [ | ||
"code", | ||
"message" | ||
], | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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
Oops, something went wrong.