oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
525 stars 42 forks source link

add way to pass extra options when fetching the swagger #123

Closed AndreaCrotti closed 2 years ago

AndreaCrotti commented 2 years ago

This allows to pass extra options to the http/get that does the fetching of the swagger file.

TODO / questions

oliyh commented 2 years ago

Thanks, we should implement this in all http library integrations for uniformity Don't worry too much about a test.

Cheers

AndreaCrotti commented 2 years ago

Ok I've added it everywhere @oliyh

AndreaCrotti commented 2 years ago

Only issue with this change is that it's now positional, another option would be instead of doing

[url & [opts get-swagger-opts]]

just put the swagger-opts inside the opts with something like

[url & [{:keys [... swagger-opts] :as opts}]

And then I would have to dissoc swagger-opts when passing it around though. Not sure which one is the best option, I guess if we are not going to add anything else anyway the positional solution might be fine.

oliyh commented 2 years ago

This is now in 0.1.19-SNAPSHOT