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.fromHeader(@Nullable String header) Configure the inserter to set a header.fromPathSegment(@Nullable Integer pathSegmentIndex) Configure the inserter to insert a path segment.fromQueryParam(@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
-
fromHeader
Configure the inserter to set a header.- Parameters:
header- the name of the header to hold the version
-
fromQueryParam
Configure the inserter to set a query parameter.- Parameters:
queryParam- the name of the query parameter to hold the version
-
fromPathSegment
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.
-