AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

adaptiveCard/action response type value schema should be updated

Open SLdragon opened this issue 1 year ago • 1 comments

The adaptiveCard/action response type value schema is incomplete, for the response type below, I cannot figure out how to construct a value body to make it work: image

I write the code and message type works fine as below:

{
    status: 200,
    body: {
      statusCode: 200,
      type: "application/vnd.microsoft.activity.message",
      value: "my"
    }
  }

however, I tried application/vnd.microsoft.activity.loginRequest response type as below, it doesn't work and I will get error: "Unexpected response type for Status Code: 401 Expected responseTypes: application/vnd.microsoft.activity.loginRequest or application/vnd.microsoft.error.invalidAuthCode"

// card is generate by CardFactory.oauthCard function in botbuilder js sdk
 {
    status: 200,
    body: {
      statusCode: 401,
      type: "application/vnd.microsoft.activity.loginRequest",
      value:card.content
    },
  }

and application/vnd.microsoft.error.preconditionFailed also not work as below, and I will get error: "Unexpected response type for Status Code: 412 Expected responseType: application/vnd.microsoft.error.preconditionFailed"

{
    status: 200,
    body: {
      statusCode: 412,
      type: "application/vnd.microsoft.error.preconditionFailed",
    },
  }

It is better to have code snippet or sample project to demonstrate how to use these request/response.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

SLdragon avatar Sep 08 '22 03:09 SLdragon

Any update?

SLdragon avatar Sep 20 '22 08:09 SLdragon