Skip to content
Snippets Groups Projects
.spectral.yml 930 B
Newer Older
extends:
  - spectral:oas
  - https://italia.github.io/api-oas-checker/spectral-generic.yml
  - https://italia.github.io/api-oas-checker/spectral-security.yml

functionsDir: './functions'
functions:
  - pagination-response

  no-default-additionalProperties: off
  string-maxlength: hint
  typed-enum: error
  response-with-json-object: error

  # Disabled, since we don't want a /status endpoint.
  # See https://git.fitko.de/fit-connect/api/-/merge_requests/37
  paths-status: off
  paths-status-return-problem: off
  paths-status-problem-schema: off

  use-semver: off # Versioning is handled by CI
  patch-media-type: off
  check-for-pagination:
    description: An operation that returns a list and less than 4 properties could perhaps support pagination.
    message: '{{error}}'
    severity: warn
    given:
      - $.paths.*[get]
    then:
      function: pagination-response