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
@armResourceOperationsinterface Employees { @armResourceCreateOrUpdate(Employee) createOrUpdate(...ApiVersionParameter): { @statusCode _: 200; result: boolean; };}
✅ Correct
@armResourceOperationsinterface Employees { createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>;}