Skip to content

The content of the openapi.json document has not been generated. #3701

@zsf513

Description

@zsf513

AbstractLauncher.java

public abstract class AbstractLauncher extends Jooby {
    {
        install(new OpenAPIModule());
        List<MvcExtension> mvcExtensions = getMvc();
        if(mvcExtensions != null && !mvcExtensions.isEmpty()) {
            for (MvcExtension mvcExtension : mvcExtensions) {
                mvc(mvcExtension);
            }
        }
    }
    protected abstract List<MvcExtension> getMvc();
}

Launcher.java

public class Launcher extends AbstractLauncher {
    @Override
    protected List<MvcExtension> getMvc() {
        return List.of(
                new UserController_()
        );
    }

   public static void main(String[] args) {
        runApp(args, Launcher::new);
    }
}

When I execute the mvn clean compile package, there is no interface documentation content in the generated openapijson. But when Launcher. java directly inherits Jooby and uses mvc(new UserController_()) directly, it can.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions