Skip to content

0.22.3

Latest
Compare
Choose a tag to compare
@Deraen Deraen released this 17 Jan 18:46
· 207 commits to master since this release
0.22.3

compare

  • Fixed generating Swagger path templates in cases where path parameter is followed
    by an extension (#82)
  • Make the JSON Schema validator public: ring.swagger.validator/validate.
(require '[ring.swagger.validator :as v])

(v/validate (rs/swagger-json {:paths {"/api/ping" {:get nil}}}))
; nil

(v/validate (rs/swagger-json {:pathz {"/api/ping" {:get nil}}}))
; ({:level "error"
;   :schema {:loadingURI "#", :pointer ""}
;   :instance {:pointer ""}
;   :domain "validation"
;   :keyword "additionalProperties"
;   :message "object instance has properties which are not allowed by the schema: [\"pathz\"]", :unwanted ["pathz"]})