Package dev.relism.flash.ext.openapi
Class Ui<S extends Ui<S>>
java.lang.Object
dev.relism.flash.ext.openapi.Ui<S>
- Type Parameters:
S- the concrete UI, so every setter chains whatever the order
- Direct Known Subclasses:
Ui.Redoc,Ui.Scalar,Ui.Swagger
The documentation page served beside the spec: Swagger UI, Redoc or Scalar. Each knows its own
bundle and its own options; what they share — the page around it, the custom stylesheet, the
escape hatch for an option this class does not name — lives here.
new OpenApiExtension("/openapi", "My API", "1.0.0")
.ui(Ui.scalar().theme(Ui.Scalar.Theme.PURPLE).layout(Ui.Scalar.Layout.CLASSIC).darkMode(true));
Options are the upstream ones, spelled as the upstream documents them, and land in the
configuration object verbatim. The typed methods cover what is worth naming; anything else goes
through option(String, Object), including whole nested objects (Redoc's theme).
The bundle comes from jsDelivr at a pinned version. cdn(String) points that
elsewhere — a mirror, a proxy, or the files served by the application itself.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRedoc community edition, pinned to 2.x.static final classScalar's API reference, pinned to 1.x.static final classSwagger UI, pinned to 5.x. -
Method Summary
Modifier and TypeMethodDescriptionfinal SWhere the bundle is loaded from, without a trailing slash.final SCSS appended to the page, after the bundle's own.static Ui<?> none()No page at all — the spec routes stay.final SAny option this class does not name, as its upstream documentation spells it;nulldrops it.static Ui.Redocredoc()Redoc: three panels, read-only, the most printable of the three.static Ui.Scalarscalar()Scalar: the modern one, with themes and an API client built in.static Ui.Swaggerswagger()Swagger UI: the one that lets you fire requests from the page.
-
Method Details
-
swagger
Swagger UI: the one that lets you fire requests from the page. -
redoc
Redoc: three panels, read-only, the most printable of the three. -
scalar
Scalar: the modern one, with themes and an API client built in. -
none
No page at all — the spec routes stay.nullis the absence of a UI, and this names it. -
cdn
Where the bundle is loaded from, without a trailing slash. Default: jsDelivr, at a pinned version. -
customCss
CSS appended to the page, after the bundle's own. -
option
Any option this class does not name, as its upstream documentation spells it;nulldrops it.
-