-
Notifications
You must be signed in to change notification settings - Fork 37
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
typespec-autorest does not honor @clientName #442
Comments
This was partially by design that the only thing it support was what it supported with |
+1, we should either add x-ms-client-name or change the schema name, since it isn't actually part of the API |
Previously, we have |
That didn't work on the model name See playground, that is my point, we only kept parity. but I don’t have anything against adding more cases |
Oh, I see. Thanks for explanation. @markcowl then we should add both |
Why do you need to add x-ms-client-name on the model, we should just change the definition name |
Oh. I see. Thanks for the explanation. |
For model/enum/interface/union renaming, since name is not used in wire, we should just rename the name. For parameters/properties renaming, we should use @clientName. |
Confused here @tadelesh, don’t we need this? The point was more that autorest should rename the definition not add x-Ms-client-name |
Oh, I got your point. My view is from convert swagger to TypeSpec, we don't need to add @clientName, instead just rename the name for that not impact wire when conversion. From autorest emitter view, the requirements are:
|
The consensus is to update typespec-autorest to honor For Models: |
other thing it should change is the body parameter name and |
fix [#442](#442) `@clientName` is respected for: - definition names - enum values names - parameters names(for body it replace the `name` for other it adds `x-ms-client-name`) Doing this now as this will help getting rid of some use of `@extension` This makes this doc accurate now https://azure.github.io/typespec-azure/docs/next/migrate-swagger/faq/breakingchange#createorupdate-put-apis as well
fix [Azure#442](Azure#442) `@clientName` is respected for: - definition names - enum values names - parameters names(for body it replace the `name` for other it adds `x-ms-client-name`) Doing this now as this will help getting rid of some use of `@extension` This makes this doc accurate now https://azure.github.io/typespec-azure/docs/next/migrate-swagger/faq/breakingchange#createorupdate-put-apis as well
See: https://cadlplayground.z22.web.core.windows.net/cadl-azure/?c=aW1wb3J0ICJAYXp1cmUtdG9vbHMvdHlwZXNwZWMtY2xpZW50LWdlbmVyYXRvci1jb3JlIjsKdXNpbmcgQcQzLkPFJEfIIy5Db3JlOwoKQMY8TmFtZSgiVGVzdFJlbmFtZSIpCmVudW0gxBJ7CiBBLAogQgp90y9Nb2RlbMk0bcQOxTXFGCB7CiAgcHJvcDE6IHN0cmluZwp9&e=%40azure-tools%2Ftypespec-autorest&options=%7B%7D
The text was updated successfully, but these errors were encountered: