You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handing request debug technique - return useful information as a separate key, e.g. :dev-info to share useful information in the response to the request
(defncomplete-gamer-history"Handler function for /gamer/history/complete Arguments: - environment hash-map containing system configuration Returns: - Function that takes the ring hash-map of the http request as an argument"
[environment]
(fn [request]
(let [;; Get the Invoice
gamer (request:body-params)]
;; Ring response hash-map
{:status200:body {:gamer-history (complete-history gamer)
:dev-info invoice}
:headers {}}
#_())))
The routing with reitit verification and open api keys, which includes the :dev-info key as part of the response
(defnroutes"Calls `practicalli.gameboard.api.gamer.handlers/complete-gamer-history` The handler returns a function that takes the request as an argument"
[environment]
["/gamer" {:swagger {:tag ["Gamer API"]}}
["/history"
["/complete"
{:post
{:summary"Complete Gamer history":description"Gather information from all games the Gamer has played";; parameters used for validation and OpenAPI documentation:parameters
{:body
{:customer-uuid uuid?
:email string?
:first_name string?
:last_name string?
:phone_number string?
:is_existing_customer boolean?
:ip_address string?
:billing-address {:street string?
:house-number string?
:postal_code string?
:city string?
:country string?
:addition string?}
:games [{:title string?
:description string?
:software-house string?}]}}
;; responses used for validation and OpenAPI documentation:responses {200 {:body {:is-fraud boolean?
;; :dev-info used for developer information:dev-info map?}}
400 {:body string?}
500 {:body string?}}
:handler (handlers/complete-gamer-history environment)}}]]])
The text was updated successfully, but these errors were encountered:
Developing handlers - understanding data involved
Handing request debug technique - return useful information as a separate key, e.g. :dev-info to share useful information in the response to the request
The routing with reitit verification and open api keys, which includes the
:dev-info
key as part of the responseThe text was updated successfully, but these errors were encountered: