Skip to content

[suggestion] Get apis property from either SystemProperties or additionalProperties #4937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,12 @@ private void generateApis(List<File> files, List<Object> allOperations, List<Obj
}
Map<String, List<CodegenOperation>> paths = processPaths(this.openAPI.getPaths());
Set<String> apisToGenerate = null;
String apiNames = GlobalSettings.getProperty("apis");
String apiNames = GlobalSettings.getProperty(CodegenConstants.APIS);

if (apiNames == null || StringUtils.isBlank(apiNames)) {
apiNames = (String) opts.getConfig().additionalProperties().get(CodegenConstants.APIS);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work… it would mean that generators can no longer support an apis additional property for other reasons as any setting here would cause no API classes to get generated.

Can you provide an example of how you've configured the Maven plugin? I think it would be best to fix system property support there.

}

if (apiNames != null && !apiNames.isEmpty()) {
apisToGenerate = new HashSet<String>(Arrays.asList(apiNames.split(",")));
}
Expand Down