File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 170
170
:path-params [foo :- String]
171
171
identity))
172
172
=> {" /:foo.json" {:get {:parameters {:path {:foo String}}}}})
173
+
174
+ (facts
175
+ (tabular
176
+ (fact " swagger-routes basePath can be changed"
177
+ (let [app (api (swagger-routes ?given-options))]
178
+ (->
179
+ (get* app " /swagger.json" )
180
+ (nth 1 )
181
+ :basePath )
182
+ => ?expected-base-path
183
+ (nth (raw-get* app " /conf.js" ) 1 ) => (str " window.API_CONF = {\" url\" :\" " ?expected-swagger-docs-path " \" };" )))
184
+ ?given-options ?expected-swagger-docs-path ?expected-base-path
185
+ {} " /swagger.json" " /"
186
+ {:data {:basePath " /app" }} " /app/swagger.json" " /app"
187
+ {:data {:basePath " /app" } :options {:ui {:swagger-docs " /imaginary.json" }}} " /imaginary.json" " /app" ))
You can’t perform that action at this time.
0 commit comments