Skip to content

[dart-dio-next] How to have more control over the sourceFolder? #10646

@stijnmelis

Description

@stijnmelis

Description

There's a config option sourceFolder metnioned in the config options for dart-dio-next: https://openapi-generator.tech/docs/generators/dart-dio-next/

However, when I set the folder in my yaml config file, it always appends lib/src to it. E.g. I want my client source code to end up in the /lib/client package. If I put this in the sourceFolder, the result I end up with is /lib/client/lib/src/. Using lib/client instead doesn't help.
Tried putting just client in my config yaml file, and then adding -o ./lib to my command line but that doesn't help either.

Looking at the code here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java
On line 184 and further, I assume those lib and src strings are being hardcoded in the sourceFolder, correct?

Can this be changed, so we actually have the option to set the sourceFolder as we want it?

openapi-generator version

Latest one: openapi-generator-cli-5.3.0-20210907.065732-24.jar

OpenAPI declaration file content or url

The config yaml file I use:

Config options for the dart-dio-next generator

pubName: MyProject
pubVersion: 0.0.1
sourceFolder: lib/client

Command line used for generation

java -DapiTests=false -DmodelTests=false -DapiDocs=false -DmodelDocs=false -jar openapi-generator-cli.jar generate -i openapi.yaml -g dart-dio-next -c open-generator-config.yaml

Steps to reproduce

  • Add a sourceFolder to the config yaml file
  • Run the generator
  • See that the generated files will always be in /lib/src

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions