Skip to content
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

Format rule only applies to strings, spec says it is valid for any type #12

Closed
joelittlejohn opened this issue Jun 23, 2013 · 1 comment
Milestone

Comments

@joelittlejohn
Copy link
Owner

Original author: joelittl...@gmail.com (February 22, 2011 14:36:34)

The "format" schema node can be used along with any value for "type". The spec does recommend that format is only used for primitive types, though this is not enforced.

Need to be able to e.g. specify a utc millisec property like:

{ "type" : "integer", "format" : "utc-millisec"}

rather than just

{ "type" : "string", "format" : "utc-millisec"}

Where the format is not recognised, jsonschema2pojo currently falls back to a java.lang.String, however this should fallback to whatever type applies based on the "type" node.

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=12

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on February 22, 2011 15:37:49
Fixed (r2c88b3e443).

flibbertigibbet added a commit to flibbertigibbet/jsonschema2pojo that referenced this issue Jun 23, 2016
…-annotation-handling

Better handling of type annotations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant