swagger-api / swagger-api/swagger-codegen

[Dart] Add support for import-mappings in dart code generation

Open
#7,884 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

For eg. running a command such as
java -jar ~/Downloads/swagger-codegen-cli-2.4.0-20180321.021831-185.jar generate -i openapi.json -l dart -o dart --import-mappings JsonMap=my.models.JsonMap
should result in my.models.JsonMap being imported and used

Right now, it has no effect

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented swagger-codegen CLI command with openapi.json and the Dart generator, then trace how the --import-mappings option reaches Dart code generation. Done means a mapping such as JsonMap=my.models.JsonMap causes the generated Dart code to import and use my.models.JsonMap instead of ignoring the option.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, openapi
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.