Skip to content

Commit

Permalink
Merge branch 'master' into openapi-support
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Jul 9, 2024
2 parents 0001b2d + 6126853 commit d49828b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/clojure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ jobs:
java-version: '11'
- name: deploy
env:
CLOJARS_USER: ${{ secrets.CLOJARS_USER }}
CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }}
CLOJARS_USER: metosinci
CLOJARS_TOKEN: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}"
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Ambrose Bonnaire-Sergeant"
if [[ "$COMMIT_MSG" == "Release :major" ]]; then
lein release :major
elif [[ "$COMMIT_MSG" == "Release :minor" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT

## 1.0.0 (30.4.2024)

* Fix memory leaks via multimethods caching default dispatch values: https://github.com/metosin/compojure-api/issues/454

## 0.26.2 (1.4.2019)
Expand Down
10 changes: 5 additions & 5 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject metosin/ring-swagger "0.26.3-SNAPSHOT"
(defproject metosin/ring-swagger "1.0.1-SNAPSHOT"
:description "Swagger Spec for Ring Apps"
:url "https://github.com/metosin/ring-swagger"
:license {:name "Eclipse Public License"
Expand Down Expand Up @@ -39,10 +39,10 @@
:username [:gpg :env/clojars_user]
:password [:gpg :env/clojars_token]
:sign-releases false}]
["releases" {:url "https://clojars.org/repo"
:username [:gpg :env/clojars_user]
:password [:gpg :env/clojars_token]
:sign-releases false}]]
["release" {:url "https://clojars.org/repo"
:username [:gpg :env/clojars_user]
:password [:gpg :env/clojars_token]
:sign-releases false}]]
:release-tasks [["clean"]
["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
Expand Down
15 changes: 14 additions & 1 deletion src/ring/swagger/json_schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,9 @@
(defn properties
"Take a map schema and turn them into json-schema properties.
The result is put into collection of same type as input schema.
Thus linked/map should keep the order of items. Returnes nil
Thus linked/map should keep the order of items. Returns nil
if no properties are found."
<<<<<<< HEAD
([schema] (properties schema nil))
([schema opts]
{:pre [(common/plain-map? schema)]}
Expand All @@ -289,6 +290,18 @@
(and v [k v])))]
(if (seq props)
props))))
=======
[schema]
{:pre [(common/plain-map? schema)]}
(let [props (into (empty schema)
(for [[k v] schema
:when (s/specific-key? k)
:let [key-meta (meta k)
k (s/explicit-schema-key k)
v (try->swagger v k key-meta)]]
(and v [k v])))]
(not-empty props)))
>>>>>>> master

(defn additional-properties
"Generates json-schema additional properties from a plain map
Expand Down

0 comments on commit d49828b

Please sign in to comment.