non-breaking-versioning
@azure-tools/typespec-azure-core/non-breaking-versioningVerify that only backward compatible changes are made to the API.
โ Incorrect
Section titled โโ Incorrectโ- Removed
model Foo { @removed(Versions.v2024_01_01) bar: string;}- Renamed
model Foo { @renamedFrom(Versions.v2024_01_01, "baz") bar: string;}- Added required property
model Foo { @added(Versions.v2024_01_01) bar: string;}- Made optional without default
model Foo { @madeOptional(Versions.v2024_01_01) bar: string;}โ Correct
Section titled โโ Correctโ- Adding new type
@added(Versions.v2024_01_01)model Foo {}- Adding operation
@added(Versions.v2024_01_01)op foo(): Foo;- Adding optional property
model Foo { @added(Versions.v2024_01_01) bar?: string;}- Made optional with default
model Foo { @madeOptional(Versions.v2024_01_01) bar?: string = "default";}