microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

Stateless samples with latest package does not work.

Open
#508 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

Stateless samples generate json with reference data after upgrade to the latest package. Anyone know how to sort this out?

var answerRequest = this.RequestBuilder.Communications.Calls[callId].Answer(
            callbackUri: "https://xxxxxxxxxxxx/api/callback",
            mediaConfig: new ServiceHostedMediaConfig { PreFetchMedia = preFetchMediaList},
            acceptedModalities: new List<Modality> { Modality.Audio }).Request();
  await GraphApiClient.SendAsync(answerRequest, RequestType.Create, tenantId, scenarioId).ConfigureAwait(false);

Expected Request

{
    "@odata.type": "#microsoft.graph.callAnswerRequestBody",
    "callbackUri": "https://xxxxxxxxxxxx/api/callback",
    "mediaConfig": {
      "@odata.type": "#microsoft.graph.serviceHostedMediaConfig",
      "preFetchMedia": []
    },
    "acceptedModalities": [
      "audio"
    ]
  }

Actual Request

  {
    "$id": "1",
    "callbackUri": "https://xxxxxxxxxxxxxx/api/callback",
    "mediaConfig": {
      "preFetchMedia": {
        "$id": "1",
        "$values": []
      },
      "@odata.type": "microsoft.graph.serviceHostedMediaConfig"
    },
    "acceptedModalities": {
      "$id": "2",
      "$values": [
        "Audio"
      ]
    },
    "participantCapacity": null
  }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stateless samples that build the Answer request and trace the serialization producing the shown actual JSON. Compare it with the expected request, then verify that the generated payload uses the expected OData type values and arrays rather than reference metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.