@dharrigan with spec:
(s/def ::datetime (st/spec {:spec ISO8601, :swagger/format "date-time"}))
with malli:
(def DateTime [:re {:swagger/format "date-time"} ISO8601])
ooh, thank you. will try - Malli is looking really good!
Hello folks, I am new to reitit and I canβt make static files working, any idea what I am doing wrong ?
(def router
(rr/router
["/" {:get handler}]
["/assets/*" (rr/create-resource-handler {:path "resources/public"})]))
when I (r/match-by-path router "/assets/main.css")
with main.css
in the resources/public/
folder, nothing is found*edit : I am just stupid as fuck
(def router
(rr/router
[["/" {:get handler}]
["/assets/*" (rr/create-resource-handler)]]))
forgot the []
wrapper
Hi all π How do I make a route like the following?
/users ;; GET POST
/users/:id ;; GET POST PUT DELETE
I keep getting Too many redirects
when calling GET
on the /users
route. It is defined as follows:
["/users"
["" {:get get-users
:post save-user}]
["/:id" {:get get-user
:put update-user
:delete delete-user}]]
Hm, somehow it is working after I call POST
first? :thinking_face:
sounds like a bug in redirect-trailing-slash-handler
.
actually, no. it should always match the first route with /users
.
Somehow I canβt replicate it anymore? Could it be that the browser was caching the status code? :thinking_face: Iβll investigate further and create an issue if necessary. Thanks @ikitommi.
migrated to using malli - lovely π
one thing that caught me out, and if you're using swagger and enums, you have to specify the type directly, otherwise it wont' render the list of valid choices on the swagger ui, i.e., [:enum {:swagger/type "enum"}.....]
PR most welcome on that.
π
PR ready for you π