feat: allow filtering individual fields in response
Foorack opened this issue · comments
Feature request to allow filtering individual fields in a response. The use case for this would be cases where the API either secretly or temporarily returns a specific field, which you need to specify in the spec due to API generation but doesn't want to document on the public docs.
I could possibly try make a PR, but wanted to post it as Issue to hear thoughts first.
Using the original mechanism for this tool (tagging an object with a flag extension such as x-internal
), this is already possible. See
openapi-filter/test/issue105a/input.yaml
Lines 5 to 20 in a08c6ac
When you say "due to API generation", do you mean your OpenAPI definition is generated from code, and you can't introduce extension properties?
If so, how do you see specifying the property or properties to filter out? By having JSON-reference paths on the command-line, or some other method?