swagger-api / swagger-codegen-generators

Apache License 2.0
284 stars 421 forks source link

[typescript] Incorrect `extends null<...>` declaration for map/dictionary-like schema definitions with `additionalProperties` #1297

Open softworkz opened 3 months ago

softworkz commented 3 months ago

OpenApi Schema

    "MyDictionary": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }

Generated TypeScript

/**
 * 
 * @export
 * @interface ProviderIdDictionary
 */
export interface ProviderIdDictionary extends null<String, string> {
    [key: string]: string;
}
softworkz commented 3 months ago

Related: https://github.com/swagger-api/swagger-codegen-generators/issues/691

@micryc @frantuma - The related issue is 4 years old. Is there any chance to get this fixed?