Interface ApiVersionInserter.Builder
- Enclosing interface:
ApiVersionInserter
public static interface ApiVersionInserter.Builder
Builder for
ApiVersionInserter.- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theApiVersionInserterinstance.Configure the inserter to set a header.useMediaTypeParam(@Nullable String param) Create an inserter to set a MediaType parameter on the "Content-Type" header.usePathSegment(@Nullable Integer pathSegmentIndex) Configure the inserter to insert a path segment.useQueryParam(@Nullable String queryParam) Configure the inserter to set a query parameter.withVersionFormatter(ApiVersionFormatter versionFormatter) Format the version Object into a String using the givenApiVersionFormatter.
-
Method Details
-
useHeader
Configure the inserter to set a header.- Parameters:
header- the name of the header to hold the version
-
useQueryParam
Configure the inserter to set a query parameter.- Parameters:
queryParam- the name of the query parameter to hold the version
-
useMediaTypeParam
Create an inserter to set a MediaType parameter on the "Content-Type" header.- Parameters:
param- the name of the media type parameter to hold the version
-
usePathSegment
Configure the inserter to insert a path segment.- Parameters:
pathSegmentIndex- the index of the path segment to hold the version
-
withVersionFormatter
Format the version Object into a String using the givenApiVersionFormatter.By default, the version is formatted with
Object.toString().- Parameters:
versionFormatter- the formatter to use
-
build
ApiVersionInserter build()Build theApiVersionInserterinstance.
-