Missing paths for OpenAPI generation

オープン
#937 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
openapi
領域
api, tooling

調査の方向性

まず、openapi/beta/openapi.yaml に生成されたパスを調べ、issue に記載されている place エンティティの定義および想定されるルートと比較します。過去の調査については、関連する OpenAPI.NET.OData issue 720 とメタデータの 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時間
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-metadata のほかの issue

microsoftgraph/msgraph-metadata の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。