Skip to main content

generate_openapi_effective

Function generate_openapi_effective 

Source
pub fn generate_openapi_effective(
    engine: &Engine,
    proofs_enabled: bool,
    effective: &DateTimeValue,
) -> Value
Expand description

Generate a complete OpenAPI 3.1 specification for a specific point in time.

The specification includes:

  • Spec endpoints (/{spec_name}) with ?hash= and ?rules= query parameters
  • GET operations (schema) and POST operations (evaluate) with Accept-Datetime header
  • Response schemas with evaluation envelope (spec, effective, hash, result)
  • Meta routes (/, /health, /openapi.json, /docs)

When proofs_enabled is true, the spec adds the x-proofs header parameter to evaluation endpoints and describes the optional proof object in responses.