Skip to content

Commit 5cf019f

Browse files
CLOUDP-284437: Add Spectral rule to ensure operationId uses camelcase
1 parent a7ecd91 commit 5cf019f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/spectral/.spectral.yaml

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

125+
xgen-docs-operationId-camel-case:
126+
description: operationId should be camelCased.
127+
given: "operationId"
128+
severity: error
129+
then:
130+
function: casing
131+
functionOptions:
132+
type: camel
133+
125134
xgen-docs-parameter-examples-or-schema:
126135
message: "No example or schema provided for {{property}}."
127136
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)