Skip to main content

Module openapi

Module openapi 

Source
Expand description

The OpenAPI 3.1 document, as the PHP package’s Generator writes it, for each version.

Rust has no reflection, so each endpoint is declared with Config::endpoint, keyed by method and URI as GET /v1/orders, with its summary, response, query and request body. The document lists the declared endpoints each version serves; undeclared finds API routes that are missing. Resource schemas come from the registered Resources, named as each version names them.

Structs§

Endpoint
What the OpenAPI document says about one endpoint.
Gap
Something the API reference has no description for, as api:docs:lint lists it.

Functions§

generate
The registered Fusion Stack’s document for a version (None for the latest, or the only one when versioning is off). Err names a version the API does not have.
pretty
The document as PHP’s JSON_PRETTY_PRINT writes it, indented by four spaces.
serve
Serves the document at a route such as /openapi.json, for the version in ?version=, or the latest. An unknown version is a 404.
undeclared
The routes with the FusionStack middleware that no Config::endpoint describes, as GET /v1/orders, for a lint command: Rust cannot find their handlers, so the document leaves them out.
undocumented
What the latest version’s document has no description for, sorted by kind, item and location.