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

Recursive schema $ref generates an extra class #368

Closed
rpatrick00 opened this issue Jun 3, 2015 · 1 comment
Closed

Recursive schema $ref generates an extra class #368

rpatrick00 opened this issue Jun 3, 2015 · 1 comment
Milestone

Comments

@rpatrick00
Copy link

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.

@dadrus
Copy link
Contributor

dadrus commented Jan 12, 2016

This is same as #481. Possible solution is proposed in its description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants