Created by: rgroothuijsen
This PR fixes a bug that occurs when a method returns a map containing arrays of custom objects, for example Map<int, TestObject[]
>. While TestObject
in this case is recognized mostly correctly, it is not added to the imports because for the imports it only looks at the array itself, rather than the type of the values held in the array. The result is that the user needs to manually add the import to the generated code.
The parameterized type, in this case, appears to be instead located in additionalProperties.complexType
and should be added to the imports whenever the container type is a map and the map's value type is not a built-in type.
This is a fix for issue #6192.