0
votes

I am building a custom connector for Azure Logic Apps (at the moment it consists of only a values controller: https://github.com/halllo/AzureLogicAppsCustomConnector).

When I try to Import my actions from an OpenAPI URL it fails. enter image description here

When I download from that URL and select swagger.json file, it can import it and recognizes the actions. After I provide summaries everything looks good. enter image description here

I update the connector and everything still looks good. enter image description here

Next I create a new Logic App and select my new custom connector. But when I click on either of my actions, I says:

Operation ... was not found in swagger.

enter image description here

What am I missing?

2

2 Answers

1
votes

Try adding host in the swagger file it should work:

{
    "swagger": "2.0",
    "info": {
        "version": "v1",
        "title": "MyValues"
    },
    "host": "api.contoso.com",
    "paths": {
        "/api/Values": {
            "get": {
                "tags": [ "Values" ],
                "operationId": "GetAllValues",
                "consumes": [],
                "produces": [ "text/plain", "application/json", "text/json" ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success",
                        "schema": {
                            "uniqueItems": false,
                            "type": "array",
                            "items": { "type": "string" }
                        }
                    }
                }
            },
            "post": {
                "tags": [ "Values" ],
                "operationId": "AddNewValue",
                "consumes": [ "application/json-patch+json", "application/json", "text/json", "application/*+json" ],
                "produces": [],
                "parameters": [
                    {
                        "name": "value",
                        "in": "body",
                        "required": false,
                        "schema": { "type": "string" }
                    }
                ],
                "responses": { "200": { "description": "Success" } }
            }
        }
    },
    "definitions": {}
}
0
votes

Under "Edit Logic Apps Custom Connector" in general section, don't use https in host text box

enter image description here