aboutsummaryrefslogtreecommitdiff
path: root/example/lazybones-example.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'example/lazybones-example.lisp')
-rw-r--r--example/lazybones-example.lisp15
1 files changed, 13 insertions, 2 deletions
diff --git a/example/lazybones-example.lisp b/example/lazybones-example.lisp
index 88a58a1..5eb00d9 100644
--- a/example/lazybones-example.lisp
+++ b/example/lazybones-example.lisp
@@ -58,7 +58,7 @@
the \"true\" and sends a set-cookie header, setting 'testappsession'
to 'coolsessionbro'."
(print (lzb:request-body)) ; dummy implementation, prints post body to stdout
- (setf (lzb:response-cookie "testappsession") "coolsessionbro")
+ (lzb:set-response-cookie "testappsession" "coolsessionbro" :path "/" :domain "localhost")
"true")
@@ -121,6 +121,17 @@
(defendpoint* :get "/person/:person person-by-id:" ()
(:content-type "application/json") ; override the app's default content type for HTTP responses
- "Returns a json representation of the person."
+ "Returns a json representation of the [Person](#person)."
(jonathan:to-json person))
+(lzb::set-definition
+ "Person" "#person"
+ "An instance of person. As JSON, it looks like:
+
+ {
+ \"NAME\" : string ,
+ \"OCCUPATION\" : string ,
+ \"ID\" : integer
+ }
+
+")