microsoftgraph / microsoftgraph/msgraph-metadata

@odata.type is marked required in the OpenAPI schemas but is omitted from most GET responses

Open
#1,166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Graph v1.0 OpenAPI description, @odata.type is included in the required array of many entity schemas. However, Graph does not return @odata.type in most GET responses, it's emitted only for polymorphic instances where the concrete type differs from the declared type. This makes the spec internally inconsistent and response that conforms to the API contradicts its own schema's required constraint.

Reproduction
GET /teams/{team-id} the returned team object has no @odata.type, yet the schema marks it required.

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

Inspect the Graph v1.0 OpenAPI description and the entity schemas used by GET /teams/{team-id}; compare their required arrays with the documented response behavior. Done means @odata.type is not required for ordinary responses while remaining accurate for polymorphic instances.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.