Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] ARM Library: Patch does not generate Updatable model for complex envelope types #383

Closed
allenjzhang opened this issue Mar 7, 2024 · 5 comments
Milestone

Comments

@allenjzhang
Copy link
Member

allenjzhang commented Mar 7, 2024

Describe the bug
Seeing one onboarding team hitting PatchBodyParametersSchema lintDiff. The root cause is this resource includes ManagedServiceIdentity from common type definition which type property is marked as required. Our auto update model generation does not seem to extend to the common types but still $ref to its original definition. As original definition contains required properties thus triggering this warning.

To Reproduce
Playground

Expected behavior
In update model, as we are starting to master the properties in TypeSpec models, we should stop generating $ref to original common definitions but generate an update model locally.

@allenjzhang allenjzhang added the bug Something isn't working label Mar 7, 2024
@markcowl markcowl changed the title [Bug] ARM Library: Patch does not generate Updatable model for common-types [Bug] ARM Library: Patch does not generate Updatable model for complex envelope types Mar 11, 2024
@markcowl markcowl added this to the [2024] April milestone Mar 11, 2024
@markcowl
Copy link
Member

markcowl commented Apr 4, 2024

Here is one solution that teams can use until this is fixed

@konrad-jamrozik
Copy link

konrad-jamrozik commented Apr 22, 2024

Here is a discussion about PatchBodyParameterSchema rule:

@allenjzhang @mikeharder FYI

@petrkotas
Copy link
Member

Hi @markcowl thank you for the solution, I have tried in the PR https://github.com/Azure/azure-rest-api-specs-pr/pull/18316. Unfortunately without luck. I have two properties HcpOpenShiftClusterResource and HcpOpenShiftNodePoolResource, I tried to apply the variant as is proposed here for HcpOpenShiftClusterNodepoolResource, it game me additional error of identity not in the right place. For both resources, the original error PatchBodyParameterSchema remained.

May I ask for further suggestions?

@markcowl
Copy link
Member

@petrkotas sent a PR to your branch with a fix

@markcowl
Copy link
Member

Fixed.

@markcowl markcowl removed the bug Something isn't working label Jul 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants