Closed XiaofeiCao closed 3 months ago
One suggestion is to have a e.g. "api-version" var in class (default to the latest api-version). This var maybe settable later.
And codegen (in default mode -- not handling breaking changes caused by REST-API non-break) would only generate API (it may include parameter and model property) that is available in this "api-version".
Context: Mgmt may need to generate for a GA api-version, when the latest is preview.
https://github.com/Azure/azure-rest-api-specs/blob/80be470f83f16d693291beb988ee80cd9a0b8023/specification/containerservice/Fleet.Management/fleet.tsp#L50-L58
TCGCContext
will likely contain a flag to only include operations in latest version: https://github.com/Azure/typespec-azure/issues/129#issuecomment-2011627278TCGC
getAllOperations
will return operations/models with all the available versions.Before TCGC supports it and we integrate
getAllOperations
, we could see if we can leverage existsAtVersion from versioning, using the default(latest) version.