@ Override public void process ( ) throws Exception { // if the deployment is Implicit, we don't want to process it if ( deploymentContext != null && deploymentContext . isImplicit ( ) ) { return ; } try { // First register OpenApiServletContextListener which triggers the final init WARArchive warArchive = archive . as ( WARArchive . class ) ; warArchive . findWebXmlAsset ( ) . addListener ( LISTENER_CLASS ) ; } catch ( Exception e ) { throw new RuntimeException ( "Failed to register OpenAPI listener" , e ) ; } OpenApiStaticFile staticFile = ArchiveUtil . archiveToStaticFile ( archive ) ; // Set models from annotations and static file OpenApiDocument openApiDocument = OpenApiDocument . INSTANCE ; openApiDocument . config ( config ) ; openApiDocument . modelFromStaticFile ( OpenApiProcessor . modelFromStaticFile ( staticFile ) ) ; openApiDocument . modelFromAnnotations ( OpenApiProcessor . modelFromAnnotations ( config , index ) ) ; }
Process the deployment in order to produce an OpenAPI document .