CE-1887 rename method generate to generateOpenAPIModel

This commit is contained in:
2024-10-17 12:40:08 -05:00
parent cde7a60ae0
commit 8dedc98866
3 changed files with 5 additions and 5 deletions

View File

@ -159,7 +159,7 @@ public class QMiddlewareApiSpecHandler
{ {
try try
{ {
OpenAPI openAPI = new MiddlewareVersionV1().generate(basePath); OpenAPI openAPI = new MiddlewareVersionV1().generateOpenAPIModel(basePath);
context.contentType(ContentType.APPLICATION_YAML); context.contentType(ContentType.APPLICATION_YAML);
context.result(YamlUtils.toYaml(openAPI)); context.result(YamlUtils.toYaml(openAPI));
} }
@ -178,7 +178,7 @@ public class QMiddlewareApiSpecHandler
{ {
try try
{ {
OpenAPI openAPI = new MiddlewareVersionV1().generate(basePath); OpenAPI openAPI = new MiddlewareVersionV1().generateOpenAPIModel(basePath);
context.contentType(ContentType.APPLICATION_JSON); context.contentType(ContentType.APPLICATION_JSON);
context.result(JsonUtils.toJson(openAPI)); context.result(JsonUtils.toJson(openAPI));
} }
@ -246,7 +246,7 @@ public class QMiddlewareApiSpecHandler
throw (new QUserFacingException("Unrecognized version: " + version)); throw (new QUserFacingException("Unrecognized version: " + version));
} }
OpenAPI openAPI = middlewareSpec.get().generate(basePath); OpenAPI openAPI = middlewareSpec.get().generateOpenAPIModel(basePath);
html = html.replace("{title}", openAPI.getInfo().getTitle() + " - " + version); html = html.replace("{title}", openAPI.getInfo().getTitle() + " - " + version);
StringBuilder otherVersionOptions = new StringBuilder(); StringBuilder otherVersionOptions = new StringBuilder();

View File

@ -103,7 +103,7 @@ public class PublishAPI implements Callable<Integer>
// build the openapi spec - then run it through a "grouping" function, which will make several // // build the openapi spec - then run it through a "grouping" function, which will make several //
// subsets of it (e.g., grouped by table mostly) - then we'll write out each such file // // subsets of it (e.g., grouped by table mostly) - then we'll write out each such file //
///////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////
OpenAPI openAPI = middlewareVersion.generate("qqq"); OpenAPI openAPI = middlewareVersion.generateOpenAPIModel("qqq");
String yaml = YamlUtils.toYaml(openAPI, mapper -> String yaml = YamlUtils.toYaml(openAPI, mapper ->
{ {
if(sortFileContentsForHuman) if(sortFileContentsForHuman)

View File

@ -111,7 +111,7 @@ public class ValidateAPIVersions implements Callable<Integer>
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
// generate a new spec based on current code in codebase // // generate a new spec based on current code in codebase //
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
OpenAPI openAPI = middlewareVersion.generate("qqq"); OpenAPI openAPI = middlewareVersion.generateOpenAPIModel("qqq");
String yaml = YamlUtils.toYaml(openAPI, mapper -> String yaml = YamlUtils.toYaml(openAPI, mapper ->
{ {
mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true); mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);