File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
tools/spectral/ipa/rulesets Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,19 @@ rules:
100100 function : ' IPA104GetMethodHasNoRequestBody'
101101 xgen-IPA-104-valid-operation-id :
102102 description : |
103-
104- message : ' {{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-105-valid-operation-id'
105- severity : warn
103+ The Operation ID must start with the verb “get” and should be followed by a noun or compound noun.
104+ The noun(s) in the Operation ID should be the collection identifiers from the resource identifier in singular form.
105+ If the resource is a singleton resource, the last noun may be the plural form of the collection identifier.
106+
107+ ##### Implementation details
108+ Rule checks for the following conditions:
109+ - Applies only to GET methods on single resources or singleton resources
110+ - Generates the expected OperationId given the resource identifier
111+ - Confirms that the existing operationId is compliant with generated IPA Compliant OperationId
112+ message : ' {{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-104-valid-operation-id'
113+ severity : off
106114 given : ' #GetOperationObject'
107115 then :
108116 function : ' IPA104ValidOperationID'
109117 functionOptions :
110- methodName : ' get'
111- prefixes : ['/api']
118+ methodName : ' get'
You can’t perform that action at this time.
0 commit comments