Class DocumentationBuilder


  • public class DocumentationBuilder
    extends java.lang.Object
    • Constructor Detail

      • DocumentationBuilder

        public DocumentationBuilder()
    • Method Detail

      • name

        public DocumentationBuilder name​(java.lang.String groupName)
        Name of the documentation group
        Parameters:
        groupName - - group name
        Returns:
        this
      • apiListingsByResourceGroupName

        public DocumentationBuilder apiListingsByResourceGroupName​(java.util.Map<java.lang.String,​java.util.List<ApiListing>> apiListings)
        Updates the map with new entries
        Parameters:
        apiListings - - entries to add to the existing documentation
        Returns:
        this
      • resourceListing

        public DocumentationBuilder resourceListing​(@NonNull
                                                    java.util.function.Consumer<ResourceListingBuilder> consumer)
        Updates the resource listing
        Parameters:
        consumer - - consumer that provides a resource listing builder
        Returns:
        this
      • tags

        public DocumentationBuilder tags​(java.util.Set<Tag> tags)
        Updates the tags with new entries
        Parameters:
        tags - - new tags
        Returns:
        this
      • produces

        public DocumentationBuilder produces​(java.util.Set<java.lang.String> mediaTypes)
        Updates the existing media types with new entries that this documentation produces
        Parameters:
        mediaTypes - - new media types
        Returns:
        this
      • consumes

        public DocumentationBuilder consumes​(java.util.Set<java.lang.String> mediaTypes)
        Updates the existing media types with new entries that this documentation consumes
        Parameters:
        mediaTypes - - new media types
        Returns:
        this
      • host

        public DocumentationBuilder host​(java.lang.String host)
        Updates the host (name or ip) serving this api.
        Parameters:
        host - - new host
        Returns:
        this
      • schemes

        public DocumentationBuilder schemes​(java.util.Set<java.lang.String> schemes)
        Updates the schemes this api supports
        Parameters:
        schemes - - new schemes
        Returns:
        this
      • basePath

        public DocumentationBuilder basePath​(java.lang.String basePath)
        Base path for this API
        Parameters:
        basePath - - base path
        Returns:
        this
      • extensions

        public DocumentationBuilder extensions​(java.util.List<VendorExtension> extensions)
        Adds extensions for this API
        Parameters:
        extensions - - extensions
        Returns:
        this
      • server

        public java.util.function.Function<java.util.function.Consumer<ServerBuilder>,​DocumentationBuilder> server​(java.lang.String name)
        Adds servers information for this API
        Parameters:
        name - - servers
        Returns:
        this
      • externalDocumentation

        public DocumentationBuilder externalDocumentation​(@NonNull
                                                          java.util.function.Consumer<ExternalDocumentationBuilder> consumer)
        Adds external documentation information for this API
        Parameters:
        consumer - - external documentation reference
        Returns:
        this
      • byListingPosition

        public static java.util.Comparator<ApiListing> byListingPosition()