Name flag is not respected when --modular is also provided
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- nodejs, typescript
Research direction
Look at the CLI argument parsing and file generation logic, likely in the main entry point or a modular generation module. The issue is that the -n flag is ignored when --modular is set. Check how the output file names are determined in modular mode and ensure the -n flag is respected for the main API file. Running the provided command should reproduce the bug, and a test can verify the fix.
Written by the indexing model from the issue text.
Description
When I run:
swagger-typescript-api --extract-enums --modular -p ./app/api/openapi.json -o ./app/api/sdk -n generated.server.ts
These files are generated
app/api/sdk/data-contracts.ts
app/api/sdk/http-client.ts
app/api/sdk/Api.ts
It looks like the -n flag is discarded when used with the --modular flag. I couldn't figure out any way to change the output file names when using the --modular flag from the readme.
I would expect app/api/sdk/Api.ts to be named app/api/sdk/generated.server.ts based on the -n flag.
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 436
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from acacode/swagger-typescript-api
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
acacode/swagger-typescript-api#1821 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
acacode/swagger-typescript-api#1638 · 3 comments · 10 reactions ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#1237 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#1146 · 3 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
acacode/swagger-typescript-api#988 · 1 comment · 1 reaction ·
All issues in acacode/swagger-typescript-api
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100