Skip to content

Commit

Permalink
Merge pull request #757 from codonnell/fix-pos-json-schema
Browse files Browse the repository at this point in the history
Fix `pos?` json schema mapping.
  • Loading branch information
ikitommi authored Oct 7, 2022
2 parents 95f263e + a3d12c6 commit 436af54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/malli/json_schema.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
(defmethod accept 'nat-int? [_ _ _ _] {:type "integer", :minimum 0})
(defmethod accept 'float? [_ _ _ _] {:type "number"})
(defmethod accept 'double? [_ _ _ _] {:type "number"})
(defmethod accept 'pos? [_ _ _ _] {:type "number" :exclusiveMininum 0})
(defmethod accept 'pos? [_ _ _ _] {:type "number" :exclusiveMinimum 0})
(defmethod accept 'neg? [_ _ _ _] {:type "number" :exclusiveMaximum 0})
(defmethod accept 'boolean? [_ _ _ _] {:type "boolean"})
(defmethod accept 'string? [_ _ _ _] {:type "string"})
Expand Down
1 change: 1 addition & 0 deletions test/malli/json_schema_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
(def expectations
[;; predicates
[pos-int? {:type "integer", :minimum 1}]
[pos? {:type "number" :exclusiveMinimum 0}]
[float? {:type "number"}]
;; comparators
[[:> 6] {:type "number", :exclusiveMinimum 6}]
Expand Down

0 comments on commit 436af54

Please sign in to comment.