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

bug(tcgc): default name of api version parameter should be api-version #1046

Closed
4 tasks done
Tracked by #3994
archerzz opened this issue Jun 20, 2024 · 1 comment
Closed
4 tasks done
Tracked by #3994
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@archerzz
Copy link
Member

Clear and concise description of the problem

Try to parse a tsp spec without specific api version parameter, like https://github.com/Azure/autorest.csharp/blob/5ff421832c6037a563b346407cad1a781933bf2c/test/TestProjects/MixAPIVersion-TypeSpec/MixAPIVersion-TypeSpec.tsp#L12-L27

TCGC will output a default api version parameter of which the name is apiVersion. I think for Azure flavor, TCGC should use api-version as the name.

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@archerzz archerzz added bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Jun 20, 2024
@archerzz
Copy link
Member Author

Looks like it's due to emitter's implementation. We should prefer serializedName over name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

No branches or pull requests

1 participant