Skip to main content

Module openapi

Module openapi 

Source
Expand description

OpenAPI 3.1 emission.

This document is a projection for tooling, not a description of a running HTTP surface. The server speaks WebSocket, carrying {method, seq, params} frames; there are no URLs. The paths here are synthesized so that OpenAPI tooling — client generators, doc renderers, OpenAPI→MCP bridges — has something to chew on. Generating an HTTP client from this and pointing it at the server will not work. The AsyncAPI document (see crate::asyncapi) is the authoritative description of the wire protocol.

That warning is repeated in the emitted info.description and in docs/openapi-README.md, because an undocumented synthetic path map is worse than no document at all: it looks usable.

Conventions (PLAN-2.1 §3.1), which mirror the RON namespace (service_name, service_id):

POST /{serviceName}/{endpoint_snake_name}
  operationId: {serviceName}_{endpoint_snake_name}
  tags:        [{serviceName}]

Functions§

build_openapi
Builds the document. Separated from writing so tests can assert on the value without touching a filesystem.
gen_openapi
Writes docs/openapi.json.