Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #10646
Closed
Open
Issue created Oct 20, 2021 by Administrator@rootContributor

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

Created by: 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
Assignee
Assign to
Time tracking