Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 1.02 KB

list-in-operation-name.md

File metadata and controls

35 lines (19 loc) · 1.02 KB

ListInOperationName

Category

SDK Warning

Applies to

ARM and Data plane OpenAPI(swagger) specs

Output Message

Since operation '{0}' response has model definition '{1}', it should be of the form "_list".

Description

Verifies whether value for operationId is named as per ARM guidelines when response contains array of items.

Why the rule is important

Per ARM SDK guidelines, each 'GET' operation on a resource should have "list" in the name when operation has x-ms-pageable extension. Guidelines are in place for a more consistent customer experience among ARM services SDKs.

How to fix the violation*: Make sure that operationId is in the form of NOUN_List, `NOUN_ListBy

Make sure that operationId is in the form of NOUN_List, NOUN_ListBy*** or List.

Impact on generated code

Operation name in the generated SDK will be named based on this.

Examples

  • Resources_List
  • Resources_ListBySubscriptions
  • List