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 Type
    Method
    Description
    default void
    execute(OpenAPI openApi)
    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

      default void execute(OpenAPI openApi)
      This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw an UnsupportedOperationException.
      Parameters:
      openApi - the parsed OpenAPI for which the post-processing should be done
    • execute

      default void execute(String content, PostProcessorType postProcessorType)
      This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw an UnsupportedOperationException.
      Parameters:
      content - the written file content as JSON or YAML format
      postProcessorType - the post processor type that can be used to distinguish calls for JSON and YAML
    • execute

      default void execute(Path file, PostProcessorType postProcessorType)
      This method must be overridden for the actual post-processing call. Otherwise, the default implementation will throw an UnsupportedOperationException.
      Parameters:
      file - the generated json or yaml file
      postProcessorType - 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 between Integer.MIN_VALUE and Integer.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