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

Fixed required body parameter when part of the proto message is path param #4850

Conversation

MahikaJaguste
Copy link
Contributor

References to other Issues or PRs

Fixes #4666

Have you read the Contributing Guidelines?

Yes

Brief description of what is fixed or changed

If a message field (in the body) is marked as required and it contains a field which is part of the path parameters, then the OpenAPI Swagger object created does not show this message field as required. Inside the renderFieldAsDefinition, code to getFieldBehaviorOption() is added when path params exists so that the required property of the message field can be captured.

Other comments

MahikaJaguste and others added 4 commits October 3, 2024 17:30
…e case where path params are present inside the field
… message field and one of the field within this message field is part of path parameters; the message field now gets marked as required
@johanbrandhorst
Copy link
Collaborator

Looks like some of the generated files need updating, see the steps in CONTRIBUTING.md

@johanbrandhorst johanbrandhorst enabled auto-merge (squash) October 21, 2024 21:51
@johanbrandhorst johanbrandhorst merged commit 9f6d32f into grpc-ecosystem:main Oct 21, 2024
17 checks passed
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

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.

Unable to mark the body parameter as REQUIRED when part of the proto message is path param
2 participants