Skip to content

Commit ea7edbb

Browse files
author
Sophia Marie Terry
committed
Update README
1 parent 6658fe1 commit ea7edbb

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

tools/spectral/ipa/rulesets/README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ Rule checks for the following conditions:
139139
- Applies only to GET methods on single resources or singleton resources
140140
- Verifies that the operation object does not contain a requestBody property
141141

142+
#### xgen-IPA-104-valid-operation-id
143+
144+
`off`
145+
The Operation ID must start with the verb “get” and should be followed by a noun or compound noun.
146+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.
147+
If the resource is a singleton resource, the last noun may be the plural form of the collection identifier.
148+
149+
##### Implementation details
150+
Rule checks for the following conditions:
151+
- Applies only to GET methods on single resources or singleton resources
152+
- Generates the expected OperationId given the resource identifier
153+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
154+
142155

143156

144157
### IPA-105
@@ -193,6 +206,19 @@ The response body of the List method should consist of the same resource object
193206
- Fails if the Get method doesn't have a schema reference or if the schemas don't match
194207
- Validation ignores resources without a Get method
195208
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
209+
#### xgen-IPA-105-valid-operation-id
210+
211+
![warn](https://img.shields.io/badge/warning-yellow)
212+
The Operation ID must start with the verb “list” and should be followed by a noun or compound noun.
213+
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.
214+
215+
##### Implementation details
216+
Rule checks for the following conditions:
217+
- Applies only to GET methods on resource collection paths
218+
- Ignores singleton resources
219+
- Generates the expected OperationId given the resource identifier
220+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
221+
196222

197223

198224
### IPA-106
@@ -273,6 +299,18 @@ Rule checks for the following conditions:
273299
- Ignores resources without a Get method
274300
- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
275301

302+
#### xgen-IPA-106-valid-operation-id
303+
304+
![warn](https://img.shields.io/badge/warning-yellow)
305+
The Operation ID must start with the verb “create” and should be followed by a noun or compound noun.
306+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.
307+
308+
##### Implementation details
309+
Rule checks for the following conditions:
310+
- Applies only to POST methods on resource collection paths
311+
- Generates the expected OperationId given the resource identifier
312+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
313+
276314

277315

278316
### IPA-107
@@ -344,6 +382,19 @@ Rule checks for the following conditions:
344382
- Validation only applies to schema references to a predefined schema (not inline)
345383
- Confirms the referenced schema name ends with "Request" suffix
346384

385+
#### xgen-IPA-107-valid-operation-id
386+
387+
![warn](https://img.shields.io/badge/warning-yellow)
388+
The Operation ID must start with the verb “update” and should be followed by a noun or compound noun.
389+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.
390+
If the resource is a singleton resource, the last noun may be the plural form of the collection identifier.
391+
392+
##### Implementation details
393+
Rule checks for the following conditions:
394+
- Validation checks the PATCH/PUT methods for single resource paths and [singleton resources](https://go/ipa/113).
395+
- Generates the expected OperationId given the resource identifier
396+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
397+
347398

348399

349400
### IPA-108
@@ -388,6 +439,18 @@ Rule checks for the following conditions:
388439
- Fails if any requestBody is defined for the DELETE method
389440
- Skips validation for collection endpoints (without path parameters)
390441

442+
#### xgen-IPA-108-valid-operation-id
443+
444+
![warn](https://img.shields.io/badge/warning-yellow)
445+
The Operation ID must start with the verb “delete” and should be followed by a noun or compound noun.
446+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.
447+
448+
##### Implementation details
449+
Rule checks for the following conditions:
450+
- Applies to all DELETE methods for single resource endpoints (with path parameters)
451+
- Generates the expected OperationId given the resource identifier
452+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
453+
391454

392455

393456
### IPA-109
@@ -433,6 +496,22 @@ Rule checks for the following conditions:
433496
- Fails if multiple colons appear in the path
434497
- Fails if other than an alphabetical character or a closing curly brace appears before a colon
435498

499+
#### xgen-IPA-109-valid-operation-id
500+
501+
![warn](https://img.shields.io/badge/warning-yellow)
502+
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.
503+
If the custom Operation ID has a verb + noun, the Operation ID should end with the noun.
504+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier.
505+
The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form, where the last noun:
506+
- Is in plural form if the method applies to a collection of resources
507+
- Is in singular form if the method applies to a single resource
508+
509+
##### Implementation details
510+
Rule checks for the following conditions:
511+
- Applies only to paths containing custom method identifiers (with colon format)
512+
- Generates the expected OperationId given the resource identifier and the method name portion following the colon
513+
- Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
514+
436515

437516

438517
### IPA-110

0 commit comments

Comments
 (0)