Closed
Description
I can't figure out how to override a class and specify that it should be a primitive type
For example, given:
class Foo {
Date myDate
}
How do I make swagger think that Dates should be strings, such that swagger-ui (and other clients following the spec) thinks that this is a valid Foo object:
{ "myDate": "2014-01-01" }
I've tried this: https://github.com/wordnik/swagger-core/wiki/overriding-models
However, that results in clients expecting that Foo objects look like this:
{ "myDate": { "value": "2014-01-01" } }
I also want to attach a description (for example) to the date class that specify recognized formats.
So far I want this for things like dates (XMLGregorianCalendar), BigDecimal, and BigInteger, where our JSON serialization knows how to serialize/deserialize as strings in a particular format.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels