Class SwaggerUI

java.lang.Object
org.apache.juneau.swap.ObjectSwap<Swagger,Div>
org.apache.juneau.dto.swagger.ui.SwaggerUI

public class SwaggerUI extends ObjectSwap<Swagger,Div>
Generates a Swagger-UI interface from a Swagger document.
See Also:
  • Constructor Details

  • Method Details

    • forMediaTypes

      This UI applies to HTML requests only.
      Overrides:
      forMediaTypes in class ObjectSwap<Swagger,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(BeanSession beanSession, Swagger swagger) 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<Swagger,Div>
      Parameters:
      beanSession - The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.
      swagger - The object to be transformed.
      Returns:
      The transformed object.
      Throws:
      Exception - If a problem occurred trying to convert the output.