Skip to content

Commit

Permalink
change default ui-location, prepare for 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ikitommi committed Apr 21, 2015
1 parent 252df0d commit 1db36ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 0.19.7-SNAPSHOT (xx.4.2015)
## 0.20.0-SNAPSHOT (xx.4.2015)

- welcome back the `Info` schema in `ring.swagger.swagger2-schema`!
- ring-swagger defaults in `swagger-json` are deep-merged in instead of plain merge.
- **breaking**: default spec-location has changed from `/api/api-docs` to `/swagger.json` in `ring.swagger.ui`

## 0.19.6 (19.4.2015)

Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject metosin/ring-swagger "0.19.7-SNAPSHOT"
(defproject metosin/ring-swagger "0.20.0-SNAPSHOT"
:description "Swagger Spec for Ring Apps"
:url "https://github.com/metosin/ring-swagger"
:license {:name "Eclipse Public License"
Expand Down
2 changes: 1 addition & 1 deletion src/ring/swagger/ui.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
(second (re-find (re-pattern (str "^" root "[/]?(.*)")) uri)))

(defn conf-js [req {:keys [swagger-docs oauth2]
:or {swagger-docs "/api/api-docs" #_"/swagger.json"
:or {swagger-docs "/swagger.json"
oauth2 nil}}]
(let [swagger-docs (swagger/join-paths (swagger/context req) swagger-docs)
conf (cond-> {:url swagger-docs}
Expand Down
2 changes: 1 addition & 1 deletion test/ring/swagger/ui_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

(fact "with default parameters"
(conf-js nil {})
=> "window.API_CONF = {\"url\":\"/api/api-docs\"};")
=> "window.API_CONF = {\"url\":\"/swagger.json\"};")

(fact "with swagger-docs & oauth2 set"
(conf-js nil {:swagger-docs "/lost"
Expand Down

0 comments on commit 1db36ea

Please sign in to comment.