-
- All Superinterfaces:
Service
- All Known Implementing Classes:
OpenApiUiBase
public interface OpenApiUi extends Service
Behavior for OpenAPI UI implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
OpenApiUi.Builder<B extends OpenApiUi.Builder<B,T>,T extends OpenApiUi>
Builder for anOpenApiUi
.
-
Field Summary
Fields Modifier and Type Field Description static String
UI_WEB_SUBCONTEXT
Default subcontext within theOpenAPISupport
instance's web context (which itself defaults to "/openapi".
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static OpenApiUi.Builder<?,?>
builder()
Creates a builder for a newOpenApiUi
instance.boolean
prepareTextResponseFromMainEndpoint(ServerRequest request, ServerResponse response)
Gives the UI an opportunity to respond to a request arriving at theOpenAPISupport
endpoint for which the best-acceptedMediaType
wastext/html
.MediaType[]
supportedMediaTypes()
Indicates the media types the UI implementation itself supports.
-
-
-
Field Detail
-
UI_WEB_SUBCONTEXT
static final String UI_WEB_SUBCONTEXT
Default subcontext within theOpenAPISupport
instance's web context (which itself defaults to "/openapi".- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
static OpenApiUi.Builder<?,?> builder()
Creates a builder for a newOpenApiUi
instance.- Returns:
- new builder
-
supportedMediaTypes
MediaType[] supportedMediaTypes()
Indicates the media types the UI implementation itself supports.- Returns:
- the media types the
prepareTextResponseFromMainEndpoint(io.helidon.webserver.ServerRequest, io.helidon.webserver.ServerResponse)
method responds to
-
prepareTextResponseFromMainEndpoint
boolean prepareTextResponseFromMainEndpoint(ServerRequest request, ServerResponse response)
Gives the UI an opportunity to respond to a request arriving at theOpenAPISupport
endpoint for which the best-acceptedMediaType
wastext/html
.An implementation should return
true
if it is responsible for a particular media type whether it handled the request itself or delegated the request to the next handler. For example, even if the implementation is disabled it should still returntrue
for the HTML media type.- Parameters:
request
- the request for HTML contentresponse
- the response which could be prepared and sent- Returns:
- whether the UI did respond to the request
-
-