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

The properties id and name of ArmResource in typespec are in-consistant with their definition in swagger #401

Closed
MaryGao opened this issue Mar 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working external:mgmt needs-area
Milestone

Comments

@MaryGao
Copy link
Contributor

MaryGao commented Mar 12, 2024

The properties id and name of ArmResource in typespec are required, but they are optional in swagger. And it caused breakings in JS. Also the required and readOnly limitations for input models are conflicting with between. How could customers feed a required param but readonly?

This is from the dicssion.

@MaryGao MaryGao added the bug Something isn't working label Mar 12, 2024
@MaryGao MaryGao changed the title The properties id and name of ArmResource in typespec are required which are optional in swagger The properties id and name of ArmResource in typespec are in-consistant with their definition in swagger Mar 12, 2024
@allenjzhang
Copy link
Member

From schema correctness perspective, required and read signify the properties are always available and only settable by service. You are guaranteed not to have null values. It is pretty clear and concise. The loose definition of the common-type swagger definition is not exactly right or helpful in generating good Client SDK models.

@MaryGao, can you elaborate on your scenario this is breaking? If this is for PATCH, the update model based on ARM op template will automatically strip out read only properties.

@markcowl markcowl added this to the [2024] May milestone May 7, 2024
@allenjzhang
Copy link
Member

#762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external:mgmt needs-area
Projects
None yet
Development

No branches or pull requests

4 participants