require-versioned
@azure-tools/typespec-azure-core/require-versionedAzure services should always use the versioning library even if they have a single version. This ensures that the service is ready for future versions and generate the OpenAPI 2.0 in the correct location.
โ Incorrect
Section titled โโ Incorrectโ@servicenamespace Azure.MyService;@service(#{ version: "2021-01-01" })namespace Azure.MyService;@service@OpenAPI.info({ version: "2021-01-01",})namespace Azure.MyService;โ Correct
Section titled โโ Correctโ@versioned(Versions)@servicenamespace Azure.MyService;
enum Versions { 2021_01_01: "2021-01-01",}