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
  • #3828
Closed
Open
Issue created Sep 04, 2019 by Administrator@rootContributor

[REQ] [Dart] Avoid using part and create mini libraries instead

Created by: nickmeinhold

Is your feature request related to a problem? Please describe.

I had to refactor the templates from using part to creating mini libraries because having models as parts caused problems. That was for my case but more generally, I think it might be a better and is the recommended approach.

Describe the solution you'd like

Refactor the templates to avoid using part

Describe alternatives you've considered

I think there are arguments to be made both ways. The official line is to avoid using part and create mini libraries instead

Using part does makes life easier in creating/editing generators as a set of part files are like one big file, but that does lose the potential benefits of having 'library private' access between files and can mean less control over what is ultimately exposed.

Also, using part for models and apis also can limit having an extra step with dart codegen that uses part (although that may be less of a concern for most people)

Additional context

https://dart.dev/guides/libraries/create-library-packages https://stackoverflow.com/a/27764138/1992736

Assignee
Assign to
Time tracking