Newer
Older
David Schwarzmann
committed
- 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
rules:
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
cache-responses-undocumented: 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