Azure / Azure/data-api-builder
[Feature] Enhance OpenAPI documentation on the entities
- Vorherrschende Sprache
- C#
- Sterne
- 1.5k
- Forks
- 370
- Ø Merge
- 3 T. 22 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Es werden keine Dateien, Tests oder Einstiegspunkte genannt. Beginne damit nachzuverfolgen, wie Entitätsmetadaten und die OpenAPI-Dokumentation derzeit generiert werden, und vergleiche anschließend PostgreSQL COMMENT-Metadaten mit den alternativen JSON-Entitätsdefinitionen. Als abgeschlossen gilt die Aufgabe, wenn die Metadatenquelle und das Verhalten festgelegt, konsistent implementiert und durch Dokumentation oder Tests abgedeckt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, openapi, postgresql
- Bereich
- api, databases
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 42/100