-
Notifications
You must be signed in to change notification settings - Fork 111
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
fix: narrow generated API types #5735
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I think these annotations will just be overridden next time we run make proto.generate
. For the change to persist, I think it would require a config change in proto/buf.gen.openapi-runtime.yaml
or one of its adjacent files, but I'm not sure if it's possible.
Looks like there are annotations we can add to the proto files as seen here: (https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_openapi_output/). Updated the PR. |
One small issue I'm running into: Is it possible to change the type of the Relatedly, this |
The lack of required properties in the Swagger yaml results in the generated types to have unnecessary optional properties, which results in avoidable conditional checks on the applications side. This PR fixes that issue on the "supply side" for a few of the most impactful properties, but does not remove the conditional checks.