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

tcgc: expose way to get default api-version on methods #843

Closed
4 tasks done
jhendrixMSFT opened this issue May 15, 2024 · 1 comment
Closed
4 tasks done

tcgc: expose way to get default api-version on methods #843

jhendrixMSFT opened this issue May 15, 2024 · 1 comment
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@jhendrixMSFT
Copy link
Member

Clear and concise description of the problem

While methods contain an array of available api-versions, there's no easy way to determine which one is the default api-version. At present, we can enumerate the params, looking for isApiVersionParam and clientDefaultValue. Maybe method types can have a method getDefaultApiVersion() or something that returns the default? Or the index into apiVersions that's the default version.

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.
@jhendrixMSFT jhendrixMSFT added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label May 15, 2024
@tadelesh
Copy link
Member

apiVersion in method should be all api versions that contain that method and the default should be the last one in the array.

@tadelesh tadelesh self-assigned this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

No branches or pull requests

3 participants