Skip to content

Commit b304582

Browse files
CLOUDP-274986: Add validation
1 parent 389cb6d commit b304582

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/spectral/.spectral.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ rules:
186186
functionOptions:
187187
notMatch: "/[^/]+/:[a-zA-Z]+$"
188188

189+
xgen-security-override:
190+
description: "Security must not be set at resource or method level because it is set globally. Use @Unauthenticated annotation to set no security. https://go/openapi-unauthenticated-annotation"
191+
severity: error
192+
given: "#OperationObject.security"
193+
then:
194+
function: schema
195+
functionOptions:
196+
schema:
197+
type: array
198+
items:
199+
type: object
200+
minItems: 0
201+
maxItems: 0
202+
189203
overrides:
190204
- files: # load sample data has an issue with different path param names for different VERBS
191205
- "*.yaml#/paths/~1api~1atlas~1v1.0~1groups~1%7BgroupId%7D~1sampleDatasetLoad~1%7BsampleDatasetId%7D"

0 commit comments

Comments
 (0)