Skip to content

OpenAPI Metadata

The openapi target generates openapi_{filename}.json for HTTP-style interfaces.

Terminal window
xidlc gen --out-dir generated openapi api.idl

The generator reads the following pragmas to populate the document metadata:

  • package -> info.title
  • version -> info.version
#pragma xidlc package "Smart City Public APIs"
#pragma xidlc version "v2.0.0"

If omitted, the generator falls back to default metadata. See Compiler Pragmas for the full pragma reference, including service endpoint declarations.