Git Product home page Git Product logo

Comments (1)

JohnathonMohr avatar JohnathonMohr commented on June 3, 2024

Decision

If the path in an Evaluation contains a wildcard, this will be the behavior:

  • Only paths in the template which fully satisfy the full path specification in path will be returned; paths that are incomplete will be ignored.
  • If no path can be found in the template that satisfies path, nothing is returned.
    • The operator with the path will not evaluate anything, and the Evaluation they are a part of will not have any result.
  • When multiple paths match the path specification, all are selected, and the operator will evaluate each individually
    • These results will be logically &&-ed together, and the result of the overall Expression will be the result of the &&.

If a rule intends to enforce some logic on a wildcard path (where a path doesn't fully exist, but should), other features/mechanisms in the language can be used in combination to bring enforcement.

For example, to force evaluation of a property of an array element, specify the path segments in different scopes.

{
- "path": "array[*].name", // any element in 'array' without a 'name' property isn't selected
+ "path": "array[*]", // select all elements in 'array'
  "evaluate": {
    "path": "name", // evaluate the 'name' property of the element
    …
  }
}

from template-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.