---
cases:
  - note: jsonremove/error invalid target type string input
    query: data.generated.p = x
    modules:
      - |
        package generated

        p := __local0__ if {
        	__local2__ = input.x
        	json.remove(__local2__, {"a/b/c"}, __local1__)
        	__local0__ = __local1__
        }
    input_term: '{"x": "foo"}'
    want_error_code: eval_type_error
    want_error: "json.remove: operand 1 must be object but got string"
    strict_error: true
