@imferno/schema 3.0.2-feat-docs-sample-imp-browser.7a73aeb → 3.0.2-feat-rule-model-per-edition.a92877c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "RulesConfig",
4
- "description": "ESLint-style per-rule severity overrides.\n\nKeys are either: - A rule suffix — `\"SegmentDuration\"` — matched against the part of the issue code after the last `/`. - A full normalised code — `\"ST2067-3:2020:7.2.2/SegmentDuration\"`.\n\nValues are the desired [`RuleSeverity`], or [`RuleSeverity::Off`] to suppress the rule entirely.\n\nAn empty map (the default) is a no-op.",
4
+ "description": "ESLint-style per-rule severity overrides (see the module docs for the key forms and their precedence). An empty map (the default) is a no-op.",
5
5
  "type": "object",
6
6
  "additionalProperties": {
7
7
  "$ref": "#/definitions/RuleSeverity"
@@ -186,7 +186,7 @@
186
186
  "format": "uuid"
187
187
  },
188
188
  "IssueSource": {
189
- "description": "Which authority produced a validation finding.\n\nEncodes the \"prose vs XSD\" provenance distinction that SMPTE ST 2067-3 §5.1 calls out (\"the prose document takes precedence on conflict\"), so callers can filter, group, or apply per-source severity overrides without inspecting the code string.\n\nCurrently *inferred* from the code prefix on a `ValidationIssue` (see `ValidationIssue::source`) — no engine code needs to set it explicitly. If inference ever becomes ambiguous (e.g. a non-XSD engine internal rule that wants the `XSD/` prefix for catalogue reasons), we can add a `with_source()` builder without changing the public shape.",
189
+ "description": "Which authority produced a validation finding.\n\nEncodes the \"prose vs XSD\" provenance distinction that SMPTE ST 2067-3 §5.1 calls out (\"the prose document takes precedence on conflict\"), so callers can filter, group, or apply per-source severity overrides without inspecting the code string.\n\nDerived from the rule's spec ([`Spec::source`]): `XSD` rules are `XsdLayer`, `IMFERNO` rules `EngineInternal`, SMPTE specs `ProseRule`.",
190
190
  "oneOf": [
191
191
  {
192
192
  "description": "Came from the runtime XSD validator (uppsala). Schema-layer: the structural subset of the spec that the XSD DSL can express.",
@@ -279,6 +279,13 @@
279
279
  "format": "uint",
280
280
  "minimum": 0.0
281
281
  },
282
+ "segment_id": {
283
+ "description": "Segment Id (`urn:uuid:…`) if applicable",
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
282
289
  "sequence_id": {
283
290
  "description": "Sequence UUID if applicable",
284
291
  "type": [
@@ -328,20 +335,141 @@
328
335
  }
329
336
  ]
330
337
  },
338
+ "Spec": {
339
+ "description": "A document whose rules imferno checks.",
340
+ "oneOf": [
341
+ {
342
+ "description": "SMPTE ST 377-1 — MXF File Format.",
343
+ "type": "string",
344
+ "enum": [
345
+ "ST377-1"
346
+ ]
347
+ },
348
+ {
349
+ "description": "SMPTE ST 377-4 — MXF Multichannel Audio Labeling.",
350
+ "type": "string",
351
+ "enum": [
352
+ "ST377-4"
353
+ ]
354
+ },
355
+ {
356
+ "description": "SMPTE ST 429-9 — Asset Mapping and File Segmentation.",
357
+ "type": "string",
358
+ "enum": [
359
+ "ST429-9"
360
+ ]
361
+ },
362
+ {
363
+ "description": "SMPTE ST 2067-2 — IMF Core Constraints.",
364
+ "type": "string",
365
+ "enum": [
366
+ "ST2067-2"
367
+ ]
368
+ },
369
+ {
370
+ "description": "SMPTE ST 2067-3 — IMF Composition Playlist.",
371
+ "type": "string",
372
+ "enum": [
373
+ "ST2067-3"
374
+ ]
375
+ },
376
+ {
377
+ "description": "SMPTE ST 2067-9 — IMF Sidecar Composition Map.",
378
+ "type": "string",
379
+ "enum": [
380
+ "ST2067-9"
381
+ ]
382
+ },
383
+ {
384
+ "description": "SMPTE ST 2067-21 — IMF Application #2E.",
385
+ "type": "string",
386
+ "enum": [
387
+ "ST2067-21"
388
+ ]
389
+ },
390
+ {
391
+ "description": "SMPTE ST 2067-201 — IMF IAB Level 0 Plug-in.",
392
+ "type": "string",
393
+ "enum": [
394
+ "ST2067-201"
395
+ ]
396
+ },
397
+ {
398
+ "description": "SMPTE ST 2067-202 — IMF ISXD Plug-in.",
399
+ "type": "string",
400
+ "enum": [
401
+ "ST2067-202"
402
+ ]
403
+ },
404
+ {
405
+ "description": "The XML Schema layer: findings of the runtime XSD validator against the vendored schema of a document's namespace.",
406
+ "type": "string",
407
+ "enum": [
408
+ "XSD"
409
+ ]
410
+ },
411
+ {
412
+ "description": "imferno's own checks (parse failures, package scanning) that no single SMPTE clause defines.",
413
+ "type": "string",
414
+ "enum": [
415
+ "IMFERNO"
416
+ ]
417
+ }
418
+ ]
419
+ },
420
+ "Strength": {
421
+ "description": "Normative strength of a rule in an edition's text.",
422
+ "oneOf": [
423
+ {
424
+ "description": "A requirement (\"shall\").",
425
+ "type": "string",
426
+ "enum": [
427
+ "shall"
428
+ ]
429
+ },
430
+ {
431
+ "description": "A recommendation (\"should\").",
432
+ "type": "string",
433
+ "enum": [
434
+ "should"
435
+ ]
436
+ },
437
+ {
438
+ "description": "A permission or an observation (\"may\").",
439
+ "type": "string",
440
+ "enum": [
441
+ "may"
442
+ ]
443
+ },
444
+ {
445
+ "description": "Deprecated in this edition.",
446
+ "type": "string",
447
+ "enum": [
448
+ "deprecated"
449
+ ]
450
+ }
451
+ ]
452
+ },
331
453
  "ValidationIssue": {
332
- "description": "A single validation issue",
454
+ "description": "A single validation finding.\n\nCreated only through [`ValidationIssue::from_rule`]: severity, category, clause and display code all come from the rule table row of the edition that was applied.",
333
455
  "type": "object",
334
456
  "required": [
335
457
  "category",
458
+ "clause",
336
459
  "code",
337
460
  "context",
461
+ "edition",
338
462
  "location",
339
463
  "message",
340
- "severity"
464
+ "rule",
465
+ "severity",
466
+ "source",
467
+ "spec",
468
+ "strength"
341
469
  ],
342
470
  "properties": {
343
471
  "additional_instances": {
344
- "description": "Other `Location`s when this issue represents an aggregation of multiple identical-code occurrences (see [`ValidationReport::aggregate`]). Empty for fresh, un-aggregated issues. Skipped during serialisation when empty so the on-wire shape stays back-compatible for callers that don't aggregate.",
472
+ "description": "Other `Location`s when this issue represents an aggregation of multiple identical-code occurrences (see [`ValidationReport::aggregate`]). Empty for fresh, un-aggregated issues. Skipped during serialisation when empty.",
345
473
  "type": "array",
346
474
  "items": {
347
475
  "$ref": "#/definitions/Location"
@@ -355,8 +483,12 @@
355
483
  }
356
484
  ]
357
485
  },
486
+ "clause": {
487
+ "description": "Clause of that edition the rule comes from (empty for pseudo-specs without clauses).",
488
+ "type": "string"
489
+ },
358
490
  "code": {
359
- "description": "Error code (e.g., \"ST2067-2:2020:8.3/FileNotFound\")",
491
+ "description": "Display code: `SPEC:EDITION:CLAUSE/Name`, with the edition actually applied (e.g. `ST2067-3:2016:7.2.2/SegmentDuration`).",
360
492
  "type": "string"
361
493
  },
362
494
  "context": {
@@ -366,6 +498,10 @@
366
498
  "type": "string"
367
499
  }
368
500
  },
501
+ "edition": {
502
+ "description": "Edition of the spec that was applied (`\"2016\"`; empty for single-edition pseudo-specs).",
503
+ "type": "string"
504
+ },
369
505
  "location": {
370
506
  "description": "Location where issue was found",
371
507
  "allOf": [
@@ -378,8 +514,12 @@
378
514
  "description": "Human-readable message",
379
515
  "type": "string"
380
516
  },
517
+ "rule": {
518
+ "description": "Stable, edition-free rule id (`ST2067-3/SegmentDuration`).",
519
+ "type": "string"
520
+ },
381
521
  "severity": {
382
- "description": "Severity level",
522
+ "description": "Severity level (the table default, possibly remapped by a rules config).",
383
523
  "allOf": [
384
524
  {
385
525
  "$ref": "#/definitions/Severity"
@@ -387,14 +527,29 @@
387
527
  ]
388
528
  },
389
529
  "source": {
390
- "description": "Authority that emitted this issue (XSD layer, prose rule, engine internal). Inferred from `code` at construction time so the field is always consistent with the code prefix — JS consumers can filter on `issue.source` directly without re-implementing the inference. Deserialised with a default so old reports without the field round-trip cleanly.",
391
- "default": "EngineInternal",
530
+ "description": "Authority that emitted this issue (XSD layer, prose rule, engine internal), derived from the rule's spec.",
392
531
  "allOf": [
393
532
  {
394
533
  "$ref": "#/definitions/IssueSource"
395
534
  }
396
535
  ]
397
536
  },
537
+ "spec": {
538
+ "description": "Spec the rule belongs to.",
539
+ "allOf": [
540
+ {
541
+ "$ref": "#/definitions/Spec"
542
+ }
543
+ ]
544
+ },
545
+ "strength": {
546
+ "description": "Normative strength of the rule in that edition.",
547
+ "allOf": [
548
+ {
549
+ "$ref": "#/definitions/Strength"
550
+ }
551
+ ]
552
+ },
398
553
  "suggestion": {
399
554
  "description": "Suggestion for how to fix",
400
555
  "type": [