Fork me on GitHub
#reitit
<
2019-04-24
>
sfertman14:04:21

Hey, guys. I’m new to reitit and wanted to ask a quick question re spec. Is there a way to differentiate between required and optional body parameters and have it reflected in swagger-ui?

ikitommi17:04:23

@sfertman you can use normal :opt and :opt-un with s/keys or ds/opt with data-specs. Could be added to the docs as examples.

sfertman17:04:52

Thanks @ikitommi, yes, I found that out by tinkering. Would be great if docs had an example. I haven’t play with clojure specs before and thought that spec-ing swagger falls under reitit domain.

ikitommi18:04:23

Would you like to add example(s) to the docs?

sfertman18:04:18

Sure, I can make a pr tonight after work

joshkh19:04:33

i'm sure it's somewhere in the examples, but how can i programatically dispatch a front-end route using reitit?

joshkh19:04:10

something analogous to (pushy/set-token! history fragment)

joshkh20:04:38

i've tried reitit.frontend.history/push-state with the history value from rfe/start! but the url doesn't change and the router doesn't recognise a new match