Class RedocUI

java.lang.Object
org.apache.juneau.marshall.swap.spi.ObjectSwap<OpenApi,Div>
org.apache.juneau.bean.openapi3.ui.RedocUI

public class RedocUI extends ObjectSwap<OpenApi,Div>
Generates a Redoc-style documentation interface from an OpenAPI 3.1 document.

Renders a two-column layout — a left sidebar containing the operation table-of-contents and a right content panel with full operation descriptions, parameters, request/response schemas, and components.

This is a sibling of OpenApiUI that provides a documentation-page-style rendering rather than the interactive collapsing-block layout. Both are server-rendered HTML — neither bundles external JavaScript packages.

See Also:
  • Constructor Details

  • Method Details

    • forMediaTypes

      Description copied from class: ObjectSwap
      Returns the media types that this swap is applicable to.

      This method can be overridden to programmatically specify what media types it applies to.

      This method is the programmatic equivalent to the @Swap(mediaTypes) annotation.

      See Also:
      Overrides:
      forMediaTypes in class ObjectSwap<OpenApi,Div>
      Returns:
      The media types that this swap is applicable to, or null if it's applicable for all media types.
    • swap

      public Div swap(MarshallingSession session, OpenApi openApi) throws Exception
      Description copied from class: ObjectSwap
      If this transform is to be used to serialize non-serializable objects, it must implement this method.

      The object must be converted into one of the following serializable types:

      • String
      • Number
      • Boolean
      • Collection containing anything on this list.
      • Map containing anything on this list.
      • A java bean with properties of anything on this list.
      • An array of anything on this list.
      Overrides:
      swap in class ObjectSwap<OpenApi,Div>
      Parameters:
      session - The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.
      openApi - The object to be transformed.
      Returns:
      The transformed object.
      Throws:
      Exception - If a problem occurred trying to convert the output.