Package springfox.documentation.builders
Class DocumentationBuilder
- java.lang.Object
-
- springfox.documentation.builders.DocumentationBuilder
-
public class DocumentationBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DocumentationBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DocumentationBuilder
apiListingsByResourceGroupName(java.util.Map<java.lang.String,java.util.List<ApiListing>> apiListings)
Updates the map with new entriesDocumentationBuilder
basePath(java.lang.String basePath)
Base path for this APIDocumentation
build()
static java.util.Comparator<ApiListing>
byListingPosition()
DocumentationBuilder
consumes(java.util.Set<java.lang.String> mediaTypes)
Updates the existing media types with new entries that this documentation consumesDocumentationBuilder
extensions(java.util.List<VendorExtension> extensions)
Adds extensions for this APIDocumentationBuilder
externalDocumentation(java.util.function.Consumer<ExternalDocumentationBuilder> consumer)
Adds external documentation information for this APIDocumentationBuilder
host(java.lang.String host)
Updates the host (name or ip) serving this api.DocumentationBuilder
name(java.lang.String groupName)
Name of the documentation groupDocumentationBuilder
produces(java.util.Set<java.lang.String> mediaTypes)
Updates the existing media types with new entries that this documentation producesDocumentationBuilder
resourceListing(java.util.function.Consumer<ResourceListingBuilder> consumer)
Updates the resource listingDocumentationBuilder
resourceListing(ResourceListing resourceListing)
Deprecated.DocumentationBuilder
schemes(java.util.Set<java.lang.String> schemes)
Updates the schemes this api supportsjava.util.function.Function<java.util.function.Consumer<ServerBuilder>,DocumentationBuilder>
server(java.lang.String name)
Adds servers information for this APIDocumentationBuilder
tags(java.util.Set<Tag> tags)
Updates the tags with new entries
-
-
-
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
@Deprecated public DocumentationBuilder resourceListing(ResourceListing resourceListing)
Deprecated.Updates the resource listing- Parameters:
resourceListing
- - resource listing- Returns:
- this
- Since:
- 3.0.0
Prefer fluent builder api
resourceListing(Consumer)
-
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()
-
build
public Documentation build()
-
-