Skip to content

Recursive schema $ref generates an extra class #368

@rpatrick00

Description

@rpatrick00

I am trying to create a schema for a recursive etcd directory listing. From what I can tell, it should look something like this:

{
    "id": "EtcdDirectoryListing",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "The etcd Manifest used for recursive directory listings",
    "type": "object",
    "properties": {
    "action": { "type": "string" },
    "node": {
        "id": "EtcdNode",
        "description": "Etcd key-value node",
        "type": "object",
        "properties": {
        "key": { "type": "string" },
        "dir": { "type": "boolean" },
        "nodes": {
            "type": "array",
            "items": {
            "$ref": "#/properties/node"
            }
        },
        "modifiedIndex": { "type": "integer" },
        "createdIndex": { "type": "integer" }
        }
    }
    }
}

The problem I am having is that the Maven plugin is generating both a Node.java and a Node_.java class. I was expecting it to generate a single Node.java class that contains a List element in it. I assume that I am doing something stupid so any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions