mirror of
https://github.com/metosin/reitit.git
synced 2025-12-18 08:51:12 +00:00
added :basePath example, relates to #233
This commit is contained in:
parent
72a0ad2a5b
commit
ec4a22a539
1 changed files with 3 additions and 2 deletions
|
|
@ -129,7 +129,7 @@ Another way to serve the swagger-ui is using the [default handler](default_handl
|
||||||
### More complete example
|
### More complete example
|
||||||
|
|
||||||
* `clojure.spec` coercion
|
* `clojure.spec` coercion
|
||||||
* swagger data (`:tags`, `:produces`, `:summary`)
|
* swagger data (`:tags`, `:produces`, `:summary`, `:basePath`)
|
||||||
* swagger-spec served from `"/swagger.json"`
|
* swagger-spec served from `"/swagger.json"`
|
||||||
* swagger-ui mounted to `"/"`
|
* swagger-ui mounted to `"/"`
|
||||||
* set of middleware for content negotiation, exceptions, multipart etc.
|
* set of middleware for content negotiation, exceptions, multipart etc.
|
||||||
|
|
@ -159,7 +159,8 @@ Whole example project is in [`/examples/ring-swagger`](https://github.com/metosi
|
||||||
(ring/router
|
(ring/router
|
||||||
[["/swagger.json"
|
[["/swagger.json"
|
||||||
{:get {:no-doc true
|
{:get {:no-doc true
|
||||||
:swagger {:info {:title "my-api"}}
|
:swagger {:info {:title "my-api"}
|
||||||
|
:basePath "/"} ;; prefix for all paths
|
||||||
:handler (swagger/create-swagger-handler)}}]
|
:handler (swagger/create-swagger-handler)}}]
|
||||||
|
|
||||||
["/files"
|
["/files"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue