Skip to main content

Module openapi

Module openapi 

Source
Expand description

OpenAPI 3.0 spec generator for IntentLang specifications.

Generates an OpenAPI 3.0.3 JSON document from a parsed .intent AST. The output matches the REST API served by intent serve:

  • Each action becomes POST /actions/{ActionName}
  • Each entity becomes a JSON Schema component
  • Contracts (requires/ensures/invariants) are documented in descriptions

Functionsยง

generate
Generate an OpenAPI 3.0.3 spec from a parsed intent file.