Interface ReaderListener


  • public interface ReaderListener
    Listener providing hooks for customizing automatically generated OpenAPI definitions in a JAX-RS environment. Any classes picked up during the scanning process implementing this interface will be instantiated via newInstance() and invoked before and after generating OpenAPI definitions, allowing code to add additional data or change the generated definition.
    • Method Detail

      • beforeScan

        void beforeScan​(OpenApiReader reader,
                        OpenAPI openAPI)
        Called before the OpenAPI definition gets populated from scanned classes. Use this method to pre-process the OpenAPI definition before it gets populated.
        Parameters:
        reader - the reader used to read annotations and build the openAPI definition
        openAPI - the initial OpenAPI definition
      • afterScan

        void afterScan​(OpenApiReader reader,
                       OpenAPI openAPI)
        Called after a OpenAPI definition has been populated from scanned classes. Use this method to post-process OpenAPI definitions.
        Parameters:
        reader - the reader used to read annotations and build the OpenAPI definition
        openAPI - the configured OpenAPI definition