Do we have any way to generate documentation for our policies, like we do with OpenAPI? #692
-
Hello everybody, I would like to know if there is any tool or way to generate documentation for the policies we create with OPA/Rego, for example, as is done with OpenAPI, to generate endpoint documentation. If there is, could you indicate it, and if not, how do you document your policies? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi there! It's been a while since anyone touched them, but OTOH, OPA's REST API hasn't really changed much since then: https://github.com/open-policy-agent/contrib/tree/main/open_api That's only documenting the REST API endpoints though. I'm not aware of a tool that generates something like JSON schemas for the possible decisions your policy may provide. I'd love to see someone do that though! |
Beta Was this translation helpful? Give feedback.
-
Hi @anderseknert, Thank you so much!!! |
Beta Was this translation helpful? Give feedback.
Hi there!
It's been a while since anyone touched them, but OTOH, OPA's REST API hasn't really changed much since then: https://github.com/open-policy-agent/contrib/tree/main/open_api
That's only documenting the REST API endpoints though. I'm not aware of a tool that generates something like JSON schemas for the possible decisions your policy may provide. I'd love to see someone do that though!