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

Support Jackson @JsonView filtering on return types #43

Open
frankgrimes97 opened this issue Aug 22, 2013 · 2 comments
Open

Support Jackson @JsonView filtering on return types #43

frankgrimes97 opened this issue Aug 22, 2013 · 2 comments

Comments

@frankgrimes97
Copy link

We often define a single structure but return subsets of its fields from different JAX-RS resource methods by annotating the methods with @JSONVIEW. (FYI, we're actually using Dropwizard)

e.g. http://jira.codehaus.org/browse/JACKSON-578

Would it be possible for the generated swagger documentation to only include those fields which are included in the specified JsonView?

@cviebig
Copy link

cviebig commented Aug 4, 2014

There is a workaround implemented in the carmapublic fork allowing you to override the type for documentation puposes. See #63. In our project we have extended it to support interfaces too, as we are using Interfaces for jsonviews to leverage multiple inheritance.

@conorroche
Copy link

@cviebig ive just committed support for json view to https://github.com/Carma-Public/swagger-jaxrs-doclet ive added a test fixture for it too that uses interfaces and classes for the view classes based on the Person example in the original jackson ticket. let me know if its ok for you.

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

3 participants