Skip to content
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

Fix issue #12071. #12072

Open
wants to merge 1 commit into
base: 3.0.0
Choose a base branch
from
Open
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 @@ -465,9 +465,6 @@ public int compare(String o1, String o2) {
}

private void generateApis(List<File> files, List<Object> allOperations, List<Object> allModels) {
if (!generateApis) {
return;
}
boolean hasModel = true;
if (allModels == null || allModels.isEmpty()) {
hasModel = false;
Expand Down Expand Up @@ -537,6 +534,12 @@ public int compare(CodegenOperation one, CodegenOperation another) {
}
}

// Some target languages refer to API operations in
// their supporting files and so we always process the
// API operations above, even when we need to skip the
// actual API generation.
if (!generateApis) continue;

for (String templateName : config.apiTemplateFiles().keySet()) {
String filename = config.apiFilename(templateName, tag);
if (!config.shouldOverwrite(filename) && new File(filename).exists()) {
Expand Down