swagger-api / swagger-api/swagger-codegen
[TypescriptAngular] Several Bugs
Open
Nobody has claimed this yet.
Client: TypeScript
Issue: Bug
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
- When
interfacesoption is activated:
- It generates
"endpoint".serviceInterface-like files. - However
"endpoint.service.tsclass:import { AccountServiceInterface } from './AccountServiceInterface';So,AccountServiceInterfacefile doesn't exist. So compiler breaks.
- When
inerfacesoption is activated:
- It generates
"endpoint".serviceInterface-like files. - On there models are imported. Currently, I'm not using any model, however it generates this line:
import * as models from '../model/models';. So compiler breaks.
- Also,
index.tsalso exports models, regardless of whether models exist.
- This line is generated:
export * from './model/models'; - So, compiler is telling: `file: ...index.ts' .../models.ts is not a module.'
Swagger-codegen version
I'm using last 3.0.0 branch.
Contributor guide
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.
Research direction
Inspect the TypeScript Angular templates or entry points that generate endpoint.service.ts, service-interface files, index.ts, and model/models.ts. Reproduce generation with interfaces enabled and no models, then verify the generated project compiles without imports or exports for files that were not created.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100