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
Hey there,
Lately, I decided to change to reitit for my api. It was working fine until few challenges came up to me. First, I wanted to use specs to keep my api clojure-ish as possible. Hence, I created my specs and wrote a spec collection of a map. The map has the keys in the order I wish them to be. However, swagger displays the specs model example out of wack (order). Why is that? Also, it messes up the results keywords order when a call to the database is made.
The text was updated successfully, but these errors were encountered:
Clojure maps are unordered, so Clojure (sometimes) forgets the order of keys you had in the source. It's a bit annoying in the Swagger docs but unfortunately I don't think there's an easy way to control the order of keys in map specs.
Actually not, that was about route order. But as Miikka said, map schemas/specs are unordered, so can't control that. There might be a new model-library coming soon to fix this.
Hey there,
Lately, I decided to change to reitit for my api. It was working fine until few challenges came up to me. First, I wanted to use specs to keep my api clojure-ish as possible. Hence, I created my specs and wrote a spec collection of a map. The map has the keys in the order I wish them to be. However, swagger displays the specs model example out of wack (order). Why is that? Also, it messes up the results keywords order when a call to the database is made.
The text was updated successfully, but these errors were encountered: