From ab4639fd087f4349a9880e9a5e2a196586dd1f89 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 12 Feb 2022 13:55:20 -0600 Subject: updated example docs output --- example/lazybones-test-docs.md | 47 ++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/example/lazybones-test-docs.md b/example/lazybones-test-docs.md index 12effa8..ab4c2b1 100644 --- a/example/lazybones-test-docs.md +++ b/example/lazybones-test-docs.md @@ -1,24 +1,36 @@ # Lazybones Demo App - v0.0.0 Just an API that defines some endpoints. These - endpoints aren't meant to accomplish anything. merely to test out + endpoints aren't meant to accomplish anything. Merely testing out the lazybones HTTP routing framework. ## Endpoints +### POST /crapshoot +*text/plain* + +Authorization Required: + +> Randomly decides that the request is authorized + + + +Echos back 'You made it' if the request was authorized + ### POST /hello/:who: *text/plain* Route Variables: - WHO - Authorization Required: > Request is authorized if it contains the right TESTAPPSESSION > cookie. Obtain such a cookie by posting to the /login endpoint. -Post something to hello who + + +Echo's back 'Hello WHO, I got your message BODY' where BODY is the post body. ### GET /hello/:who: *text/plain* @@ -27,11 +39,14 @@ Route Variables: - WHO -Just says hello to WHO + +Echos back Hello WHO ### POST /login *text/plain* + + Dummy login endpoint for returning a session cookie. Always returns the "true" and sends a set-cookie header, setting 'testappsession' to 'coolsessionbro'. @@ -41,29 +56,31 @@ Dummy login endpoint for returning a session cookie. Always returns Route Variables: -- PERSON: A Person Instance +- PERSON: ID of a person + Returns a json representation of the person. -### POST /search +### GET /random/:lo:/:hi: *text/plain* -Authorization Required: +Route Variables: + +- LO: An Integer +- HI: An Integer -> Randomly decides that the request is authorized -Echo the search parameters in a nice list, but also has a post-body +Echo back a random number between lo and hi ### GET /search *text/plain* -Echo the search parameters in a nice list. -### GET /search/:category: -*text/plain* -Route Variables: +Documented Query Parameters: + +- name: A String +- age: An Integer -- CATEGORY: An Integer -Echo the search back, but in a specific category \ No newline at end of file +Echo the search parameters in a nice list. \ No newline at end of file -- cgit v1.2.3