APIs.json · API Governance Rules

APIs.json API Rules

Spectral linting rules defining API design standards and conventions for APIs.json.

34 Rules error 15 warn 12 info 7
View Rules File View on GitHub

Rule Categories

api common documentation maintainer no openapi property root specification

Rules

error
root-name-required
APIs.json root must have a name field
$
error
root-description-required
APIs.json root must have a description field
$
error
root-url-required
APIs.json root must have a url field pointing to the file location
$
warn
root-url-https
APIs.json root url should use HTTPS
$.url
error
root-created-required
APIs.json root must have a created date
$
error
root-modified-required
APIs.json root must have a modified date
$
error
root-specification-version-required
APIs.json root must have a specificationVersion field
$
warn
root-aid-recommended
APIs.json root should have an aid (unique identifier) field
$
warn
root-aid-format
APIs.json aid should follow the format domain:string
$.aid
warn
root-maintainers-recommended
APIs.json root should have maintainers defined
$
info
root-tags-recommended
APIs.json root should have tags for discoverability
$
info
root-image-recommended
APIs.json root should have an image URL for visual representation
$
error
maintainer-fn-required
Maintainer entries must have an FN (full name) field
$.maintainers[*]
error
maintainer-fn-not-empty
Maintainer FN must not be empty
$.maintainers[*].FN
warn
maintainer-email-format
Maintainer email should be a valid email format
$.maintainers[*].email
error
api-aid-required
Each API entry must have an aid (unique identifier)
$.apis[*]
warn
api-aid-format
API aid should follow the format domain:string
$.apis[*].aid
error
api-name-required
Each API entry must have a name
$.apis[*]
error
api-description-required
Each API entry must have a description
$.apis[*]
warn
api-description-min-length
API description should be descriptive (at least 20 characters)
$.apis[*].description
warn
api-human-url-required
Each API entry should have a humanURL
$.apis[*]
warn
api-human-url-https
API humanURL should use HTTPS
$.apis[*].humanURL
warn
api-base-url-https
API baseURL should use HTTPS
$.apis[*].baseURL
info
api-tags-recommended
Each API entry should have tags for discoverability
$.apis[*]
warn
api-properties-recommended
Each API entry should have at least one property
$.apis[*]
info
common-website-recommended
Common properties should include a Website entry
$.common
error
property-type-required
Each property entry must have a type field
$..properties[*]
error
property-url-or-data-required
Each property entry must have either a url or data field
$..properties[*]
warn
property-url-https
Property URLs should use HTTPS
$..properties[*].url
error
no-empty-names
Name fields must not be empty strings
$..name
error
no-empty-descriptions
Description fields must not be empty strings
$..description
info
specification-version-current
specificationVersion should use the latest stable version (0.19)
$.specificationVersion
info
documentation-property-recommended
APIs should have a Documentation property for human-readable reference
$.apis[*].properties[*].type
info
openapi-property-recommended
APIs should have an OpenAPI property for machine-readable interface definition
$.apis[*].properties[*].type