An open API service indexing awesome lists of open source software.

https://github.com/anderseknert/opa-data-schema

Demo of schema based type checking of data
https://github.com/anderseknert/opa-data-schema

Last synced: 4 months ago
JSON representation

Demo of schema based type checking of data

Awesome Lists containing this project

README

          

# opa-data-schema

Without schema:
```shell
$ opa eval -f pretty -d policy data.policy.bar
{}
```

With schema:
```shell
$ opa eval -f pretty --schema schema -d policy data.policy.bar
1 error occurred: policy/policy.bar.rego:4: rego_type_error: undefined ref: data.policy.foo.decision.bar
data.policy.foo.decision.bar
^
have: "bar"
want (one of): ["reason"]
```