Skip to main content
Check OpenAPI write-operation coverage against Kernite x-kernite contract and optional generated artifacts. For CI/CD pipeline usage patterns, see /integrations/ci-cd-policy-check. Endpoints:
  • POST /policy/check
  • POST /v1/policy/check

Request

{
  "openapi": {},
  "mapping": {},
  "bundle": {},
  "options": {
    "strict": true
  }
}
Fields:
  • openapi (required): OpenAPI 3.x JSON object
  • mapping (optional): generated mapping artifact (kernite.policy.mapping.v1)
  • bundle (optional): generated bundle artifact (kernite.policy.bundle.v1)
  • options.strict (optional, default true): when true, uncovered governance fails validation

Response

{
  "ctx_id": "ctx_...",
  "message": "Schema coverage check failed.",
  "data": {
    "valid": false,
    "summary": {
      "write_operations": 1,
      "violations": 1,
      "warnings": 0,
      "strict": true
    },
    "violations": [],
    "warnings": []
  }
}

Violation Codes

  • missing_x_kernite
  • invalid_x_kernite_field
  • missing_policy_key
  • mapping_missing_operation
  • bundle_missing_policy
  • unsupported_openapi_shape