cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Unknown swagger type "array"

I'm pointing to Swagger 2.0 file  to create a Custom Connector. But I get this error:

 

Your custom connector has been successfully updated, but there was an issue converting it to WADL for PowerApps: An error occured while converting OpenAPI file to WADL file. Error: 'Unknown swagger type "array" at JSON path...

 

The offending "array" reference appears as below: 

 

 

 < = =

"/analyses/{webId}/security": {
"get": {
"tags": [
"Analysis"
],
"summary": "Get the security information of the specified security item associated with the Analysis for a specified user.",
"operationId": "Analysis_GetSecurity",
"consumes": [],
"produces": [
"application/json",
"text/json",
"text/html",
"application/x-ms-application"
],
"parameters": [
{
"name": "webId",
"in": "path",
"description": "The ID of the Analysis for the security to be checked.",
"required": true,
"type": "string"
},
{
"name": "userIdentity",
"in": "query",
"description": "The user identity for the security information to be checked. Multiple security identities may be specified with multiple instances of the parameter. If the parameter is not specified, only the current user's security rights will be returned.",
"required": true,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "forceRefresh",
"in": "query",
"description": "Indicates if the security cache should be refreshed before getting security information. The default is 'false'.",
"required": false,
"type": "boolean"
},
{
"name": "selectedFields",
"in": "query",
"description": "List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Security rights.",
"schema": {
"$ref": "#/definitions/Items[SecurityRights]"
}
},
"400": {
"description": "An invalid or local account is specified as the user identity.",
"schema": {
"$ref": "#/definitions/Errors"
}
},
"401": {
"description": "Access denied for the specified user identity.",
"schema": {
"$ref": "#/definitions/Errors"
}
},
"409": {
"description": "Unsupported when using Anonymous authentication method.",
"schema": {
"$ref": "#/definitions/Errors"
}
},
"502": {
"description": "Failed to retrieve the specified user identity.",
"schema": {
"$ref": "#/definitions/Errors"
}
}
},
"deprecated": false
}
},

= = >

5 REPLIES 5
Anonymous
Not applicable

API calls work as expected in the TEST tab of the Custom Connector definition.  However, when I use the Custom Connector in a new Power App, I get the error:

 

No wadlUrl is specified for this Api. This usually indicates there was an error when converting the Swagger associated with this api to a WADL file.
apiId: /providers/microsoft.powerapps/apis/shared_pi.20web.20api.202017.20swagger.20spec.5f9b2522-aa1b19423771772c

Anonymous
Not applicable

And, I don't get any error with the Swagger file when imported into http://editor.swagger.io/#/

Anonymous
Not applicable

I found my own answer; Swagger 2 to WADL is not supported as mentioned here:

https://github.com/LucyBot-Inc/api-spec-converter/issues/98

Does this mean only Swagger 1.2 is supported in Power App? 

Anonymous
Not applicable

However, when I tried another Swagger file, I get this error:

The request failed with error: 'Invalid Api definition object. Please specify a valid Swagger 2.0 Url and valid list of ServiceUrls.'.   

So PowerApp is expecting a Swagger 2 file.

pieronegridev
New Member

Hi!

did you manage to solve this?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,200)