Class OpenApiRenderer
java.lang.Object
io.fluxzero.sdk.web.OpenApiRenderer
Renders a generic
ApiDocCatalog as an OpenAPI JSON document.
The renderer intentionally uses a small inline schema generator instead of binding the SDK API to an OpenAPI-specific
model library. The generated schemas cover common Java primitives, enums, records, arrays, collections, maps, and
simple field-based POJOs. Validation annotations on map values are retained. String-compatible map-key constraints
are rendered as propertyNames in OpenAPI 3.1 and omitted in OpenAPI 3.0, where that keyword is unsupported.
Required metadata on a body or body/form parameter also marks the OpenAPI Request Body Object as required.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ObjectNoderender(ApiDocCatalog catalog) Renders the discovered API catalog as an OpenAPI JSON tree using catalog document information and renderer defaults.static com.fasterxml.jackson.databind.node.ObjectNoderender(ApiDocCatalog catalog, OpenApiOptions options) Renders the catalog's supported HTTP endpoints and schemas as an OpenAPI JSON tree, applying the supplied document options when present.static StringrenderJson(ApiDocCatalog catalog) Renders the catalog as compact OpenAPI JSON using catalog document information and renderer defaults.static StringrenderJson(ApiDocCatalog catalog, OpenApiOptions options) Renders the catalog as compact OpenAPI JSON with the supplied document options.static StringrenderPrettyJson(ApiDocCatalog catalog, OpenApiOptions options) Renders the catalog as formatted OpenAPI JSON with the supplied document options.
-
Method Details
-
render
Renders the discovered API catalog as an OpenAPI JSON tree using catalog document information and renderer defaults. -
render
public static com.fasterxml.jackson.databind.node.ObjectNode render(ApiDocCatalog catalog, OpenApiOptions options) Renders the catalog's supported HTTP endpoints and schemas as an OpenAPI JSON tree, applying the supplied document options when present. -
renderJson
Renders the catalog as compact OpenAPI JSON using catalog document information and renderer defaults. -
renderJson
Renders the catalog as compact OpenAPI JSON with the supplied document options. -
renderPrettyJson
Renders the catalog as formatted OpenAPI JSON with the supplied document options.
-