-
-
Notifications
You must be signed in to change notification settings - Fork 129
Contributed Linter Rules
Mike Ralphson edited this page Feb 17, 2020
·
5 revisions
name: components-must-exist
object: metadata.count
disabled: false
description: Components object must be present
truthy: components
disallow-uri-versioning-in-paths
by @pderaaij
name: disallow-uri-versioning-in-paths
object: pathItem
description: paths shouldn't contain version numbers
pattern:
property: "$key"
split: "/"
value: "^((?!v[0-9]).)*$"
headers-must-be-pascal-cased
by @pderaaij
name: headers-must-be-pascal-cased
object: header
description: header must be in the form of Pascal-Case, separated by hyphens
pattern:
property: "$key"
value: "^[A-Z][a-z-](?:[A-Z][a-z-]*)*$"
path-segments-lowercased-hyphens
by @pderaaij
name: path-segments-lowercased-hyphens
object: paths
description: path items must be lowercase and separated with hyphens
pattern:
property: "$key"
split: "/"
value: "^{[^}]*}$|^([a-z-\/]*)$"
name: refs-must-exist
object: metadata.count
disabled: false
description: Reference objects must be present
truthy: reference
response-must-be-integer
by @pderaaij
name: response-must-be-integer
object: response
description: response must be an valid HTTP status code
pattern:
property: "$key"
value: "^([0-9])*$"
schema-property-name-snake-case
by @pderaaij
name: schema-property-name-snake-case
object: schema
disabled: false,
description: "schema property must be in snake_case"
pattern:
property: "$key"
omit: "properties/"
value: "^([a-z_])*$"