use-standard-names
@azure-tools/typespec-azure-core/use-standard-namesEnsure Azure Service operations follow the naming recommendations.
| Operation type | Naming convention |
|---|---|
GET returning single object | Start with get |
GET returning list of object | Start with list |
PUT returning both 200 and 201 | Start with createOrReplace |
PUT returning only 201 | Start with create or createOrReplace |
PUT returning only 200 | Start with replace or createOrReplace |
PATCH returning 201 | Start with create, update or createOrUpdate |
DELETE | Start with delete |
โ Incorrect
Section titled โโ Incorrectโop addPet is ResourceCreate<Pet>;op getPets is ResourceList<Pet>;โ Correct
Section titled โโ Correctโop createPet is ResourceCreate<Pet>;op listPets is ResourceList<Pet>;