You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Operation ID must start with the verb “list” and should be followed by a noun or compound noun.
84
+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form, where the last noun is in plural form.
85
+
86
+
##### Implementation details
87
+
Rule checks for the following conditions:
88
+
- Applies only to GET methods on resource collection paths
89
+
- Ignores singleton resources
90
+
- Generates the expected OperationId given the resource identifier
91
+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
Copy file name to clipboardExpand all lines: tools/spectral/ipa/rulesets/IPA-109.yaml
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,3 +57,22 @@ rules:
57
57
given: '$.paths[*]'
58
58
then:
59
59
function: 'IPA109CustomMethodIdentifierFormat'
60
+
xgen-IPA-109-valid-operation-id:
61
+
description: |
62
+
The Operation ID must start with the custom method verb (the custom method path section delimited by the colon (:) character) and should be followed by a noun or compound noun.
63
+
If the custom Operation ID has a verb + noun, the Operation ID should end with the noun.
64
+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier.
65
+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form, where the last noun:
66
+
- Is in plural form if the method applies to a collection of resources
67
+
- Is in singular form if the method applies to a single resource
68
+
69
+
##### Implementation details
70
+
Rule checks for the following conditions:
71
+
- Applies only to paths containing custom method identifiers (with colon format)
72
+
- Generates the expected OperationId given the resource identifier and the method name portion following the colon
73
+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
0 commit comments