Interface OpenAPIPostProcessor
- All Known Implementing Classes:
AsciidoctorPostProcessor
,FileWriterPostProcessor
public interface OpenAPIPostProcessor
This interface declares the actual post-processing method. All post-processing
methods that should be supported must override the default implementation within
this interface.
- Author:
- chhorz
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
This method must be overridden for the actual post-processing call.default void
execute
(String content, PostProcessorType postProcessorType) This method must be overridden for the actual post-processing call.default void
execute
(Path file, PostProcessorType postProcessorType) This method must be overridden for the actual post-processing call.int
Returns the value for the order in which the post processor should be executed.Defines the input types of the current post processor.
-
Method Details
-
execute
This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw anUnsupportedOperationException
.- Parameters:
openApi
- the parsedOpenAPI
for which the post-processing should be done
-
execute
This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw anUnsupportedOperationException
.- Parameters:
content
- the written file content as JSON or YAML formatpostProcessorType
- the post processor type that can be used to distinguish calls for JSON and YAML
-
execute
This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw anUnsupportedOperationException
.- Parameters:
file
- the generated json or yaml filepostProcessorType
- the post processor type that can be used to distinguish calls for JSON and YAML
-
getPostProcessorOrder
int getPostProcessorOrder()Returns the value for the order in which the post processor should be executed. Possible values are betweenInteger.MIN_VALUE
andInteger.MAX_VALUE
. The processors will be executed starting with the highest value.- Returns:
- the order in which the post processor should be executed
-
getPostProcessorType
List<PostProcessorType> getPostProcessorType()Defines the input types of the current post processor. The post processor is executed at a different step of the generation process depending on the input type.- Returns:
- a list of input types for the post processor
-