mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 18:55:54 -06:00
b23cb4e30f
Previously the query compiler checked whether input was defined to catch two cases: 1) Input was required by query or transitive dependencies of query. Input was required if the input document was referenced at all. Motivation for this was to produce "correct" results when negation is used. In practice, this never proved to be very helpful. 2) Input document was specified multiple times, causing a conflict. Again, in practice, this never proved to be very helpful. In both cases, if the policy decision is *incorrect* someone has to look at (i) the input (ii) the data and (iii) the policy to understand why. Ultimately we expect users to push schema information into OPA so that we can validate inputs and data conform to those schema. In that case, if an input was not specified (or conflicting); the type checking should catch it.