cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Custom Connector Type Mismatch error - how to allow mixed type of data

My custom connector returns a type mismatch error. The API's response sometimes contain an array (for more than 1 record) or an object (for 1 record). How do I configure the custom connector to allow mixed type of data.
Can I use Swagger 3.0 definition since it support OneOf and AnyOf option which allows mixed type.
If not how do I do it in OpenAPI 2?

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Unfortunately, this is currently a limitation on the platform.

 

I can think of the following workarounds-

(1) Do not provide a schema - will mean that customers will need to parse the response and use it based on whether they are expecting one or more than one. Not a great option.

(2) You could provide 2 actions - one for object and another for the array. They can point to the same API endpoint using a policy. Customers will need to pick the appropriate action. Again, not a great option.

 

In future, we may provide ability to handle/normalize this in the connector itself (map it array, for instance). This is easier and will probably come out sonner. The other is support for multiple schemas (anyOf) in our platform - which is a harder challenge.   

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,484)