Closed juliengrandjean closed 7 years ago
Nice! Thanks for contributing!
I noticed your PR commits are a bit messy. Could you please refork the project and add just the piece of code in "SimpleTypeMappings.java" so I can merge your patch without dirtying the git log?
Thanks.
Oh! Additionally you could map Instant
and LocalDate
types as reported in #60. Would that be good to you?
OK, I just saw that I made lot of "unwanted" commits, sorry for the mess. I'll restart from the begining, and will add those two types.
Allow the usage of java type "java.time.ZonedDateTime as a type for a field.
@Attributes(description = "date with timezone") private ZonedDateTime myDate; => "myDate": { "type": "string", "description": "date with timezone" }
Otherwise, we get an error at execution as the ZonedDateTime Class contains a simple generic "get" method :
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:658) at com.github.reinert.jjschema.v1.PropertyWrapper.firstToLowerCase(PropertyWrapper.java:370)