Is it possible to auto generate docs for Rego based on its metadata? #415
-
I looked everywhere for a way to generate documentation from the rego files based on their metadata but I didn't find any. Is there an official way to generate such rego doc (html, pdf,...)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @renatosc 👋 There's no official tooling for that currently, although I'd love to see it happen! It's been in my backlog for some time, but unfortunately I haven't had the time to look into it yet. If you'd like to try and build something, there's some info in the docs on how to use the Go API to extract annotations from Rego modules, and once you have the data you should be able to format it to your liking (Markdown, HTML, PDF). If you'd like to work on it, I'd be happy to support you. The #contributors channel on the OPA Slack is a good place to start. |
Beta Was this translation helpful? Give feedback.
Hi @renatosc 👋
There's no official tooling for that currently, although I'd love to see it happen! It's been in my backlog for some time, but unfortunately I haven't had the time to look into it yet.
If you'd like to try and build something, there's some info in the docs on how to use the Go API to extract annotations from Rego modules, and once you have the data you should be able to format it to your liking (Markdown, HTML, PDF). If you'd like to work on it, I'd be happy to support you. The #contributors channel on the OPA Slack is a good place to start.