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

m4 gives us duplicated nextLink and items properties if they are in the parent model #5012

Open
kazrael2119 opened this issue Sep 4, 2024 · 0 comments

Comments

@kazrael2119
Copy link

kazrael2119 commented Sep 4, 2024

nextlink and items will be generated twice if they are in parent model:
here is the swagger code: Azure/autorest.typescript@5ce74e5#diff-df4e5d0be945fd2a9b20b24fa06b37a71cded2d32a08d5c5d1ec6206e4d47ddbR1262-R1293

here is the generated code: Azure/autorest.typescript@5ce74e5#diff-d879735569466f99808c6f23a0c05e3d8a4c71ec9dbe064932b2fa908476fe34R72-R83

After debugging we found this is not js codegen issue but a m4 issue which gives us duplicated nextLink and items properties.
image

this is a real case we found in https://github.com/us6193/azure-rest-api-specs/blob/64d7e138d36515dbb6ac905cfebb82feece04221/specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/billingSavingsPlan.json#L546-L561
cc @MaryGao @qiaozha

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

No branches or pull requests

1 participant