Azure / Azure/data-api-builder
[Feature] Enhance OpenAPI documentation on the entities
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 370
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 8
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.
Contributor guide
Assessment
This issue has not been assessed yet.