Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New designer does not fetch dynamic parameter input based on x-ms-dynamic-values in custom connector's swagger file #6154

Closed
jesseck3013 opened this issue Nov 20, 2024 · 4 comments · May be fixed by #6221
Assignees

Comments

@jesseck3013
Copy link

jesseck3013 commented Nov 20, 2024

Describe the Bug with repro steps

The parameter AdditionalFormIds is configured with x-ms-dynamic-values, but the designer does not fetch the dynamic values initially. However, after saving the workflow and refreshing the page, the issue is resolved, and the dropdown list appears. This problem does not occur in the legacy designer.

Image

Please check this video and my swagger file.

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
  "swagger": "2.0",
  "info": {
    "title": "Team Forms",
    "description": "Teams Forms brings digital forms into Microsoft Teams. The software will empower your teams to build and deliver forms from within the productivity tools that they already know and trust. Unlike many other forms solutions on the market, Team Forms talks directly with your Teams SharePoint so that data captured by forms remains in your ownership and never leaves your trusted office 365 environment.",
    "version": "1.1.0",
    "termsOfService": "https://teamforms.app/terms",
    "contact": {
      "name": "Team Forms",
      "url": "https://teamforms.app",
      "email": "[email protected]"
    }
  },
  "host": "api.teamforms.app",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [],
  "produces": [],
  "paths": {
    "/teams": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/teams"
            }
          }
        },
        "summary": "Get Teams",
        "description": "Get all teams.",
        "operationId": "Teams",
        "x-ms-visibility": "important",
        "parameters": []
      }
    },
    "/forms": {
      "get": {
        "responses": {
          "200": {
            "description": "A list of form meta data.",
            "schema": {
              "$ref": "#/definitions/formMetas"
            }
          }
        },
        "summary": "Get Forms",
        "description": "Get forms for a team.",
        "operationId": "Forms",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          }
        ]
      }
    },
    "/form": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/formSchema"
            }
          }
        },
        "summary": "Get Form",
        "description": "Get details for a specific form.",
        "operationId": "Form",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "$ref": "#/parameters/formId"
          }
        ]
      }
    },
    "/files": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/files"
            }
          }
        },
        "summary": "Get Response Attachments",
        "description": "Get the attachments uploaded for a specific response.",
        "operationId": "Files",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "$ref": "#/parameters/responseId"
          }
        ]
      }
    },
    "/pdf": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/file"
            }
          }
        },
        "summary": "Get Pdf",
        "description": "Get details on the generated pdf for a specific response.",
        "operationId": "Pdf",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "$ref": "#/parameters/responseId"
          }
        ]
      }
    },
    "/pdf-content": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/pdfFile"
            }
          }
        },
        "summary": "Get Pdf Content",
        "description": "Get the generated pdf for a specific response.",
        "operationId": "PdfContent",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "$ref": "#/parameters/responseId"
          }
        ]
      }
    },
    "/response": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/dynamicResponseSchema"
            }
          }
        },
        "summary": "Get Response",
        "description": "Get details for a specific response.",
        "operationId": "Response",
        "x-ms-visibility": "important",
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "$ref": "#/parameters/formId"
          },
          {
            "$ref": "#/parameters/responseId"
          }
        ]
      }
    },
    "/response-schema": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object"
            }
          }
        },
        "summary": "Get Response Schema",
        "description": "Get Response Schema.",
        "operationId": "ResponseSchema",
        "x-ms-visibility": "internal",
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "type": "string"
          },
          {
            "name": "formId",
            "in": "query",
            "type": "string"
          }
        ]
      }
    },
    "/response-subscription": {
      "x-ms-notification-content": {
        "description": "Webhook response",
        "schema": {
          "$ref": "#/definitions/dynamicResponseSchema"
        }
      },
      "post": {
        "responses": {
          "201": {
            "description": "created",
            "schema": {}
          }
        },
        "summary": "When a new form response is submitted",
        "description": "Triggered a flow when a response is submitted in Team Forms.",
        "operationId": "SubscribeResponse",
        "x-ms-visibility": "important",
        "x-ms-trigger": "single",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "name": "formId",
            "in": "query",
            "type": "string",
            "description": "Unique id for the form. Leave blank to trigger for all forms in the selected team.",
            "x-ms-summary": "Form",
            "x-ms-visibility": "important",
            "x-ms-dynamic-values": {
              "operationId": "Forms",
              "value-path": "fields/tfFormId",
              "value-title": "fields/tfTitle",
              "parameters": {
                "groupId": {
                  "parameter": "groupId"
                }
              }
            }
          },
          {
            "$ref": "#/parameters/environment"
          },
          {
            "$ref": "#/parameters/triggers"
          },
          {
            "name": "requestBody",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "webHookUrl": {
                  "type": "string",
                  "x-ms-visibility": "internal",
                  "x-ms-notification-url": true
                },
                "additionalFormIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "description": "Unique id for the form. Leave blank to trigger for all forms in the selected team.",
                    "x-ms-summary": "Form",
                    "x-ms-dynamic-values": {
                      "operationId": "Forms",
                      "value-path": "fields/tfFormId",
                      "value-title": "fields/tfTitle",
                      "parameters": {
                        "groupId": {
                          "parameter": "groupId"
                        }
                      }
                    }
                  }
                }
              },
              "required": [
                "webHookUrl"
              ]
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "status"
                }
              }
            }
          }
        },
        "summary": "Delete a subscription",
        "description": "Internal operation used to delete Webhook if the hook is edited or deleted",
        "operationId": "UnsubscribeResponse",
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "formId",
            "in": "query",
            "type": "string"
          },
          {
            "name": "webHookId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "x-ms-visibility": "internal"
      }
    },
    "/response-deletion-subscription": {
      "x-ms-notification-content": {
        "description": "Webhook response",
        "schema": {
          "$ref": "#/definitions/dynamicResponseSchema"
        }
      },
      "post": {
        "responses": {
          "201": {
            "description": "created",
            "schema": {}
          }
        },
        "summary": "When a form response is deleted",
        "description": "Triggered a flow when a response is deleted in Team Forms.",
        "operationId": "SubscribeResponseDeletion",
        "x-ms-visibility": "important",
        "x-ms-trigger": "single",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "$ref": "#/parameters/groupId"
          },
          {
            "name": "formId",
            "in": "query",
            "type": "string",
            "description": "Unique id for the form. Leave blank to trigger for all forms in the selected team.",
            "x-ms-summary": "Form",
            "x-ms-visibility": "important",
            "x-ms-dynamic-values": {
              "operationId": "Forms",
              "value-path": "fields/tfFormId",
              "value-title": "fields/tfTitle",
              "parameters": {
                "groupId": {
                  "parameter": "groupId"
                }
              }
            }
          },
          {
            "name": "requestBody",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "webHookUrl": {
                  "type": "string",
                  "x-ms-visibility": "internal",
                  "x-ms-notification-url": true
                }
              },
              "required": [
                "webHookUrl"
              ]
            }
          }
        ]
      },
      "delete": {
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "status"
                }
              }
            }
          }
        },
        "summary": "Delete a subscription",
        "description": "Internal operation used to delete Webhook if the hook is edited or deleted",
        "operationId": "UnsubscribeResponseDeletion",
        "parameters": [
          {
            "name": "groupId",
            "in": "query",
            "type": "string",
            "description": "",
            "required": true
          },
          {
            "name": "formId",
            "in": "query",
            "type": "string"
          },
          {
            "name": "webHookId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "x-ms-visibility": "internal"
      }
    }
  },
  "definitions": {
    "team": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "id"
        },
        "createdDateTime": {
          "type": "string",
          "description": "createdDateTime"
        },
        "displayName": {
          "type": "string",
          "description": "displayName"
        },
        "description": {
          "type": "string",
          "description": "description"
        },
        "internalId": {
          "type": "string",
          "description": "internalId"
        },
        "classification": {
          "type": "string",
          "description": "classification"
        },
        "specialization": {
          "type": "string",
          "description": "specialization"
        },
        "visibility": {
          "type": "string",
          "description": "visibility"
        },
        "webUrl": {
          "type": "string",
          "description": "webUrl"
        },
        "isArchived": {
          "type": "boolean",
          "description": "isArchived"
        },
        "tenantId": {
          "type": "string",
          "description": "tenantId"
        },
        "isMembershipLimitedToOwners": {
          "type": "string",
          "description": "isMembershipLimitedToOwners"
        },
        "memberSettings": {
          "type": "string",
          "description": "memberSettings"
        },
        "guestSettings": {
          "type": "string",
          "description": "guestSettings"
        },
        "messagingSettings": {
          "type": "string",
          "description": "messagingSettings"
        },
        "funSettings": {
          "type": "string",
          "description": "funSettings"
        },
        "discoverySettings": {
          "type": "string",
          "description": "discoverySettings"
        },
        "summary": {
          "type": "string",
          "description": "summary"
        }
      }
    },
    "teams": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/team"
      }
    },
    "formMeta": {
      "type": "object",
      "properties": {
        "@odata.etag": {
          "type": "string",
          "description": "@odata.etag"
        },
        "createdDateTime": {
          "type": "string",
          "description": "createdDateTime"
        },
        "eTag": {
          "type": "string",
          "description": "eTag"
        },
        "id": {
          "type": "string",
          "description": "id"
        },
        "lastModifiedDateTime": {
          "type": "string",
          "description": "lastModifiedDateTime"
        },
        "webUrl": {
          "type": "string",
          "description": "webUrl"
        },
        "createdBy": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "email"
                },
                "id": {
                  "type": "string",
                  "description": "id"
                },
                "displayName": {
                  "type": "string",
                  "description": "displayName"
                }
              },
              "description": "user"
            }
          },
          "description": "createdBy"
        },
        "lastModifiedBy": {
          "type": "object",
          "properties": {
            "application": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "id"
                },
                "displayName": {
                  "type": "string",
                  "description": "displayName"
                }
              },
              "description": "application"
            },
            "user": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "description": "email"
                },
                "id": {
                  "type": "string",
                  "description": "id"
                },
                "displayName": {
                  "type": "string",
                  "description": "displayName"
                }
              },
              "description": "user"
            }
          },
          "description": "lastModifiedBy"
        },
        "parentReference": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "id"
            },
            "siteId": {
              "type": "string",
              "description": "siteId"
            }
          },
          "description": "parentReference"
        },
        "contentType": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "id"
            },
            "name": {
              "type": "string",
              "description": "name"
            }
          },
          "description": "contentType"
        },
        "[email protected]": {
          "type": "string",
          "description": "[email protected]"
        },
        "fields": {
          "type": "object",
          "properties": {
            "@odata.etag": {
              "type": "string",
              "description": "@odata.etag"
            },
            "tfItemType": {
              "type": "string",
              "description": "tfItemType"
            },
            "tfFormId": {
              "type": "string",
              "description": "tfFormId"
            },
            "tfTitle": {
              "type": "string",
              "description": "tfTitle"
            }
          },
          "description": "fields"
        }
      }
    },
    "formMetas": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/formMeta"
      }
    },
    "formSchema": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "schema": {
          "type": "object"
        },
        "id": {
          "type": "string"
        },
        "archived": {
          "type": "boolean"
        },
        "version": {
          "type": "number"
        }
      }
    },
    "dynamicResponseSchema": {
      "type": "object",
      "x-ms-dynamic-schema": {
        "operationId": "ResponseSchema",
        "value-path": "schema",
        "parameters": {
          "groupId": {
            "parameter": "groupId"
          },
          "formId": {
            "parameter": "formId"
          }
        }
      }
    },
    "file": {
      "type": "object",
      "properties": {
        "downloadUrl": {
          "type": "string"
        },
        "createdDateTime": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "lastModifiedDateTime": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "webUrl": {
          "type": "string"
        },
        "itemId": {
          "description": "The SharePoint item id"
        }
      }
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/file"
      }
    },
    "pdfFile": {
      "type": "string",
      "format": "binary"
    }
  },
  "parameters": {
    "groupId": {
      "name": "groupId",
      "in": "query",
      "type": "string",
      "description": "Unique id for the team.",
      "required": true,
      "x-ms-summary": "Team",
      "x-ms-visibility": "important",
      "x-ms-dynamic-values": {
        "operationId": "Teams",
        "value-path": "id",
        "value-title": "displayName"
      }
    },
    "formId": {
      "name": "formId",
      "in": "query",
      "type": "string",
      "description": "Unique id for the form.",
      "required": true,
      "x-ms-summary": "Form",
      "x-ms-visibility": "important",
      "x-ms-dynamic-values": {
        "operationId": "Forms",
        "value-path": "fields/tfFormId",
        "value-title": "fields/tfTitle",
        "parameters": {
          "groupId": {
            "parameter": "groupId"
          }
        }
      }
    },
    "responseId": {
      "name": "responseId",
      "in": "query",
      "type": "string",
      "description": "Unique Id for a form response.",
      "required": true,
      "x-ms-summary": "Response",
      "x-ms-visibility": "important"
    },
    "triggers": {
      "name": "triggers",
      "in": "query",
      "type": "string",
      "description": "Types of events to trigger this workflow. Submitted and Resubmitted by default",
      "enum": [
        "Submitted",
        "Resubmitted",
        "Submitted and Resubmitted"
      ],
      "x-ms-summary": "Triggers",
      "x-ms-visibility": "advanced"
    },
    "environment": {
      "name": "environment",
      "in": "query",
      "type": "string",
      "enum": [
        "draft",
        "published"
      ],
      "description": "The environment to set.",
      "required": false,
      "x-ms-summary": "Environment",
      "x-ms-visibility": "advanced"
    }
  },
  "responses": {},
  "securityDefinitions": {
    "oauth2_auth": {
      "type": "oauth2",
      "flow": "accessCode",
      "authorizationUrl": "https://login.windows.net/common/oauth2/authorize",
      "tokenUrl": "https://login.windows.net/common/oauth2/authorize",
      "scopes": {}
    }
  },
  "security": [
    {
      "oauth2_auth": []
    }
  ],
  "tags": [],
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://teamforms.app"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://teamforms.app/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Data;Productivity"
    }
  ]
}

Screenshots or Videos

No response

Browser

  • Browser: [Edge, Chrome}

Additional context

No response

@jesseck3013
Copy link
Author

swagger.json.txt

Please use this updated swagger file. I updated the endpoint to a public endpoint, so no authentication is needed to reproduce the issue.

  1. Select "When a new form response is submitted" trigger
    Image

  2. No dropdown menu for the addtionalFormIds field.

Image

  1. Save the workflow and refresh the page.
    The dropdown menu shows up
    Image

@jesseck3013
Copy link
Author

Hello, any update on this issue? Please let me know if you need any information to reproduce the issue.

@rllyy97 rllyy97 self-assigned this Dec 5, 2024
@rllyy97
Copy link
Contributor

rllyy97 commented Dec 5, 2024

Hi @jesseck3013, thank you for the detailed issue report! I'll take a look at this today using your provided swagger and let you know what I find.

@rllyy97
Copy link
Contributor

rllyy97 commented Dec 5, 2024

Hi @jesseck3013, I've fixed the issue in the following PR: #6221
Though since we are holding releases it might be a while until this is released.

@rllyy97 rllyy97 closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants