Closed live1206 closed 3 months ago
You have to give it a different name in the old one playground
@renamedFrom(Versions.v1, "update")
@removed(Versions.v2)
@sharedRoute
updateOld is ArmResourcePatchSync<Employee, EmployeeProperties>;
@added(Versions.v2)
@parameterVisibility
@sharedRoute
update is ArmCustomPatchAsync<Employee, Employee>;
As timothee showed, here is a playground showing this
You have to give it a different name in the old one playground
@renamedFrom(Versions.v1, "update") @removed(Versions.v2) @sharedRoute updateOld is ArmResourcePatchSync<Employee, EmployeeProperties>; @added(Versions.v2) @parameterVisibility @sharedRoute update is ArmCustomPatchAsync<Employee, Employee>;
I did try to give it a different name for the old one, the key is @sharedRoute
.
Thanks for the help, @timotheeguerin
oh, @sharedRoute
. but i do think typespec should introduce way to versioning decorator instead of using track to handle it since lots of protocol level breaking changes are from decorators.
Describe the bug
We need to apply different templates for
update
operation in different versions as below, but complier is complaining duplication ofupdate
Reproduction
Details
Checklist