-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 2494 #3646
base: main
Are you sure you want to change the base?
Fix 2494 #3646
Conversation
WalkthroughThe changes introduced add a new check in the template to ensure compatibility between path and query parameters. Additionally, updates to the proto file include a Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Files ignored due to filter (1)
- protoc-gen-openapiv2/internal/genopenapi/testdata/generator/path_item_object.swagger.yaml
Files selected for processing (2)
- protoc-gen-openapiv2/internal/genopenapi/template.go (1 hunks)
- protoc-gen-openapiv2/internal/genopenapi/testdata/generator/path_item_object.prototext (2 hunks)
Files skipped from review due to trivial changes (1)
- protoc-gen-openapiv2/internal/genopenapi/template.go
Additional comments (Suppressed): 2
protoc-gen-openapiv2/internal/genopenapi/testdata/generator/path_item_object.prototext (2)
14-32: The
oneof_decl
named "primary_key" and the fields "uuid" and "id" have been added to the message type. Ensure that these changes are reflected in the corresponding service methods and their usage throughout the codebase.40-50: Additional HTTP GET bindings have been added for the fields "value", "uuid", and "id". Make sure that the server-side implementation can handle these new routes correctly, and that they do not conflict with existing routes.
Hey @johanbrandhorst , Would you please look into this PR ? |
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.
Hi! Thanks for this PR. The change looks reasonable, but I'm not sure I understand what the testdata changes do. Could you add a test to template_test.go
? Or perhaps add an example of this circumstance to one of the test protobuf files and regenerate the files? Thanks!
Hey @johanbrandhorst , sure i will add tests for |
schema: | ||
$ref: '#/definitions/StringMessage' | ||
parameters: | ||
- name: uuid |
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.
without this fix Id
would also come up here, it's not now because uuid
is of type one_of
any change this get merge? @johanbrandhorst it's super useful |
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.
Don't know how I forgot about this PR, but it looks reasonable to me.
I'm going to close and reopen this to re-trigger the CI |
Looks like we still need to rerun the generation script (see CONTRIBUTING.md). If the original author @amanraja cannot pick this back up, feel free to copy the changes to a new PR. |
Hey @johanbrandhorst , have ran the generation script now, Please check the PR again , there are few changes changes have come up because of it. |
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.
I think there's still a bug here
{ | ||
"name": "status.progress", | ||
"in": "query", | ||
"required": false, | ||
"type": "string", | ||
"format": "int64" | ||
}, | ||
{ | ||
"name": "status.note", | ||
"in": "query", | ||
"required": false, | ||
"type": "string" | ||
}, |
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.
I think these were removed incorrectly, no? There's nothing in this RPC definition that means the status query parameters shouldn't show up, I think? Here's the definition:
additional_bindings: {get: "/v1/example/echo/{id}/{num}/{lang}"} |
lineNum
oneof.
Fixes #2494