vojtechhabarta / typescript-generator

Generates TypeScript from Java - JSON declarations, REST service client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid 'customTypeMapping' format: string>

FunctionalHacker opened this issue · comments

Hi, I'm trying to map all instances of java.util.collection<MyClass> to Record<string,string> and I'm encountering this error

Execution generate of goal cz.habarta.typescript-generator:typescript-generator-maven-plugin:3.2.1263:generate failed: Invalid 'customTypeMapping' format: string>

My configuration

<configuration>
    <customTypeMappings>
        java.util.Collection&lt;MyClass&gt;:Record&lt;string,string&gt;
    </customTypeMappings>
</configuration>

I also tried the alternative syntax

<configuration>
    <customTypeMappings>
        java.util.Collection[MyClass]:Record[string,string]
    </customTypeMappings>
</configuration>

Also tried with Map

<configuration>
    <customTypeMappings>
        java.util.Collection[MyClass]:Map[string,string]
    </customTypeMappings>
</configuration>

The only thing I've gotten to work is mapping it to string in TypeScript

<configuration>
    <customTypeMappings>
        java.util.Collection[MyClass]:string
    </customTypeMappings>
</configuration>