Skip to content

0.21.0

Compare
Choose a tag to compare
@Deraen Deraen released this 08 Nov 10:22
· 298 commits to master since this release

compare

Breaking changes

  • BREAKING: Swagger 1.2 is no more supported.
  • BREAKING: ring.swagger.json-schema/json-type multimethod is removed
    • will cause compile-time errors for those who have client-side custom extensions
    • new way of doing the Schema -> Swagger Schema mappings:
      • Classes via ring.swagger.json-schema/convert-class multimethod, taking both the class and swagger options
      • Objects (e.g. records) via ring.swagger.json-schema/JsonSchema protocol.
  • lot's of internal cleanup in ring.swagger.json-schema:
    • ->json is now ->swagger and takes options map instead of kwargs.
    • removed option :top (required only for Swagger 1.2)
    • new option :in denote the parameter type (:query, :header, :path, :formData or :body)
      • responses don't have :in.

New features

  • Support for collections in query and form parameters (even with single parameter):
    • Parameters {:query {:x [Long]}} with ring.middleware.params/wrap-params middleware and query-string of
      x=1&x=2&x?3 with ring.swagger.schema/coercer! should result in x being [1 2 3]
      • Same with Compojure-api: :query-params [x :- [Long]]
    • For now, only supports collectionFormat
      multi.
  • (From compojure-api) Support for file uploads.
    • ring.swagger.upload/TempFileUpload and ByteArrayUpload Schemas to be used
      with ring.middleware.multipart-params default stores.
  • support for schema.core.One by Steffen Dienst.
  • :version is not mandatory field in ring-swagger schema (defaults to 0.0.1)
  • new public api fns in ring.swagger.swagger2:
    • transform-operations for generic operation transformations on the client side
    • ensure-body-and-response-schema-names to fix the generated schema names on the client side (vs. the swagger-json
      generating new names for all the requests.
  • Fixes 54: :paths order is now preserved
    • use flatland.ordered.map/ordered-map in the client side to keep the order.
  • updated dependencies:
[metosin/schema-tools "0.5.2"] is available but we use "0.4.1"
[metosin/ring-http-response "0.6.5"] is available but we use "0.6.2"
[metosin/ring-swagger-ui "2.1.2"] is available but we use "2.0.24"
[prismatic/schema "0.4.4"] is available but we use "0.4.3"
[cheshire "5.5.0"] is available but we use "5.4.0"
[org.flatland/ordered "1.5.3"] is available but we use "1.5.2"
[clj-time "0.11.0"] is available but we use "0.9.0"
[potemkin "0.4.1"] is available but we use "0.3.13"
  • dev-dependencies:
[lein-ring "0.9.6"] is available but we use "0.9.4"
[funcool/codeina "0.3.0"] is available but we use "0.1.0"
[midje "1.7.0"] is available but we use "1.7.0-SNAPSHOT"