json2jsii
json2jsii copied to clipboard
Duplicate static `from*` helper methods are produced
Given the following snippet from a JSON Schema:
{
"shell": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"]
}
]
}
}
Will produce invalid code, where fromString is duplicated:
export class Shell {
public static fromString(value: string): Shell {
return new Shell(value);
}
public static fromString(value: string): Shell {
return new Shell(value);
}
private constructor(public readonly value: string | string) {
}
}