Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Option properties are not described correctly, and all properties are being described as optional #7

Closed
ghost opened this issue Jun 8, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 8, 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 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).

@ghost 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
@fehguy
Copy link
Contributor

fehguy commented Dec 10, 2016

Fixed by #24

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant