fix(spectral): indentation

This commit is contained in:
Anatolii Zetilov
2020-03-17 16:10:47 +02:00
parent 4db4ab83de
commit 580cc0cee9

View File

@@ -9,17 +9,16 @@ rules:
operation-tags: false
operation-2xx-response: error
adidas-paths-camelCase:
description: All YAML/JSON paths MUST follow camelCase
adidas-paths-kebab-case:
description: All YAML/JSON paths MUST follow kebab-case with template variables in camelCase
severity: warn
recommended: true
message: "{{property}} is not camelCase: {{error}}"
message: "{{property}} is not kebab-case: {{error}}"
given: $.paths[*]~
then:
function: pattern
functionOptions:
# match: "/^(\/{1}(([{]?[a-z])[A-Za-z0-9]*[}]?)*)+$/" # - more generic one, allows /asasd{asdas}sadas pattern but also not closed braces
match: "^\/([a-z][a-zA-Z0-9]+)?(\/[a-z][a-zA-Z0-9]+|\/{[a-z][a-zA-Z0-9]+})*$" # doesn't allow /asasd{asdas}sadas pattern or not closed braces
match: "^\/([a-z0-9]+(-[a-z0-9]+)*)?(\/[a-z0-9]+(-[a-z0-9]+)*|\/{[a-z][a-zA-Z0-9]+})*$" # doesn't allow /asasd{asdas}sadas pattern or not closed braces
adidas-definitions-camelCase-alphanumeric:
description: All YAML/JSON definitions MUST follow fields-camelCase and be ASCII alphanumeric characters or `_` or `$`.
@@ -52,17 +51,6 @@ rules:
functionOptions:
notMatch: "/^body$/"
adidas-uri-template-cannot-dash:
description: "The 'URI' template (RFC 6570 - https://tools.ietf.org/html/rfc6570) cannot contain a '-' character"
severity: error
recommended: true
message: "{{property}}: {{description}}"
given: "$.paths[*]~"
then:
function: pattern
functionOptions:
notMatch: "/-/"
adidas-headers-no-x-headers:
description: "All 'HTTP' headers SHOULD NOT include 'X-' headers (https://tools.ietf.org/html/rfc6648)."
severity: warn