Skip to content

Instantly share code, notes, and snippets.

@timothycrosley
Created March 11, 2016 07:05
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 timothycrosley/fdf44bd9c2a8d8052916 to your computer and use it in GitHub Desktop.
Save timothycrosley/fdf44bd9c2a8d8052916 to your computer and use it in GitHub Desktop.
Auto generated documentation
{"404": "The API call you tried to make was not defined. Here's a definition of the API to help you get going :)",
"documentation": {
"overview": "A basic (single function) API written using Hug",
"handlers": {
"/happy_birthday": {
"GET": {
"usage": "Says happy birthday to a user",
"examples": [
"http://localhost:8000/happy_birthday?name=HUG&age=1"
],
"outputs": {
"format": "JSON (Javascript Serialized Object Notation)",
"content_type": "application/json"
},
"inputs": {
"name": {
"type": "Basic text / string value"
},
"age": {
"type": "A Whole number"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment