swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[CSHARP] test project is generated in default sourceFolder even when sourceFolder is set

Open ruimaciel opened this issue 1 year ago • 1 comments

Description

When creating a C# client with swagger-codegen-cli, if the user passes a config file with sourceFolder to any path other than the default then swagger-codegen-cli still outputs the test subproject to ./src.

Swagger-codegen version

3.0.57

Swagger declaration file content or url

N/A

Command line used for generation
{
    "sourceFolder":  "FooBar"
}
java -jar swagger-codegen-cli-3.0.57.jar generate -i ${OPENAPI_SPEC} \
	-l csharp \
	-c config.json 
Steps to reproduce

How to reproduce:

  1. create config.json
  2. set sourceFolder to something other than the default value of src.
  3. run swagger-codegen-cli with the config

Expected result:

  • store the test subproject alongside the client project (i.e., comply with sourceFolder, as per this)

Actual result:

  • the test subproject is outputted to ./src.
Related issues/PRs
  • https://github.com/swagger-api/swagger-codegen/pull/12432
Suggest a fix/enhancement
  • Add support for testFolder, as per this.

ruimaciel avatar Jul 28 '24 06:07 ruimaciel

@mandrean as per the PR checklist, could you please take a look at PR #12432 ? Thanks!

ruimaciel avatar Jul 28 '24 07:07 ruimaciel

Can anyone take a look at this issue? This is a bug report that already has a PR with a bugfix.

ruimaciel avatar Apr 30 '25 16:04 ruimaciel

@ruimaciel really appreciate the work you’ve put into this. Fix will be provided in #12563

daniel-kmiecik avatar Jun 27 '25 10:06 daniel-kmiecik