put-operation-response-codes
@azure-tools/typespec-azure-resource-manager/put-operation-response-codes
Put operations should use the ArmResourceCreateOrReplaceAsync
or ArmResourceCreateOrReplaceSync
template. They must have 200, 201, default and no other responses.
โ Incorrect
Section titled โโ Incorrectโ@armResourceOperationsinterface Employees { @armResourceCreateOrUpdate(Employee) createOrUpdate(...ApiVersionParameter): { @statusCode _: 200; result: boolean; };}
โ Correct
Section titled โโ Correctโ@armResourceOperationsinterface Employees { createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>;}