OpenAPITools / OpenAPITools/openapi-generator
[REQ][typescript-fetch] Clarify import statement for bundle file size
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
My team are trying minimize bundle javascript file size.
Currently, Import Statement of generated client codes in '/apis' as follow:
// apis/PetsApi.ts
import {
Pet,
PetFromJSON,
PetToJSON,
} from '../models';
Describe the solution you'd like
The following code has a smaller bundle file size.
// apis/PetsApi.ts
import {
Pet,
PetFromJSON,
PetToJSON,
} from '../models/Pet';
Describe alternatives you've considered
Please give me your advice if you have any ideas.
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
Start by locating the typescript-fetch generator entry point that produces /apis/PetsApi.ts and its ../models imports. Compare the generated imports with the proposed ../models/Pet form, then verify that generated clients use per-model imports and that the resulting bundle-size behavior is covered by the relevant generator tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- performance, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100