I need to manually define certain of the external component schemas because our code-gen library is not able to understand what this plugin generates. For that reason, for such modules, I'm annotating the component with @Schema(ref = "PackageName"). This plugin then successfully generates the open-api definition and references the components correctly.
However, the component itself becomes a self reference component:
I'm using the default configuration in my pom:
I need to manually define certain of the external component schemas because our code-gen library is not able to understand what this plugin generates. For that reason, for such modules, I'm annotating the component with
@Schema(ref = "PackageName")
. This plugin then successfully generates the open-api definition and references the components correctly.However, the component itself becomes a self reference component:
Instead, I want to be able to define this component myself so I can set it to be
I created a feature request here https://github.com/openapi-tools/swagger-maven-plugin/issues/66 since securitySchema can now be defined in the pom configuration. In the meantime, I wanted to know if there are any workarounds to get this to work?