mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
add toYamlCustomized / toJsonCustomized methods, that expose jackson's now-preferred Builder objects to be configured on instead of doing config directly on mapper objects.
This commit is contained in:
@ -104,7 +104,7 @@ public class PublishAPI implements Callable<Integer>
|
||||
// subsets of it (e.g., grouped by table mostly) - then we'll write out each such file //
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
OpenAPI openAPI = middlewareVersion.generateOpenAPIModel("qqq");
|
||||
String yaml = YamlUtils.toYaml(openAPI, mapper ->
|
||||
String yaml = YamlUtils.toYamlCustomized(openAPI, mapperBuilder ->
|
||||
{
|
||||
if(sortFileContentsForHuman)
|
||||
{
|
||||
@ -114,7 +114,7 @@ public class PublishAPI implements Callable<Integer>
|
||||
}
|
||||
else
|
||||
{
|
||||
mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
|
||||
mapperBuilder.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -112,9 +112,9 @@ public class ValidateAPIVersions implements Callable<Integer>
|
||||
// generate a new spec based on current code in codebase //
|
||||
///////////////////////////////////////////////////////////
|
||||
OpenAPI openAPI = middlewareVersion.generateOpenAPIModel("qqq");
|
||||
String yaml = YamlUtils.toYaml(openAPI, mapper ->
|
||||
String yaml = YamlUtils.toYamlCustomized(openAPI, mapperBuilder ->
|
||||
{
|
||||
mapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
|
||||
mapperBuilder.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user