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

Unwanted class with map of map attribute #1186

Closed
cbornet opened this issue Feb 22, 2016 · 0 comments
Closed

Unwanted class with map of map attribute #1186

cbornet opened this issue Feb 22, 2016 · 0 comments
Labels
Milestone

Comments

@cbornet
Copy link
Contributor

cbornet commented Feb 22, 2016

With latest 2.3.1 there is an issue with an unwanted class being output for models containing a map of map attribute.

    @RequestMapping(value = "mapOfMapOfExample", method = RequestMethod.GET)
    public Example mapOfMapOfExample() {
        throw new UnsupportedOperationException();
    }

}

class Example {
    public Map<String, Map<String, Foo>> foo; 
}

class Foo {
    public Integer fooInt; 
}

generates an unwanted

        "MapOfstringAndMapOfstringAndFoo":
        {
            "type": "object",
            "additionalProperties":
            {
                "$ref": "#/definitions/Map"
            }
        },

which causes problems when using clients such as swagger-codegen.

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

No branches or pull requests

2 participants