health-schema-checks
Requires the success response schema of a GET health-info endpoint to define checks.
| Attribute | Value |
|---|---|
| Category | Schema |
| Maturity | Gold |
| OpenAPI | Swagger 2.0; OpenAPI 3.0, 3.1, 3.2 |
| Starter | Off |
| Lenient–Strict | Warning |
| Complete | Error |
Intent
A checks collection exposes the individual dependency or subsystem results behind the aggregate health state.
Flags
The first 2xx response schema of the first GET path whose normalized path ends in /health/info when properties.checks is absent.
Does not flag
Other paths, non-GET operations, health-info endpoints without a 2xx content schema, or schemas that define checks.
See it fail
paths:
/health/info:
get:
responses:
'200':
description: Health details
content:
application/health+json:
schema:
type: object
properties:
status:
type: string
Diagnostic: Health info schema should define `checks`.
Fix it
paths:
/health/info:
get:
responses:
'200':
description: Health details
content:
application/health+json:
schema:
type: object
properties:
status:
type: string
checks:
type: array
items:
type: object
Configure
profiles:
default:
rules:
extends: [recommended]
override:
health-schema-checks: error
Nearby: health-endpoint, health-schema-checks-in-required.