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] Add additionalApiVersion decorator #2264

Open
lmazuel opened this issue Feb 26, 2025 · 0 comments
Open

[TCGC] Add additionalApiVersion decorator #2264

lmazuel opened this issue Feb 26, 2025 · 0 comments
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@lmazuel
Copy link
Member

lmazuel commented Feb 26, 2025

for instance your TypeSpec:

// Don't try to define the old things
enum Versions {  v4, v5 }

Your client.tsp:

@additionalApiVersions
enum AdditionalApiVersions { v1, v2, v3 }

And TCGC will expose the API versions enum as: v1, v2, v3, v4, v5.

The concept behind it, is that sometimes we want SDK to generate accurate API version enum (mostly C# and Java), while not having to actually annotate the entire spec with @added because we won't use versionning information in the generation side.

@lmazuel lmazuel added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Feb 26, 2025
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

1 participant