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

Filtered properties from AbstractSpecFilter.filterSchemaProperty are ignored #3037

Closed
pdiam opened this issue Nov 28, 2018 · 1 comment
Closed

Comments

@pdiam
Copy link

pdiam commented Nov 28, 2018

Overriding AbstractSpecFilter.filterSchemaProperty has no effect in the final spec.
This is most probably caused by the fact that SpecFilter ignores the returned value:

Optional<Schema> filteredProperty = filter.filterSchemaProperty(property, definition, (String) propName, params, cookies, headers);
if (filteredProperty.isPresent()) {
    clonedProperties.put((String) propName, property);
}

Line 257 should probably be changed to:

    clonedProperties.put((String) propName, filteredProperty.get());
frantuma added a commit that referenced this issue Nov 28, 2018
frantuma added a commit that referenced this issue Nov 28, 2018
ref #3037 - SpecFilter fix filter schemas
@frantuma
Copy link
Member

Thanks for reporting and checking this! Fixed in #3039

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

No branches or pull requests

2 participants