Skip to content

Commit 6fb4001

Browse files
CLOUDP-310538: Remove duplicate legacy rules
1 parent d639d66 commit 6fb4001

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

tools/spectral/.spectral.yaml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ aliases:
1616
- "$.components.schemas[*]..properties[?(@ && @.type)]"
1717

1818
rules:
19-
xgen-schema-properties-camel-case:
20-
description:
21-
All properties in the schema must be camelCase. http://go/ipa/112
22-
severity: error
23-
recommended: true
24-
message: "`{{property}}` MUST follow camelCase"
25-
given: "$.components.schemas..properties[*]~"
26-
then:
27-
function: pattern # casing?
28-
functionOptions:
29-
match: "/^[a-z$_]{1}[A-Z09$_]*/" # type: camel ?
30-
3119
xgen-schema-name-pascal-case:
3220
description: OpenAPI Schema names should use PascalCase. PascalCase ensures consistency with OpenAPI generated code.
3321
message: "`{{property}}` name must follow PascalCase. Please verify if you have provided valid @Schema(name='') annotation"
@@ -38,41 +26,6 @@ rules:
3826
functionOptions:
3927
match: "^[A-Z].*" # type: pascal ?
4028

41-
xgen-description:
42-
description: "Use this field to describe the action performed by each specific API endpoint or property, to provide context for how to use it to the users of the API."
43-
message: "{{error}}."
44-
severity: error
45-
given: "#DescribableObjects"
46-
then:
47-
- field: "description"
48-
function: truthy
49-
- field: "description"
50-
function: pattern
51-
functionOptions:
52-
match: "/^[A-Z]/"
53-
- field: "description"
54-
function: pattern
55-
functionOptions:
56-
match: "\\.|\|$"
57-
58-
xgen-request-GET-no-body:
59-
description: "A 'GET' request MUST NOT accept a 'body` parameter. http://go/ipa/104"
60-
severity: error
61-
given: $.paths..get.parameters..in
62-
then:
63-
function: pattern
64-
functionOptions:
65-
notMatch: "/^body$/"
66-
67-
xgen-request-DELETE-no-body:
68-
description: "A 'DELETE' request MUST NOT accept a 'body` parameter. http://go/ipa/108"
69-
severity: error
70-
given: $.paths..delete.parameters..in
71-
then:
72-
function: pattern
73-
functionOptions:
74-
notMatch: "/^body$/"
75-
7629
xgen-docs-tags-alphabetical:
7730
message: "Tags should be defined in alphabetical order."
7831
description: "Many documentation tools show tags in the order they are defined, so defining them not in alphabetical order can look funny to API consumers."
@@ -185,17 +138,6 @@ rules:
185138
match: "^mms(,[a-zA-Z0-9_-]+)*$"
186139
message: "'additionalServices' must start with 'mms' and can include additional services in a comma-separated format."
187140

188-
no-slash-before-custom-method:
189-
description: "Custom methods (e.g., ':applyItem') should not be preceded by a '/'."
190-
message: "The path '{{path}}' contains a '/' before a custom method. Custom methods should not start with a '/'."
191-
severity: error
192-
given: "$.paths"
193-
then:
194-
field: "@key"
195-
function: pattern
196-
functionOptions:
197-
notMatch: "/[^/]+/:[a-zA-Z]+$"
198-
199141
xgen-security-override:
200142
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"
201143
severity: error

0 commit comments

Comments
 (0)