Last active
January 15, 2016 22:25
-
-
Save Lull3rSkat3r/3f01a102fcfaf5602c7f to your computer and use it in GitHub Desktop.
A collection of code snippets for the "Words Of Wisdom" API.
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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "0.0.1", | |
"title": "Words Of Wisdom", | |
"description": "An API for recording and reflecting quotes.", | |
"contact": { | |
"name": "Corey Stubbs", | |
"email": "cstubbs@us.ibm.com", | |
"url": "https://github.com/Lull3rSkat3r" | |
} | |
}, | |
"paths": { | |
"/random": { | |
"get": { | |
"description": "Returns a random quote", | |
"responses": { | |
"200": { | |
"description": "A string containing the quote", | |
"schema": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"/quote": { | |
"post": { | |
"description": "Adds a quote", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"description": "The quote to be added to the collection", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"201": { | |
"description": "Returns the id of the newly create quote, which can be used to access the quote", | |
"schema": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"/quote/{id}": { | |
"get": { | |
"description": "Gets the quote", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The quote to be added to the collection", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"201": { | |
"description": "Returns the id of the quote, which can be used to access the quote", | |
"schema": { | |
"type": "integer" | |
} | |
} | |
} | |
}, | |
"put": { | |
"description": "Updates the content of quote.", | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"description": "The quote to be added to the collection", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"description": "The new value of the quote", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"204": { | |
"description": "The quote has successfully been updated." | |
} | |
} | |
} | |
} | |
} | |
} |
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
swagger: '2.0' | |
info: | |
version: 0.0.1 | |
title: 'Words Of Wisdom' | |
description: An API for recording and reflecting quotes. | |
contact: | |
name: Corey Stubbs | |
email: cstubbs@us.ibm.com | |
url: 'https://github.com/Lull3rSkat3r' | |
paths: | |
/random: | |
get: | |
description: Returns a random quote | |
responses: | |
'200': | |
description: A string containing the quote | |
schema: | |
type: string | |
/quote: | |
post: | |
description: Adds a quote | |
parameters: | |
- name: body | |
in: body | |
description: The quote to be added to the collection | |
required: true | |
schema: | |
type: string | |
responses: | |
'201': | |
description: Returns the id of the newly create quote, which can be used to access the quote | |
schema: | |
type: integer | |
/quote/{id}: | |
get: | |
description: Gets the quote | |
parameters: | |
- name: id | |
in: path | |
description: The quote to be added to the collection | |
required: true | |
type: string | |
responses: | |
'201': | |
description: Returns the id of the quote, which can be used to access the quote | |
schema: | |
type: integer | |
put: | |
description: Updates the content of quote. | |
parameters: | |
- name: id | |
in: path | |
description: The quote to be added to the collection | |
required: true | |
type: string | |
- name: body | |
in: body | |
description: The new value of the quote | |
required: true | |
schema: | |
type: string | |
responses: | |
'204': | |
description: The quote has successfully been updated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment