-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can protoc-gen-swagger hide the specified fields? #1791
Comments
I don't think we support this today. If you'd like to contribute this I would consider it if you can come up with a good design. |
I think extensions are the best way to handle hidden/private operations, parameters, fields, etc. There's an existing open source tool that allows you to filter your generated schema: https://github.com/Mermade/openapi-filter I don't believe |
If field level support is there, I think with this we could use this filter. Is it possible to add soon ? |
This isn't going to be added unless someone has the time to contribute it. |
Opened a PR #2418 to define |
There is now an alternative implementation to hiding fields/RPCs in #2578. We probably only want to merge one, so would interested parties weigh in on which they would prefer? |
I'm slightly biased towards #2578 😉. Both are nice solutions towards hiding fields/RPCs, but That being said it looks like #2418 is still useful in other scenarios where you want to apply other swagger extensions to fields and schemas. |
I concur with @BCook98. First class support for I also agree that these two implementations are not mutually exclusive. |
Fair points, lets consider each on its own merits, thank you both! |
🚀 Feature
I want to hide certain fields in the json generated by protoc-gen-swagger
The text was updated successfully, but these errors were encountered: