Fork me on GitHub
#reitit
<
2020-03-26
>
vlaaad10:03:26

quick question: how can I mark query parameter as deprecated in swagger?

vlaaad10:03:52

I tried this:

{(ds/opt :include-legacy-information) (st/spec {:spec boolean? :description "Deprecated" :deprecated true})}
but this entry is not propagated to swagger.json…

ikitommi10:03:23

@vlaaad is there a deprecated key in swagger?

ikitommi10:03:47

you can anyway push any data to swagger definitions by namespacing them with swagger, e.g. :swagger/deprecated true

vlaaad10:03:58

yeah, just found it out browsing the code, thanks!

vlaaad10:03:35

@ikitommi there is deprecated in swagger: https://swagger.io/docs/specification/describing-parameters/ (ctrl+f for deprecated)

👌 4
vlaaad13:03:54

ouch. deprecated is a swagger 3.0 feature, reitit supports 2.0

Drew Verlee15:03:40

Whats the correct way to get the current uri on itial load? we want to have users routed to the page they were last on. do i just call match by path on (.. js/document -location -href )?