From ec4a22a539b555616e09a6db2224dc0231cce3f5 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Fri, 8 Mar 2019 08:48:37 +0200 Subject: [PATCH] added :basePath example, relates to #233 --- doc/ring/swagger.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/ring/swagger.md b/doc/ring/swagger.md index 34782be4..bdc98f71 100644 --- a/doc/ring/swagger.md +++ b/doc/ring/swagger.md @@ -129,7 +129,7 @@ Another way to serve the swagger-ui is using the [default handler](default_handl ### More complete example * `clojure.spec` coercion -* swagger data (`:tags`, `:produces`, `:summary`) +* swagger data (`:tags`, `:produces`, `:summary`, `:basePath`) * swagger-spec served from `"/swagger.json"` * swagger-ui mounted to `"/"` * 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 [["/swagger.json" {:get {:no-doc true - :swagger {:info {:title "my-api"}} + :swagger {:info {:title "my-api"} + :basePath "/"} ;; prefix for all paths :handler (swagger/create-swagger-handler)}}] ["/files"