diff --git a/src/main/java/org/tkit/maven/docs/quarkus/DocumentationMojo.java b/src/main/java/org/tkit/maven/docs/quarkus/DocumentationMojo.java index cfb0eaf..f6caf38 100644 --- a/src/main/java/org/tkit/maven/docs/quarkus/DocumentationMojo.java +++ b/src/main/java/org/tkit/maven/docs/quarkus/DocumentationMojo.java @@ -99,7 +99,7 @@ public class DocumentationMojo extends AbstractDocsMojo { @Parameter(name = "openApiFiles", property = "tkit.docs.generate.openApi.file") protected String[] openApiFiles; - @Parameter(name = "openApiBasePath", property = "tkit.docs.generate.openApi.path", defaultValue = "src/main/openapi/") + @Parameter(name = "openApiBasePath", property = "tkit.docs.generate.openApi.path", defaultValue = "main/src/main/openapi") protected String openApiBasePath; @Parameter(name = "openApi", property = "tkit.docs.generate.openApi", defaultValue = "true") @@ -181,6 +181,7 @@ private Configuration getConfiguration(boolean indexConfig) { config.setDependenciesExcludeScopes(dependenciesExcludeScopes); config.setDependenciesMappingFile(dependenciesMappingFile); config.setDependenciesIncludeGroups(dependenciesIncludeGroups); + config.setOpenApiBasePath(openApiBasePath); return config; } diff --git a/src/main/java/org/tkit/maven/docs/quarkus/docs/Configuration.java b/src/main/java/org/tkit/maven/docs/quarkus/docs/Configuration.java index d9f7377..ec20314 100644 --- a/src/main/java/org/tkit/maven/docs/quarkus/docs/Configuration.java +++ b/src/main/java/org/tkit/maven/docs/quarkus/docs/Configuration.java @@ -27,6 +27,7 @@ public class Configuration { private List<String> dependenciesExcludeScopes; private String dependenciesMappingFile; private String currentOpenApiFile; + private String openApiBasePath; public String getExtensionsFile() { return extensionsFile; @@ -209,4 +210,11 @@ public void setCurrentOpenApiFile(String openApiFile) { public String getCurrentOpenApiFile() { return currentOpenApiFile; } + + public void setOpenApiBasePath(String openApiBasePath) { + this.openApiBasePath = openApiBasePath; + } + public String getOpenApiBasePath() { + return openApiBasePath; + } } diff --git a/src/main/resources/templates/openApi.qute b/src/main/resources/templates/openApi.qute index 954570e..e715d2c 100644 --- a/src/main/resources/templates/openApi.qute +++ b/src/main/resources/templates/openApi.qute @@ -1,4 +1,4 @@ {#if container.config.isOpenApi} :page-layout: swagger -:page-swagger-url: https://raw.githubusercontent.com/onecx/{container.project.name}/{container.config.currentOpenApiFile} +:page-swagger-url: https://raw.githubusercontent.com/onecx/{container.project.name}/{container.config.openApiBasePath}/{container.config.currentOpenApiFile} {/if} \ No newline at end of file