Skip to content

"properties" property implies "type": "object" #192

@fixpunkt

Description

@fixpunkt

When trying to generate a POJO for this schema:

{
    "title": "AggregatedIncidentDateEntity",
    "properties": {
        "date": {
            "type": "string",
            "format": "date-time"
        },
        "date_ms": {
            "type": "integer",
            "description": "date in milliseconds"
        },
        "count": {
            "type": "integer"
        }
    }
}

no POJO is generated. However, after adding "type": "object" to the toplevel object, a POJO will be generated. Since there is a properties property, the instance should be recognized as being of object type automatically. Schemas of this style are used as examples in the Spec (cf. http://json-schema.org/latest/json-schema-validation.html#anchor64), so this should be supported.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions