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

Allow filtering bean properties and transforming JSON schema during generation process #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

wololock
Copy link

This pull request is somehow related to #32 but it allows to resolve described problem quite differently. We run into a situation where we needed to filter out some bean properties of existing data model during JSON schema generation and also transform some of the properties. This pull request adds FilterChainSchemaFactoryWrapper class which allows you to filter out bean properties you would like to exclude in your JSON schema and optionally apply some transformations on accepted bean properties.

Check out added tests cases to see how does it work.

This pull request does not add any new dependencies and does not break backward compatibility.

This change provides an extended SchemaFactoryWrapper with BeanProperty filtering option - thanks that you can simply exclude properties of existing model from being added to JSON schema (e.g. you can skip @deprecated fields or any custom annotated field).
@Vad1mo
Copy link

Vad1mo commented Dec 1, 2014

great!

@cowtowncoder
Copy link
Member

@wololock Apologies for letting this fall through the crack. It sounds like a good thing to have, but due to concurrent changes, can not be merged at this point. Would it be possible to resolve the conflicts, so it could be merged for 2.7.0?

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

Successfully merging this pull request may close these issues.

3 participants