Clarification - Purpose of "mergeEvaluated" in CodeGen?
See original GitHub issueHello! In implementing some custom keywords, I’m not sure of when/why to use the mergeEvaluated method of KeywordCxt
class, and was wondering if I could get some clarification? So far, I haven’t been able to find anything on it within the docs or the src.
Presumably it merges a subschema’s SchemaCxt
into the current keyword’s KeywordCxt
, and I see it’s employed by many existing keywords already, but I’m not sure what effect that actually has. When I’ve overwritten standard keywords to omit their calls to mergeEvaluated
or mergeValidEvaluated
, it never seems to change the behavior of my validation or its output. Any explanation would be appreciated. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Motion for Clarification - Connecticut Judicial Branch
Thus, the purpose of a clarification is to take a prior statement, decision or order and make it easier to understand. Motions for...
Read more >Clarifying the Issue - New York State Department of Health
Your purpose in clarifying the issue is to identify and gain a clear understanding of in which component of the focus area is...
Read more >Clarification of purpose of medication form
Under the Disability Services Act 2006, some medications could be considered Chemical Restraint. Please consider the following extracts from the relevant Acts ...
Read more >Clarify Definition & Meaning - Merriam-Webster
The meaning of CLARIFY is to make understandable. How to use clarify in a sentence.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It statically (that is, during compilation time), when it can, or dynamically (during validation time), when it can’t do it statically, collects object properties and array items that were evaluated - this information is then used by the keywords unevaluatedProperties and unevaluatedItems to determine which properties/items they should be applied to.
If you do not use unevaluatedProperties / unevaluatedItems keywords that would have indeed no effect, but it’s impossible to determine during the compilation whether these keywords are used, as they can be in another schema, so as long as these keywords might be used this information has to be collected.
the best place would be here: https://ajv.js.org/components.html or here: https://ajv.js.org/codegen.html