Skip to content
Snippets Groups Projects
.spectral.yml 588 B
Newer Older
extends:
  - spectral:oas
  path-parameters-camelcase:
    given: $..parameters[?(@.in == 'path')].name
    then:
      function: casing
      functionOptions:
        type: camel
        disallowDigits: true
    message: Path parameters should be camelCase and not contain digits
    severity: error

  query-parameters-camelcase:
    given: $..parameters[?(@.in == 'query')].name
    then:
      function: casing
      functionOptions:
        type: camel
        disallowDigits: true
    message: Query parameters should be camelCase and not contain digits
    severity: error