Skip to content

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

@joelittlejohn

Description

@joelittlejohn

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions