diff --git a/advanced/composing_routers.html b/advanced/composing_routers.html index ae783930..6581151d 100644 --- a/advanced/composing_routers.html +++ b/advanced/composing_routers.html @@ -771,7 +771,7 @@ diff --git a/advanced/configuring_routers.html b/advanced/configuring_routers.html index 0a6443b0..db2e3243 100644 --- a/advanced/configuring_routers.html +++ b/advanced/configuring_routers.html @@ -766,7 +766,7 @@ diff --git a/advanced/dev_workflow.html b/advanced/dev_workflow.html index adfcd715..87c658b1 100644 --- a/advanced/dev_workflow.html +++ b/advanced/dev_workflow.html @@ -825,7 +825,7 @@ diff --git a/advanced/different_routers.html b/advanced/different_routers.html index 487953b8..d12d7f27 100644 --- a/advanced/different_routers.html +++ b/advanced/different_routers.html @@ -769,7 +769,7 @@ diff --git a/advanced/index.html b/advanced/index.html index e639161c..c567f5cb 100644 --- a/advanced/index.html +++ b/advanced/index.html @@ -721,7 +721,7 @@ diff --git a/advanced/route_validation.html b/advanced/route_validation.html index c4858f03..8238b233 100644 --- a/advanced/route_validation.html +++ b/advanced/route_validation.html @@ -861,7 +861,7 @@ diff --git a/basics/index.html b/basics/index.html index 92b67148..e0f589dd 100644 --- a/basics/index.html +++ b/basics/index.html @@ -724,7 +724,7 @@ diff --git a/basics/name_based_routing.html b/basics/name_based_routing.html index 620383eb..55e898a5 100644 --- a/basics/name_based_routing.html +++ b/basics/name_based_routing.html @@ -784,7 +784,7 @@ diff --git a/basics/path_based_routing.html b/basics/path_based_routing.html index ca01542f..cbfaec4e 100644 --- a/basics/path_based_routing.html +++ b/basics/path_based_routing.html @@ -742,7 +742,7 @@ diff --git a/basics/route_conflicts.html b/basics/route_conflicts.html index 5bbc80d8..eaafbc0d 100644 --- a/basics/route_conflicts.html +++ b/basics/route_conflicts.html @@ -759,7 +759,7 @@ diff --git a/basics/route_data.html b/basics/route_data.html index 22a20d9b..b3b034ef 100644 --- a/basics/route_data.html +++ b/basics/route_data.html @@ -783,7 +783,7 @@ diff --git a/basics/route_data_validation.html b/basics/route_data_validation.html index 71ed215c..14b030e3 100644 --- a/basics/route_data_validation.html +++ b/basics/route_data_validation.html @@ -835,7 +835,7 @@ diff --git a/basics/route_syntax.html b/basics/route_syntax.html index 5c33287a..6a0beab4 100644 --- a/basics/route_syntax.html +++ b/basics/route_syntax.html @@ -769,7 +769,7 @@ diff --git a/basics/router.html b/basics/router.html index 3f67f9a5..277a4bf1 100644 --- a/basics/router.html +++ b/basics/router.html @@ -752,7 +752,7 @@ diff --git a/coercion/clojure_spec_coercion.html b/coercion/clojure_spec_coercion.html index 020ecae6..4d30a9ee 100644 --- a/coercion/clojure_spec_coercion.html +++ b/coercion/clojure_spec_coercion.html @@ -754,7 +754,7 @@ diff --git a/coercion/coercion.html b/coercion/coercion.html index 16014a2d..c205c4a9 100644 --- a/coercion/coercion.html +++ b/coercion/coercion.html @@ -849,7 +849,7 @@ diff --git a/coercion/data_spec_coercion.html b/coercion/data_spec_coercion.html index 5eb207c3..4f815bd8 100644 --- a/coercion/data_spec_coercion.html +++ b/coercion/data_spec_coercion.html @@ -748,7 +748,7 @@ diff --git a/coercion/index.html b/coercion/index.html index 0cfe4fca..2a5b2391 100644 --- a/coercion/index.html +++ b/coercion/index.html @@ -721,7 +721,7 @@ diff --git a/coercion/schema_coercion.html b/coercion/schema_coercion.html index 2239548f..758c3a09 100644 --- a/coercion/schema_coercion.html +++ b/coercion/schema_coercion.html @@ -749,7 +749,7 @@ diff --git a/development.html b/development.html index 771db035..0190b666 100644 --- a/development.html +++ b/development.html @@ -739,7 +739,7 @@ lein test diff --git a/faq.html b/faq.html index b702936d..3639072e 100644 --- a/faq.html +++ b/faq.html @@ -817,7 +817,7 @@ diff --git a/frontend/basics.html b/frontend/basics.html index aefd9417..fc6e4bbd 100644 --- a/frontend/basics.html +++ b/frontend/basics.html @@ -716,7 +716,7 @@ diff --git a/frontend/browser.html b/frontend/browser.html index cf01a9a3..ea4b569d 100644 --- a/frontend/browser.html +++ b/frontend/browser.html @@ -716,7 +716,7 @@ diff --git a/frontend/controllers.html b/frontend/controllers.html index a7219c2a..9f5e1d19 100644 --- a/frontend/controllers.html +++ b/frontend/controllers.html @@ -716,7 +716,7 @@ diff --git a/frontend/index.html b/frontend/index.html index 92171486..b2e3027a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -720,7 +720,7 @@ diff --git a/index.html b/index.html index 520c18ee..399df241 100644 --- a/index.html +++ b/index.html @@ -839,7 +839,7 @@ diff --git a/interceptors.html b/interceptors.html index f7fdb350..e4507350 100644 --- a/interceptors.html +++ b/interceptors.html @@ -770,7 +770,7 @@ diff --git a/performance.html b/performance.html index 4cce1d09..446e4be7 100644 --- a/performance.html +++ b/performance.html @@ -795,7 +795,7 @@ diff --git a/ring/coercion.html b/ring/coercion.html index ed965104..b4551003 100644 --- a/ring/coercion.html +++ b/ring/coercion.html @@ -850,7 +850,7 @@ diff --git a/ring/compiling_middleware.html b/ring/compiling_middleware.html index cecad65c..9c01d5d6 100644 --- a/ring/compiling_middleware.html +++ b/ring/compiling_middleware.html @@ -777,7 +777,7 @@ diff --git a/ring/data_driven_middleware.html b/ring/data_driven_middleware.html index 5e795ce3..9bc5bc82 100644 --- a/ring/data_driven_middleware.html +++ b/ring/data_driven_middleware.html @@ -836,7 +836,7 @@ diff --git a/ring/default_handler.html b/ring/default_handler.html index 154d8d76..88c339c0 100644 --- a/ring/default_handler.html +++ b/ring/default_handler.html @@ -783,7 +783,7 @@ diff --git a/ring/dynamic_extensions.html b/ring/dynamic_extensions.html index 0c7f6504..1a0e6a22 100644 --- a/ring/dynamic_extensions.html +++ b/ring/dynamic_extensions.html @@ -752,7 +752,7 @@ diff --git a/ring/index.html b/ring/index.html index 942b9fde..fea11d56 100644 --- a/ring/index.html +++ b/ring/index.html @@ -727,7 +727,7 @@ diff --git a/ring/reverse_routing.html b/ring/reverse_routing.html index 6c02997f..00efbd41 100644 --- a/ring/reverse_routing.html +++ b/ring/reverse_routing.html @@ -748,7 +748,7 @@ diff --git a/ring/ring.html b/ring/ring.html index 9da6bafe..7112552b 100644 --- a/ring/ring.html +++ b/ring/ring.html @@ -806,7 +806,7 @@ diff --git a/ring/route_data_validation.html b/ring/route_data_validation.html index 898e7ab6..2930005e 100644 --- a/ring/route_data_validation.html +++ b/ring/route_data_validation.html @@ -960,7 +960,7 @@ diff --git a/ring/static.html b/ring/static.html index f59aa5e1..9b8f70d5 100644 --- a/ring/static.html +++ b/ring/static.html @@ -784,7 +784,7 @@ diff --git a/ring/swagger.html b/ring/swagger.html index cce2a985..425d82ca 100644 --- a/ring/swagger.html +++ b/ring/swagger.html @@ -692,7 +692,7 @@ :swagger -map of any swagger-data. Must have :id (keyword or sequence of keywords) to identify the api +map of any swagger-data. Can have :id (keyword or sequence of keywords) to identify the api :no-doc @@ -775,7 +775,7 @@

Examples

Simple example

@@ -791,15 +791,14 @@ ["/pong" {:post (constantly "pong")}]] ["/swagger.json" {:get {:no-doc true - :handler (swagger/create-swagger-handler)}}]] - {:data {:swagger {:id ::api}}}) ;; for all routes + :handler (swagger/create-swagger-handler)}}]]) (swagger-ui/create-swagger-ui-handler {:path "/"})))

The generated swagger spec:

(app {:request-method :get :uri "/swagger.json"})
 ;{:status 200
 ; :body {:swagger "2.0"
-;        :x-id #{:user/api}
+;        :x-id #{:reitit.swagger/default}
 ;        :paths {"/api/ping" {:get {}}
 ;                "/api/pong" {:post {}}}}}
 
@@ -836,7 +835,6 @@ (ring/ring-handler (ring/router ["/api" - {:swagger {:id ::math}} ["/swagger.json" {:get {:no-doc true @@ -890,8 +888,8 @@

http://localhost:3000 should render now the swagger-ui:

Swagger-ui

-

Advanced

-

Route data in path [:swagger :id] can be either a keyword or a sequence of keywords. This enables one route to be part of multiple swagger apis. Normal route data scoping rules rules apply.

+

Multiple swagger apis

+

There can be multiple swagger apis within a router. Each route can be part of 0..n swagger apis. Swagger apis are identified by value in route data under key path [:swagger :id]. It can be either a keyword or a sequence of keywords. Normal route data scoping rules rules apply.

Example with: