Azure / Azure/data-api-builder
[Feature] Enhance OpenAPI documentation on the entities
- Lenguaje dominante
- C#
- Estrellas
- 1.5k
- Forks
- 370
- Merge medio
- 3 d 22 h
- PR fusionados (30 d)
- 9
Descripción
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.
Guía de contribución
Línea de trabajo
No se nombran archivos, pruebas ni puntos de entrada. Empieza por rastrear cómo se generan actualmente los metadatos de las entidades y la documentación de OpenAPI, y después compara los metadatos de PostgreSQL COMMENT con las definiciones de entidades JSON alternativas. Se considera terminado cuando la fuente de metadatos y el comportamiento estén decididos, implementados de forma coherente y cubiertos por documentación o pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, openapi, postgresql
- Área
- api, databases
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 42/100