Azure / Azure/data-api-builder
[Feature] Enhance OpenAPI documentation on the entities
- 主要言語
- C#
- スター
- 1.5k
- フォーク
- 370
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 9
説明
In Postgres it is possible to store entity metadata on the database using `COMMENT` (https://www.postgresql.org/docs/current/sql-comment.html).
Therefore the OpenAPI documentation can be enhanced by reading the COMMENT and using it as a text for OpenAPI.
Alternatively the text could be injected in JSON entity definition and that one can be used instead. In my case I can easily update my container entrypoint to scan for entities in some schemas and generare the json files. As an additional step I could also read the COMMENT from the database and enhance the json file with the content hence creating a richer developer experience.
Benefits:
1. Developers will get some documentation and explanations on what the entities are and how to use them. This is especially useful when the tables have relations that have to be known.
2. The annotated entities could be used as MCP servers (https://github.com/Azure/data-api-builder/issues/2789) as the LLMs could match the endpoints and parameters using the descriptions.
This is partly implemented in PostgREST but not in a consistent fashion.
コントリビューションガイド
調査の方向性
ファイル、テスト、エントリポイントは指定されていません。まず、エンティティメタデータとOpenAPIドキュメントが現在どのように生成されているかを追跡し、次にPostgreSQL COMMENTメタデータと代替のJSONエンティティ定義を比較してください。メタデータのソースと動作が決定され、一貫して実装され、ドキュメントまたはテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, openapi, postgresql
- 領域
- api, databases
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 42/100