Open ahoehma opened 7 months ago
I found the "problem" :) It has nothing todo with the maven plugin itself and how it read/merge the config. This is all fine. Its all about the "context-id" :-) (Singletons are ugly)
This line in io.swagger.v3.oas.integration.GenericOpenApiContextBuilder is causing the trouble:
OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);
If no context-id is given then the maven plugin is using ${project.artifactId} as default. So also in case multiple executions with different settings are expected which results at end in using the same open-api-context again and again.
So its not really a bug or something ... its more a missing hint in the documentation.
I found the "problem" :) It has nothing todo with the maven plugin itself and how it read/merge the config. This is all fine. Its all about the "context-id" :-) (Singletons are ugly)
This line in io.swagger.v3.oas.integration.GenericOpenApiContextBuilder is causing the trouble:
OpenApiContext ctx = OpenApiContextLocator.getInstance().getOpenApiContext(ctxId);
If no context-id is given then the maven plugin is using ${project.artifactId} as default. So also in case multiple executions with different settings are expected which results at end in using the same open-api-context again and again.
So its not really a bug or something ... its more a missing hint in the documentation.
Maybe its more appropriate to use outputFileName as a default?
I define multiple executions for swagger-maven-plugin-jakarta and it seems that the resourceClasses from the first execution is re-used in all following executions.
All the generated outputs have the same content :-)
May there is a wrong data-handling in the plugin, i,e static variable or something?!