Skip to content

Commit

Permalink
[csharp-netcore] Fix keys of the enum reference map (#13242)
Browse files Browse the repository at this point in the history
  • Loading branch information
fujieda authored Aug 23, 2022
1 parent 9afcbab commit b5fe7d0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public void processOpts() {
// {{sourceFolder}}
if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) {
setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER));

// TODO: Move to its own option when a parameter for 'testFolder' is added.
setTestFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER));
} else {
Expand Down Expand Up @@ -472,7 +472,7 @@ protected List<Map<String, Object>> buildEnumVars(List<Object> values, String da
if ("string?".equals(dataType)){
enumVars.forEach((enumVar) -> {
enumVar.put("isString", true);
});
});
}

return enumVars;
Expand All @@ -493,7 +493,7 @@ private void postProcessEnumRefs(final Map<String, ModelsMap> models) {
for (Map.Entry<String, ModelsMap> entry : models.entrySet()) {
CodegenModel model = ModelUtils.getModelByName(entry.getKey(), models);
if (model.isEnum) {
enumRefs.put(entry.getKey(), model);
enumRefs.put(model.getClassname(), model);
}
}

Expand Down Expand Up @@ -1172,7 +1172,7 @@ public void setPackageAuthors(String packageAuthors) {
public void setSourceFolder(String sourceFolder) {
this.sourceFolder = sourceFolder;
}

public void setTestFolder(String testFolder) {
this.testFolder = testFolder;
}
Expand Down

0 comments on commit b5fe7d0

Please sign in to comment.