Duplicated definitions in Swagger file

I am developing on P10. I have exposed a few REST APIs. When opening the swagger documentation, it shows the wrong response model. Apparently, it seems OutSystems will generate duplicated definitions based on the output parameter names instead of data type.


E.g.

RESTAPIMethod1 

    Body output parameter 

        Name: Response.

        Data Type: Result Record (this is integer)

RESTAPIMethod2

    Body output parameter 

        Name: Response.

        Data Type: Result Record (this is date time)


The Documentation page shows that the Response output data type is the same for both APIs.

ResultRecord {

    Result (date-time, optional)

}

I looked inside the swagger file and sees 2 definitions for ResultRecord.

The 1st ResultRecord has an integer property. The 2nd has a datetime property.

Apparently, because the definition names are the same for both APIs, it will caused duplication of definition even though the data type are different. 

I found a workaround. If I changed the name from Result to MyResult for any one of the APIs, it will show the correct output data type for both APIs. However, I don't want to rename the property name because I will have a lot of APIs.


I tested on P11 and it creates definition based on data types instead of parameter names so there is no issue in P11. 


ss1.png shows RESTAPIMethod1 has a output parameter named Response containing a Integer attribute named Result.

ss2.png shows RESTAPIMethod2 has a output parameter named Response containing a date time attribute named Result.

ss3.png shows the response message data type for both APIs. Both are date time.

ss4.png shows the same screen except in model view.

ss5.png shows the swagger file containing 2 ResultRecord definitions, The 1st contains integer; the 2nd contains datetime.

I don't have a P10 instance handy to test against, but it might be helpful to share an OML with a simple repro, in case someone who is still on P10 can lend a hand in troubleshooting.