Azure / Azure/data-api-builder

[Feature] Enhance OpenAPI documentation on the entities

Aperta
#2,800 1 commento 1 reazione 0 assegnatari Vedi su GitHub
known-issue mcp-server pgsql
Lingua principale
C#
Stelle
1.5k
Fork
370
Merge medio
3g 22h
PR unite (30g)
9

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso. Inizia tracciando come vengono attualmente generati i metadati delle entità e la documentazione OpenAPI, quindi confronta i metadati PostgreSQL COMMENT con le definizioni alternative delle entità JSON. Il lavoro è completo quando la fonte dei metadati e il comportamento sono stati decisi, implementati in modo coerente e coperti da documentazione o test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, openapi, postgresql
Ambito
api, databases
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.