Missing paths for OpenAPI generation

未關閉
#937 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
openapi
領域
api, tooling

研究方向

首先檢查 openapi/beta/openapi.yaml 中產生的路徑,並將其與 issue 中列出的 place 實體定義和預期路由進行比較。查看相關的 OpenAPI.NET.OData issue 720 和 metadata pull request 850,以了解先前的調查。完成的標準是判定問題是否由註釋或產生器行為造成,並記錄或實作缺少的路徑。

由索引模型根據 Issue 內容生成。

描述

ToTriage
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
https://github.com/microsoft/OpenAPI.NET.OData/issues/720
https://github.com/microsoftgraph/msgraph-metadata/pull/850

主要語言
XSLT
星號
171
分支
56
平均合併
1 天 11 小時
30 天內合併 PR
9

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

microsoftgraph/msgraph-metadata 的其他 Issue

查看 microsoftgraph/msgraph-metadata 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。