Azure / autorest.java

Extension for AutoRest (https://github.com/Azure/autorest) that generates Java code
MIT License
32 stars 80 forks source link

design discussion, specify which api-version to include in ServiceVersion class -- move to typespec-azure when needed #2759

Closed weidongxu-microsoft closed 2 weeks ago

weidongxu-microsoft commented 1 month ago

Relate to https://github.com/Azure/typespec-azure/issues/746

Service dev should be able to specify which api-version to be included in ServiceVersion class, when generating SDK.

If this is a feature that would be shared by multiple languages, we may use a decorator in client.tsp, e.g.

@@serviceVersion(ApiVersion.v2023_04_01);
@@serviceVersion(ApiVersion.v2024_02_01);

or tspconfig.yaml

serviceVersions:
- "2023-04-01"
- "2024-02-01"
weidongxu-microsoft commented 3 weeks ago

Or we can use client.tsp about useDependency

@useDependency(ApiVersion.v2023_04_01);
@useDependency(ApiVersion.v2024_02_01);
namespace Client;
weidongxu-microsoft commented 2 weeks ago

use https://github.com/Azure/typespec-azure/issues/965 instead