Skip to content

Missing paths for OpenAPI generation #937

@MIchaelMainer

Description

@MIchaelMainer

Describe the bug

This is potentially related to the issue described above.

When generating the OpenAPI description for Microsoft Graph Beta the building, desk, floor, room, roomlist, section, workspace routes are not generated for those entitytypes. All are derived type of the abstract place type.

<EntitySet Name="places" EntityType="microsoft.graph.place" />

<EntityType Name="place" BaseType="graph.entity" Abstract="true">
   ....
  <NavigationProperty Name="checkIns" Type="Collection(graph.checkInClaim)" ContainsTarget="true" />
</EntityType>

<EntityType Name="building" BaseType="graph.place">
  ...
  <NavigationProperty Name="map" Type="graph.buildingMap" ContainsTarget="true" />
</EntityType>

<EntityType Name="room" BaseType="graph.place">
  ...
</EntityType>

<EntityType Name="roomList" BaseType="graph.place">
  ...
  <NavigationProperty Name="rooms" Type="Collection(graph.room)" ContainsTarget="true" />
  <NavigationProperty Name="workspaces" Type="Collection(graph.workspace)" ContainsTarget="true" />
</EntityType>

<Function Name="descendants" IsBound="true" IsComposable="true">
  <Parameter Name="bindingParameter" Type="graph.place" />
  <ReturnType Type="Collection(graph.place)" Nullable="false" />
</Function>

Sample of places paths currently supported in our OpenAPI:

/places/{place-id}
/places/{place-id}/checkIns
/places/{place-id}/checkIns/$count
/places/{place-id}/descendants()
/places/{place-id}/graph.room
/places/{place-id}/graph.room/checkIns
/places/{place-id}/graph.room/checkIns/$count
/places/{place-id}/graph.roomList
/places/{place-id}/graph.roomList/checkIns
/places/{place-id}/graph.roomList/rooms

Either we don't currently support this behavior or there are missing annotations used to specify this behavior. This requires investigation.

Expected behavior

Paths that we expect to be in our OpenAPI but are not (same as the list of affected EntityTypes above):

/places/microsoft.graph.building
/places/microsoft.graph.floor
/places/microsoft.graph.desk
/places/room
/places/roomlist
/places/section
/places/workspace

Additional context

https://github.com/microsoftgraph/msgraph-metadata/blob/master/openapi/beta/openapi.yaml to see missing paths.
https://learn.microsoft.com/en-us/graph/api/place-list?view=graph-rest-beta&tabs=http
microsoft/OpenAPI.NET.OData#720
#850

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions