Skip to content

Commit 1bdea9e

Browse files
CLOUDP-284437: Add Spectral rule to ensure operationId uses camelcase (#284)
1 parent a420df0 commit 1bdea9e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/spectral/.spectral.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ rules:
122122
functionOptions:
123123
match: "^[A-Za-z0-9-._~:/?#\\[\\]@!\\$&'()*+,;=]*$"
124124

125+
xgen-docs-operationId-camel-case:
126+
description: operationId should be camelCased.
127+
given: "$.paths[*]..operationId"
128+
severity: error
129+
message: "Operation ID should be camelCase: {{value}}."
130+
then:
131+
function: casing
132+
functionOptions:
133+
type: camel
134+
125135
xgen-docs-parameter-examples-or-schema:
126136
message: "No example or schema provided for {{property}}."
127137
description: "Without providing a well defined schema or example(s) an API consumer will have a hard time knowing how to interact with this API."

0 commit comments

Comments
 (0)