mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
[csharp] Fix generation inconsistency of test folder (#10738)
* Use the specified 'sourceFolder' from additional properties for the 'testFolder' property.
This commit is contained in:
parent
29be352deb
commit
a77a90f545
@ -281,6 +281,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
// {{sourceFolder}}
|
// {{sourceFolder}}
|
||||||
if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) {
|
if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) {
|
||||||
setSourceFolder((String) additionalProperties.get(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 {
|
} else {
|
||||||
additionalProperties.put(CodegenConstants.SOURCE_FOLDER, this.sourceFolder);
|
additionalProperties.put(CodegenConstants.SOURCE_FOLDER, this.sourceFolder);
|
||||||
}
|
}
|
||||||
@ -1152,6 +1155,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
this.sourceFolder = sourceFolder;
|
this.sourceFolder = sourceFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTestFolder(String testFolder) {
|
||||||
|
this.testFolder = testFolder;
|
||||||
|
}
|
||||||
|
|
||||||
public String getInterfacePrefix() {
|
public String getInterfacePrefix() {
|
||||||
return interfacePrefix;
|
return interfacePrefix;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user