You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.
A case class property of type Option[T] should be represented in the Swagger model as a property of type T; the optional nature of the property would be indicated by required: false.
Instead, Option is being treated like any other Iterable type, so the model appears to have an array property with items of type T— and required is always being set to false. Properties that are not Options should be assumed to be required (or at least it should be possible to tell Swagger to behave that way, if you're never going to use nulls).
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Option properties are not described correctly
Option properties are not described correctly, and all properties are being described as optional
Jun 9, 2015
A case class property of type
Option[T]
should be represented in the Swagger model as a property of type T; the optional nature of the property would be indicated byrequired: false
.Instead,
Option
is being treated like any otherIterable
type, so the model appears to have an array property with items of type T— andrequired
is always being set tofalse
. Properties that are not Options should be assumed to be required (or at least it should be possible to tell Swagger to behave that way, if you're never going to use nulls).The text was updated successfully, but these errors were encountered: