Open dryewo opened 8 years ago
Sometimes it's necessary to generate a resource URL from a handler function, for example, to provide "location" header. Concatenating strings is not an ideal solution. We can possibly support it by using vendor extension parameter in the spec:
'/hello/{name}': x-path-id: hello-name get: summary: Gets hello
After this it should be possible to call a function to create a URL:
(path-for (:swagger request) :hello-name "Michael")
Challenges:
(:swagger request)
Good existing solution: https://github.com/juxt/bidi
Sometimes it's necessary to generate a resource URL from a handler function, for example, to provide "location" header. Concatenating strings is not an ideal solution. We can possibly support it by using vendor extension parameter in the spec:
After this it should be possible to call a function to create a URL:
Challenges:
(:swagger request)
- is it the best way to access the routing information?Good existing solution: https://github.com/juxt/bidi