Skip to content

Releases: metosin/ring-swagger

0.19.6

26 May 11:17
Compare
Choose a tag to compare
  • initial support for additionalProperties via s/Keyword -key in the schemas. Thanks for Juan Patten for the initial code.

0.19.5

26 May 11:17
Compare
Choose a tag to compare
  • throw IllegalArgumentException if multiple different schemas have a same name. Fixes #39
  • drop import of javax.servlet ServletContext, causing reflection on Servlet Apps.
  • updated dependencies:
[prismatic/plumbing "0.4.2"] is available but we use "0.4.1"
[metosin/schema-tools "0.4.0"] is available but we use "0.3.0"

0.19.4

26 May 11:17
Compare
Choose a tag to compare
  • minify Ring-Swagger 2.0 Schema - just the essentials
  • Swagger2.0 JSON Schema is now in classpath ring/swagger/v2.0_schema.json
  • exclude ill transitive dependencies from Instar (cljx, cljs)
  • use ~1000x faster JSON Schema validator in tests:
[metosin/scjsv "0.2.0"] is available

0.19.3

26 May 11:16
Compare
Choose a tag to compare
  • :resourcePath is now set correctly with Swagger 1.2 endpoints (fixes #36.

0.19.2

26 May 11:16
Compare
Choose a tag to compare
  • avoid reflection with regexps, thanks to Michael Blume
  • default 2.0 responses don't have schemas
  • support for walking over Schema predicates support for 1.2 too

0.19.1

26 May 11:16
Compare
Choose a tag to compare
  • with-named-sub-schemas takes an optional parameter - prefix for schema names
  • Schema-names are now generated as String instead of Keywords in the swagger-json 2.0
  • uses [metosin/schema-tools "0.3.0] to walk over Schema records both to fetch schema names and give names to subschemas (Swagger 2.0 only)
    • see tests - in the end of the file
[lein-ring "0.9.3"] is available but we use "0.9.2"

0.19.0

20 Mar 12:01
Compare
Choose a tag to compare
  • with-named-sub-schemas has learned how to add names to schemas inside s/maybe and others
    • This means that you can now use inline schemas inside s/maybe
  • updated deps:
[prismatic/schema "0.4.0"] is available but we use "0.3.7"
[prismatic/plumbing "0.4.1"] is available but we use "0.3.7"
[potemkin "0.3.12"] is available but we use "0.3.11"
[metosin/ring-http-response "0.6.1"] is available but we use "0.6.0"
  • Fixed compatibility with Schema 0.4.0

0.18.1

26 May 11:13
Compare
Choose a tag to compare
  • Fixed wrap-validation-errors defaults

0.18.0

26 May 11:13
Compare
Choose a tag to compare
  • fixed Swagger 2.0 response bug #29
  • ring.swagger.swagger2/swagger-json now takes an optional extra argument, the Options-map
    with options :ignore-missing-mappings? & :default-response-description-fn
  • ensured that ignoring missing mappings works for both body- & non-body parameters
  • BREAKING:
    • moved binding of s/either from ring.swagger.json-schema-dirty to ring.swagger.json-schema.
      Uses the first schema element as the source for the mappings
    • ring.swagger.middleware/wrap-validation-error takes now options as a single map
  • updated deps:
[metosin/ring-http-status "0.6.0"] is available but we use "0.5.2"
[prismatic/schema "0.3.7"] is available but we use "0.3.3"
[prismatic/plumbing "0.3.7"] is available but we use "0.3.5"
[lein-ring "0.9.2"] is available but we use "0.9.1"

0.17.0

26 May 11:12
Compare
Choose a tag to compare
  • revert default spec location to /api/docs to be more backwards compatible. Swagger2-clients should use swagger.json.
  • ring.swagger.middleware/comp-mw to make middleware parametrization easier:
(def wrap-swagger2-ui
  (comp-mw wrap-swagger-ui :swagger-docs "swagger.json"))