Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Model with type parameter or Object property fail to load #31

Open
zdila opened this issue Jul 3, 2013 · 1 comment
Open

Model with type parameter or Object property fail to load #31

zdila opened this issue Jul 3, 2013 · 1 comment

Comments

@zdila
Copy link
Contributor

zdila commented Jul 3, 2013

We defined single resource with single method that returns Parameterized.

public class Parameterized<T> {

    private Object object;

    private T typed;

    public Object getObject() {
        return object;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public T getTyped() {
        return typed;
    }

    public void setTyped(T typed) {
        this.typed = typed;
    }

}

Swagger doclet recursively traverses internal fields of Object and generates big JSON model description. You can see generated JSON at http://pastebin.com/dKGdxFw7.

Swagger then fails to load this JSON with following error:

Error: prop.refModel.getMockSignature is not a function
Source File: http://127.0.0.1:8080/swagger/lib/swagger.js
Line: 349
@levmar
Copy link

levmar commented Sep 4, 2013

Are there any known workarounds for this issue? I'm running into to it because I'm using Spring Data, which utilizes Page<T> for paginated data.

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

No branches or pull requests

2 participants