microsoftgraph / microsoftgraph/msgraph-metadata

v1.0 metadata for functions returning a stream look incorrect

Open
#44 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

promote
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

The type graph.report looks like this:

<ComplexType Name="report">
    <Property Name="content" Type="Edm.Stream"/>
</ComplexType>

The report type is returned by a number of functions, for example:

<Function Name="getMailboxUsageDetail" IsBound="true" IsComposable="true">
    <Parameter Name="bindingParameter" Type="graph.reportRoot"/>
    <Parameter Name="period" Type="Edm.String" Nullable="false" Unicode="false"/>
    <ReturnType Type="graph.report" Nullable="false"/>
</Function>

What this suggests to me is that the url to return the report (a CSV file to be read as a stream) above would look like this:

https://graph.microsoft.com/v1.0/reports/getMailboxUsageDetail(period%3D'D7')/content

but in fact the url to return the report is:

https://graph.microsoft.com/v1.0/reports/getMailboxUsageDetail(period%3D'D7')

I couldn't spot anything in the OData 4.01 specifications supporting this strange wrapping of the Stream type (with special behaviour to ignore the content property name). Why isn't the ReturnType for all these functions just Edm.Stream?

AB#7460

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

The issue names no repository files, tests, or entry points. Start by comparing the shown graph.report and getMailboxUsageDetail metadata with the OData 4.01 stream-return rules; done means determining whether the metadata or URL behavior is inconsistent and documenting the standards-based explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
xml
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.