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

add special handling for @bodyRoot/@body on model param's property #1495

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tadelesh
Copy link
Member

@tadelesh tadelesh commented Feb 5, 2025

this problem was found in this pr: Azure/azure-rest-api-specs#31699. there is an action operation: listIngressGatewayCredentials for EndpointResource resource which used @bodyRoot in a model's property.
previous go emitter's logic of finding parameter's corresponding http parameter is to use the direct naming comparison of the param, but this could not cover @bodyRoot or @body on model's property, which cause this exception.
this pr just adds logic of handling first level @bodyRoot and @body. however, it is not a perfect solution, we need to refine param converting logic after we have a clear story about the relation of typespec operation api sig and sdk operation api sig.

action is ArmResourceActionNoContentSync<
BodyRoot,
{
@bodyRoot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I find the docs for this decorator?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tadelesh tadelesh requested a review from jhendrixMSFT February 7, 2025 03:21
@tadelesh
Copy link
Member Author

tadelesh commented Feb 8, 2025

@jhendrixMSFT could you review again? this bug block the hybrid connectivity's pr.

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.

2 participants