swagger icon indicating copy to clipboard operation
swagger copied to clipboard

Unexported fields should not appear in model and model schema in docs

Open zasran opened this issue 9 years ago • 0 comments

We have a struct like this:

Base struct {
    private int
}
Another struct {
    Base
    Id int `json:"id"`
    ...
}

This results in model like this:

bitbucket.org.aintuapps.api-go-poc.models.Another {
    id (int, optional): ,
    private (int, optional): ,
    ...
}

As far as I can tell the member 'private' should not appear in documentation because it is not exported, i.e. json marshaling would not see it.

zasran avatar Sep 11 '15 05:09 zasran