Skip to main content

health-info-schema-status-in-required

Requires the /health/info success response schema to list status as required.

AttributeValue
CategorySchema
MaturityGold
OpenAPISwagger 2.0; OpenAPI 3.0, 3.1, 3.2
StarterOff
Lenient–StrictWarning
CompleteError

Intent

Detailed health responses should always expose their aggregate state, not only the underlying checks.

Flags

The first 2xx response schema of the first GET path ending in /health/info when its required array does not contain status.

Does not flag

Other paths, health-info endpoints without a 2xx content schema, or schemas that require status.

See it fail

schema:
type: object
required: [checks]
properties:
status:
type: string
checks:
type: array

status is declared but optional.

Fix it

schema:
type: object
required: [status, checks]
properties:
status:
type: string
checks:
type: array

Configure

profiles:
default:
rules:
extends: [recommended]
override:
health-info-schema-status-in-required: error

Nearby: health-schema-checks-in-required, health-schema-status-in-required.