OpenAPITools / OpenAPITools/openapi-generator
[question] [typescript] Any way to add lastModified property for generated Blob?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Or override it from global.d.ts?
I'm working on a React Native project, the generated code for some reason doesn't have lastModified property for Blob object.
Simply adding a property with value Date.now() and it's happy, like so:
if (productCondition !== undefined) {
localVarFormParams.append('ProductCondition', new Blob([JSON.stringify(productCondition)], { type: "application/json", lastModified: Date.now() }));
}
Eventually I'll need to automate the regeneration of the api, any idea how to do this?
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
The issue names generated TypeScript code and global.d.ts but no repository file or generator. Start by identifying the TypeScript client template that emits Blob and reproduce the React Native output. Done means establishing whether lastModified should be generated or typed differently, documenting the supported approach, and covering it with an appropriate generator test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- api, mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100