Repository navigation
Switch to if/then style for context properties - #150
Conversation
|
... to provide better error-reporting when using general-purpose JSON Schema validators.
Added some logic to do custom rendering for this kind of schema. This is modeled after how I did the pointer collection schema, although this might be overkill. Will try to simplify a bit before merging. |
|
Regarding the concern raised in my previous comment here, I considered an alternative approach: just define context properties the normal object way, i.e., type: object
properties:
code:
$ref: "schema:ethdebug/format/materials/source-range"
# ... etc.This is functionally the same thing as the current state of the schema, but it would require removing the outer wrapping from each of the context types, which are defined in separate schema files. I am apprehensive about this, because I would like each kind of context fact to be defined with its own key identifier in the schema itself. I will leave this as is for now, although I might consider this more in the future (if this approach isn't actually worth the overhead complexity) |
The empty-context history was attributed to the wrong PR: #145 dropped `minProperties: 1` and the `required` entry, but the context schema's `anyOf` still rejected an explicit `{}` until #150 replaced the union with `if`/`then` clauses. #131 likewise never declared the compilation `id` required in prose; it only dropped the "optional" wording. Every `Schemas:` list now names each schema file the change touched, verified against the diffs. The #284 entry is split, since the segment offset carry and the `$this` circularity rule are separate changes with separate consequences. The encoding label rule is marked as a normative tightening no validator catches, and its canonical label is described as preferred rather than required, matching the schema. The id uniqueness requirement is presented as the new part of #172, and `frame`'s values as examples rather than an enumeration. The preamble explains why this file is keyed by the `@ethdebug/format` version, and the history ends at `0.1.0-0`.

... to provide better error-reporting when using general-purpose JSON Schema validators.