microsoft / microsoft/OpenAPI.NET.OData

orderby enum should not contain complex types OR should project sub-properties that are not complex types

Open
#613 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

priority:p1 type:bug
Dominant language
C#
Stars
240
Forks
70
Avg merge
7h 59m
Merged PRs (30d)
13

Description

for GET /me/calendar/events we currently project an enum value of start and start desc.
This ends up failing on the service because the start property is a complex type and cannot be used for ordering.
The conversion library should either:

  1. not project properties that are complex/entity types
  2. project sub properties of the complex/entity types which are themselves scalar types (e.g. start/dateTime desc )

If we go with 2, this brings a couple of questions:

  1. how many levels of depths should this support?
  2. what's going to happen for consumers using that metadata to project enums / union types of constants which all of a sudden will see a / character appear, which is reserved in most programing languages?

This also impacts graph explorer as we're suggesting customers things that cannot work.

Image

Contributor guide

Open the contributing guide

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 by tracing how metadata for GET /me/calendar/events produces the orderby enum and where complex or entity properties are classified. Compare the two proposed behaviors, including nesting depth and slash handling for generated constants. Done means the project has a decided, tested rule that avoids suggesting orderby values the service cannot use.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.