New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can it use the defined Reads and Writes for Json generation #75
Comments
@prithvi23 currently it's using reflection to get the fields. It doesn't support using a custom Reads or Writes. If you think about it, to use a custom reads and writes, you will need to provide not only the reads/writes and also an instance of the class, which will probably be more complex to write than just writing the schema in the swagger.yml. |
Can the Formats be used as an implicit? [NoSuchElementException: None.get] Its failing at line number 19 def specs = cached("swaggerDef") { |
Also Just would like to thank you for a good utility and a prompt response. :) |
Looks like you are trying to encode an ADT, that is basically an enum. play-swagger doesn't support generating swagger doc for this type of data yet, (although it shouldn't throw a runtime exception). The best work around again is to write your schema definition in swagger.yml yourself ( don't $ref your Consumer class) |
That would be nice - can you point me to a sample Swagger.yml file that overrides the definitions? |
you should be able to find plenty here. |
sealed trait ValueType
object Mobile extends ValueType
case class Consumer(root: String, users: Map[String, User], valueType: ValueType = Mobile)
The text was updated successfully, but these errors were encountered: