Open nikpivkin opened 1 month ago
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.
What is the underlying problem you're trying to solve?
Type checking can be improved with schemas, it's very cool. Right now Rego only does type checking when accessing an object and its child properties that are associated with a schema. But type checking stops working in other very common cases:
Describe the ideal solution
The type is stored in the value and are used for type checking anywhere
Additional Context
In the example below, only the first case works.
Example Rego file:
schema.json
input.json
Run
opa eval data -d test.rego -i input.json -s schema.json