swagger-api / swagger-api/swagger-codegen-generators
[typescript] Incorrect `extends null<...>` declaration for map/dictionary-like schema definitions with `additionalProperties`
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
OpenApi Schema
"MyDictionary": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
Generated TypeScript
/**
*
* @export
* @interface ProviderIdDictionary
*/
export interface ProviderIdDictionary extends null<String, string> {
[key: string]: string;
}
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 no source file or test; start by locating the TypeScript generator path for schemas using additionalProperties, then reproduce the shown map-like schema. Done means the generated declaration is valid TypeScript without the incorrect null generic and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100