Package org.openapitools.codegen
Class OpenAPINormalizer.Filter
- java.lang.Object
-
- org.openapitools.codegen.OpenAPINormalizer.BaseFilter
-
- org.openapitools.codegen.OpenAPINormalizer.Filter
-
- Enclosing class:
- OpenAPINormalizer
protected static class OpenAPINormalizer.Filter extends OpenAPINormalizer.BaseFilter
-
-
Field Summary
Fields Modifier and Type Field Description static StringMETHODprotected Set<String>methodFiltersstatic StringOPERATION_IDprotected Set<String>operationIdFiltersstatic StringPATHprotected Set<String>pathStartingWithFiltersstatic StringTAGprotected Set<String>tagFilters-
Fields inherited from class org.openapitools.codegen.OpenAPINormalizer.BaseFilter
filteringMethodsMap, hasFilter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(String path, io.swagger.v3.oas.models.PathItem pathItem, Map<String,Function<io.swagger.v3.oas.models.PathItem,io.swagger.v3.oas.models.Operation>> methodMap)Set<String>filteringMethods()protected booleanhasCustomFilterMatch(String path, io.swagger.v3.oas.models.Operation operation)Test if the OpenAPI contract match an extra filter.protected booleanlogIfMatch(String filterName, io.swagger.v3.oas.models.Operation operation, boolean filterMatched)protected voidlogMatch(String filterName, io.swagger.v3.oas.models.Operation operation)protected voidlogMatch(String filterName, String subjectId)booleanparse()Perform the parsing of the filter string.StringusageMessage()-
Methods inherited from class org.openapitools.codegen.OpenAPINormalizer.BaseFilter
getLogger, hasFilter, logIfMatch, parse, parseFails, splitByPipe
-
-
-
-
Field Detail
-
OPERATION_ID
public static final String OPERATION_ID
- See Also:
- Constant Field Values
-
METHOD
public static final String METHOD
- See Also:
- Constant Field Values
-
TAG
public static final String TAG
- See Also:
- Constant Field Values
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Filter
protected Filter(String filters)
-
-
Method Detail
-
filteringMethods
public Set<String> filteringMethods()
- Specified by:
filteringMethodsin classOpenAPINormalizer.BaseFilter
-
usageMessage
public String usageMessage()
- Specified by:
usageMessagein classOpenAPINormalizer.BaseFilter
-
logMatch
protected void logMatch(String filterName, String subjectId)
- Specified by:
logMatchin classOpenAPINormalizer.BaseFilter
-
parse
public boolean parse()
Description copied from class:OpenAPINormalizer.BaseFilterPerform the parsing of the filter string.- Overrides:
parsein classOpenAPINormalizer.BaseFilter- Returns:
- true if filters need to be processed
-
logIfMatch
protected boolean logIfMatch(String filterName, io.swagger.v3.oas.models.Operation operation, boolean filterMatched)
-
logMatch
protected void logMatch(String filterName, io.swagger.v3.oas.models.Operation operation)
-
hasCustomFilterMatch
protected boolean hasCustomFilterMatch(String path, io.swagger.v3.oas.models.Operation operation)
Test if the OpenAPI contract match an extra filter. Override this method to add custom logic.- Parameters:
operation- Openapi Operationpath- Path of the operation- Returns:
- true if the operation of path match the filter
-
-