Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add version hints into builtin function descriptions #2650

Closed
patrick-east opened this issue Aug 21, 2020 · 1 comment
Closed

Docs: Add version hints into builtin function descriptions #2650

patrick-east opened this issue Aug 21, 2020 · 1 comment

Comments

@patrick-east
Copy link
Contributor

In https://www.openpolicyagent.org/docs/latest/policy-reference/#built-in-functions we show the builtin functions for the language. As-is you see the current set of builtins for the selected version of OPA (eg https://www.openpolicyagent.org/docs/v0.19.2/policy-reference/#built-in-functions shows the ones for 0.19).

However as we make changes to the language, either adding new functions, replacing old ones, etc, it isn't always obvious when someone is using a "new" feature that wont work on older OPA's.

What would be nice is if we had, at a minimum, some kind of "new" tag on builtins that were added. Potentially even showing what version they were added (although we want to keep the UI simple and uncluttered). An example where we can see tons of info (IMO too much, but still a good example) is https://nodejs.org/api/assert.html#assert_assert_value_message

We have access to all the info we need in https://github.com/open-policy-agent/opa/tree/master/capabilities so it is a matter of generating those tags or whatever based on those capabilities for the version of docs being shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants