Skip to content

Commit

Permalink
fixed urls of open api locations
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter committed Jul 10, 2024
1 parent 4cdc57b commit e8ba148
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -181,6 +181,7 @@ private Configuration getConfiguration(boolean indexConfig) {
config.setDependenciesExcludeScopes(dependenciesExcludeScopes);
config.setDependenciesMappingFile(dependenciesMappingFile);
config.setDependenciesIncludeGroups(dependenciesIncludeGroups);
config.setOpenApiBasePath(openApiBasePath);
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/main/resources/templates/openApi.qute
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit e8ba148

Please sign in to comment.