@imferno/schema 3.0.2-beta.1b73397 → 3.0.2-beta.1ff0aa0

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,155 @@
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-8 — Packing List.",
357
+ "type": "string",
358
+ "enum": [
359
+ "ST429-8"
360
+ ]
361
+ },
362
+ {
363
+ "description": "SMPTE ST 429-9 — Asset Mapping and File Segmentation.",
364
+ "type": "string",
365
+ "enum": [
366
+ "ST429-9"
367
+ ]
368
+ },
369
+ {
370
+ "description": "SMPTE ST 2067-2 — IMF Core Constraints.",
371
+ "type": "string",
372
+ "enum": [
373
+ "ST2067-2"
374
+ ]
375
+ },
376
+ {
377
+ "description": "SMPTE ST 2067-3 — IMF Composition Playlist.",
378
+ "type": "string",
379
+ "enum": [
380
+ "ST2067-3"
381
+ ]
382
+ },
383
+ {
384
+ "description": "SMPTE ST 2067-5 — IMF Essence Component.",
385
+ "type": "string",
386
+ "enum": [
387
+ "ST2067-5"
388
+ ]
389
+ },
390
+ {
391
+ "description": "SMPTE ST 2067-9 — IMF Sidecar Composition Map.",
392
+ "type": "string",
393
+ "enum": [
394
+ "ST2067-9"
395
+ ]
396
+ },
397
+ {
398
+ "description": "SMPTE ST 2067-21 — IMF Application #2E.",
399
+ "type": "string",
400
+ "enum": [
401
+ "ST2067-21"
402
+ ]
403
+ },
404
+ {
405
+ "description": "SMPTE ST 2067-201 — IMF IAB Level 0 Plug-in.",
406
+ "type": "string",
407
+ "enum": [
408
+ "ST2067-201"
409
+ ]
410
+ },
411
+ {
412
+ "description": "SMPTE ST 2067-202 — IMF ISXD Plug-in.",
413
+ "type": "string",
414
+ "enum": [
415
+ "ST2067-202"
416
+ ]
417
+ },
418
+ {
419
+ "description": "The XML Schema layer: findings of the runtime XSD validator against the vendored schema of a document's namespace.",
420
+ "type": "string",
421
+ "enum": [
422
+ "XSD"
423
+ ]
424
+ },
425
+ {
426
+ "description": "imferno's own checks (parse failures, package scanning) that no single SMPTE clause defines.",
427
+ "type": "string",
428
+ "enum": [
429
+ "IMFERNO"
430
+ ]
431
+ }
432
+ ]
433
+ },
434
+ "Strength": {
435
+ "description": "Normative strength of a rule in an edition's text.",
436
+ "oneOf": [
437
+ {
438
+ "description": "A requirement (\"shall\").",
439
+ "type": "string",
440
+ "enum": [
441
+ "shall"
442
+ ]
443
+ },
444
+ {
445
+ "description": "A recommendation (\"should\").",
446
+ "type": "string",
447
+ "enum": [
448
+ "should"
449
+ ]
450
+ },
451
+ {
452
+ "description": "A permission or an observation (\"may\").",
453
+ "type": "string",
454
+ "enum": [
455
+ "may"
456
+ ]
457
+ },
458
+ {
459
+ "description": "Deprecated in this edition.",
460
+ "type": "string",
461
+ "enum": [
462
+ "deprecated"
463
+ ]
464
+ }
465
+ ]
466
+ },
331
467
  "ValidationIssue": {
332
- "description": "A single validation issue",
468
+ "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
469
  "type": "object",
334
470
  "required": [
335
471
  "category",
472
+ "clause",
336
473
  "code",
337
474
  "context",
475
+ "edition",
338
476
  "location",
339
477
  "message",
340
- "severity"
478
+ "rule",
479
+ "severity",
480
+ "source",
481
+ "spec",
482
+ "strength"
341
483
  ],
342
484
  "properties": {
343
485
  "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.",
486
+ "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
487
  "type": "array",
346
488
  "items": {
347
489
  "$ref": "#/definitions/Location"
@@ -355,8 +497,12 @@
355
497
  }
356
498
  ]
357
499
  },
500
+ "clause": {
501
+ "description": "Clause of that edition the rule comes from (empty for pseudo-specs without clauses).",
502
+ "type": "string"
503
+ },
358
504
  "code": {
359
- "description": "Error code (e.g., \"ST2067-2:2020:8.3/FileNotFound\")",
505
+ "description": "Display code: `SPEC:EDITION:CLAUSE/Name`, with the edition actually applied (e.g. `ST2067-3:2016:7.2/SegmentDuration`).",
360
506
  "type": "string"
361
507
  },
362
508
  "context": {
@@ -366,6 +512,10 @@
366
512
  "type": "string"
367
513
  }
368
514
  },
515
+ "edition": {
516
+ "description": "Edition of the spec that was applied (`\"2016\"`; empty for single-edition pseudo-specs).",
517
+ "type": "string"
518
+ },
369
519
  "location": {
370
520
  "description": "Location where issue was found",
371
521
  "allOf": [
@@ -378,8 +528,12 @@
378
528
  "description": "Human-readable message",
379
529
  "type": "string"
380
530
  },
531
+ "rule": {
532
+ "description": "Stable, edition-free rule id (`ST2067-3/SegmentDuration`).",
533
+ "type": "string"
534
+ },
381
535
  "severity": {
382
- "description": "Severity level",
536
+ "description": "Severity level (the table default, possibly remapped by a rules config).",
383
537
  "allOf": [
384
538
  {
385
539
  "$ref": "#/definitions/Severity"
@@ -387,14 +541,29 @@
387
541
  ]
388
542
  },
389
543
  "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",
544
+ "description": "Authority that emitted this issue (XSD layer, prose rule, engine internal), derived from the rule's spec.",
392
545
  "allOf": [
393
546
  {
394
547
  "$ref": "#/definitions/IssueSource"
395
548
  }
396
549
  ]
397
550
  },
551
+ "spec": {
552
+ "description": "Spec the rule belongs to.",
553
+ "allOf": [
554
+ {
555
+ "$ref": "#/definitions/Spec"
556
+ }
557
+ ]
558
+ },
559
+ "strength": {
560
+ "description": "Normative strength of the rule in that edition.",
561
+ "allOf": [
562
+ {
563
+ "$ref": "#/definitions/Strength"
564
+ }
565
+ ]
566
+ },
398
567
  "suggestion": {
399
568
  "description": "Suggestion for how to fix",
400
569
  "type": [