Skip to content

Docless 0.4.0

Latest
Compare
Choose a tag to compare
@afiore afiore released this 12 Feb 12:24
· 2 commits to master since this release

This release improves library support of the swagger spec and corrects the serialisation of Scala options into Json schema definitions.

Support for Swagger Security schemes

Contributed by Alvaro Delgado @algd

We have reworked the types modelling security schemes and implemented JSON serialisation for them. Through our own internal use of the library, we have also verified that the basic security scheme is now handled correctly by swagger UI.

Fixed JsonSchema option encoding

The implementation of JsonSchema[Option[A]] has been amended so that:

  • The schema definition is inlined only if A is a primitive. Otherwise, a reference to A's definition is rendered
  • The fully qualified name of A is used for the definition id instead of mistakenly using scala.Option

No import tax on Swagger codecs

JSON codecs were previously kept in the com.timeout.docless.encoders package, which the end-user to import them explicitly. We have now moved them into the swagger.ApiSchema companion object, thus the import is not needed anymore.