ifURI docs

Import an OpenAPI spec (add-openapi)

Turn an existing REST API into URI-addressed routes with no handler code. urirun add-openapi reads an OpenAPI document and emits declarative fetch bindings — one route per path × method — that flow through the normal compile / validate / run / MCP pipeline.

Usage

urirun add-openapi <openapi.json|url> --scheme <scheme> [--target <name>] [--base-url <url>]
FlagMeaning
specpath or URL to an openapi.json
--schemeURI scheme for the generated routes, e.g. ksef
--targetURI target / environment name (default: api)
--base-urloverride the base URL (else servers[0] from the spec)

What it generates

Each path × method becomes a route:

ksef://api/invoices/{id}/query/get      ->  GET  {base}/invoices/{id}
ksef://api/invoices/command/post        ->  POST {base}/invoices

Related

add-openapi is the OpenAPI front end to urirun's declarative HTTP connectors. For a hand-written spec, urirun connectors from-spec <spec.toml|json> turns an environments + routes table into the same fetch bindings — config, not code. See generating connectors and transports.