Azure / Azure/data-api-builder

[Feature] Enhance OpenAPI documentation on the entities

Ouverte
#2,800 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
known-issue mcp-server pgsql
Langage dominant
C#
Étoiles
1.5k
Forks
370
Merge moyen
3 j 22 h
PR mergées (30 j)
9

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Aucun fichier, test ou point d’entrée n’est nommé. Commencez par retracer la manière dont les métadonnées des entités et la documentation OpenAPI sont actuellement générées, puis comparez les métadonnées PostgreSQL COMMENT avec les définitions d’entités JSON alternatives. Le travail est terminé lorsque la source des métadonnées et le comportement sont décidés, implémentés de manière cohérente et couverts par de la documentation ou des tests.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp, openapi, postgresql
Domaine
api, databases
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.