@imferno/schema 3.0.2-beta.8b55d2c → 3.0.2-beta.8c7d3cd

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"
@@ -8,6 +8,7 @@
8
8
  "errors",
9
9
  "info",
10
10
  "is_compliant",
11
+ "is_fully_validated",
11
12
  "is_playable",
12
13
  "profile",
13
14
  "timestamp",
@@ -39,6 +40,10 @@
39
40
  "description": "Whether the package is compliant with base SMPTE standards",
40
41
  "type": "boolean"
41
42
  },
43
+ "is_fully_validated": {
44
+ "description": "Whether everything in the package was validated. False when a finding says part of it was not (e.g. `IMFERNO:Cpl/ExtensionSequenceNotValidated` for S-ADM audio): then `is_compliant` only covers what was checked. A rule override that switches such a finding `off` moves it to `suppressed` but keeps this false.",
45
+ "type": "boolean"
46
+ },
42
47
  "is_playable": {
43
48
  "description": "Whether the package is playable despite issues",
44
49
  "type": "boolean"
@@ -186,7 +191,7 @@
186
191
  "format": "uuid"
187
192
  },
188
193
  "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.",
194
+ "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
195
  "oneOf": [
191
196
  {
192
197
  "description": "Came from the runtime XSD validator (uppsala). Schema-layer: the structural subset of the spec that the XSD DSL can express.",
@@ -279,6 +284,13 @@
279
284
  "format": "uint",
280
285
  "minimum": 0.0
281
286
  },
287
+ "segment_id": {
288
+ "description": "Segment Id (`urn:uuid:…`) if applicable",
289
+ "type": [
290
+ "string",
291
+ "null"
292
+ ]
293
+ },
282
294
  "sequence_id": {
283
295
  "description": "Sequence UUID if applicable",
284
296
  "type": [
@@ -328,20 +340,155 @@
328
340
  }
329
341
  ]
330
342
  },
343
+ "Spec": {
344
+ "description": "A document whose rules imferno checks.",
345
+ "oneOf": [
346
+ {
347
+ "description": "SMPTE ST 377-1 — MXF File Format.",
348
+ "type": "string",
349
+ "enum": [
350
+ "ST377-1"
351
+ ]
352
+ },
353
+ {
354
+ "description": "SMPTE ST 377-4 — MXF Multichannel Audio Labeling.",
355
+ "type": "string",
356
+ "enum": [
357
+ "ST377-4"
358
+ ]
359
+ },
360
+ {
361
+ "description": "SMPTE ST 429-8 — Packing List.",
362
+ "type": "string",
363
+ "enum": [
364
+ "ST429-8"
365
+ ]
366
+ },
367
+ {
368
+ "description": "SMPTE ST 429-9 — Asset Mapping and File Segmentation.",
369
+ "type": "string",
370
+ "enum": [
371
+ "ST429-9"
372
+ ]
373
+ },
374
+ {
375
+ "description": "SMPTE ST 2067-2 — IMF Core Constraints.",
376
+ "type": "string",
377
+ "enum": [
378
+ "ST2067-2"
379
+ ]
380
+ },
381
+ {
382
+ "description": "SMPTE ST 2067-3 — IMF Composition Playlist.",
383
+ "type": "string",
384
+ "enum": [
385
+ "ST2067-3"
386
+ ]
387
+ },
388
+ {
389
+ "description": "SMPTE ST 2067-5 — IMF Essence Component.",
390
+ "type": "string",
391
+ "enum": [
392
+ "ST2067-5"
393
+ ]
394
+ },
395
+ {
396
+ "description": "SMPTE ST 2067-9 — IMF Sidecar Composition Map.",
397
+ "type": "string",
398
+ "enum": [
399
+ "ST2067-9"
400
+ ]
401
+ },
402
+ {
403
+ "description": "SMPTE ST 2067-21 — IMF Application #2E.",
404
+ "type": "string",
405
+ "enum": [
406
+ "ST2067-21"
407
+ ]
408
+ },
409
+ {
410
+ "description": "SMPTE ST 2067-201 — IMF IAB Level 0 Plug-in.",
411
+ "type": "string",
412
+ "enum": [
413
+ "ST2067-201"
414
+ ]
415
+ },
416
+ {
417
+ "description": "SMPTE ST 2067-202 — IMF ISXD Plug-in.",
418
+ "type": "string",
419
+ "enum": [
420
+ "ST2067-202"
421
+ ]
422
+ },
423
+ {
424
+ "description": "The XML Schema layer: findings of the runtime XSD validator against the vendored schema of a document's namespace.",
425
+ "type": "string",
426
+ "enum": [
427
+ "XSD"
428
+ ]
429
+ },
430
+ {
431
+ "description": "imferno's own checks (parse failures, package scanning) that no single SMPTE clause defines.",
432
+ "type": "string",
433
+ "enum": [
434
+ "IMFERNO"
435
+ ]
436
+ }
437
+ ]
438
+ },
439
+ "Strength": {
440
+ "description": "Normative strength of a rule in an edition's text.",
441
+ "oneOf": [
442
+ {
443
+ "description": "A requirement (\"shall\").",
444
+ "type": "string",
445
+ "enum": [
446
+ "shall"
447
+ ]
448
+ },
449
+ {
450
+ "description": "A recommendation (\"should\").",
451
+ "type": "string",
452
+ "enum": [
453
+ "should"
454
+ ]
455
+ },
456
+ {
457
+ "description": "A permission or an observation (\"may\").",
458
+ "type": "string",
459
+ "enum": [
460
+ "may"
461
+ ]
462
+ },
463
+ {
464
+ "description": "Deprecated in this edition.",
465
+ "type": "string",
466
+ "enum": [
467
+ "deprecated"
468
+ ]
469
+ }
470
+ ]
471
+ },
331
472
  "ValidationIssue": {
332
- "description": "A single validation issue",
473
+ "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
474
  "type": "object",
334
475
  "required": [
335
476
  "category",
477
+ "clause",
336
478
  "code",
337
479
  "context",
480
+ "edition",
338
481
  "location",
339
482
  "message",
340
- "severity"
483
+ "rule",
484
+ "severity",
485
+ "source",
486
+ "spec",
487
+ "strength"
341
488
  ],
342
489
  "properties": {
343
490
  "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.",
491
+ "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
492
  "type": "array",
346
493
  "items": {
347
494
  "$ref": "#/definitions/Location"
@@ -355,8 +502,12 @@
355
502
  }
356
503
  ]
357
504
  },
505
+ "clause": {
506
+ "description": "Clause of that edition the rule comes from (empty for pseudo-specs without clauses).",
507
+ "type": "string"
508
+ },
358
509
  "code": {
359
- "description": "Error code (e.g., \"ST2067-2:2020:8.3/FileNotFound\")",
510
+ "description": "Display code: `SPEC:EDITION:CLAUSE/Name`, with the edition actually applied (e.g. `ST2067-3:2016:7.2/SegmentDuration`).",
360
511
  "type": "string"
361
512
  },
362
513
  "context": {
@@ -366,6 +517,10 @@
366
517
  "type": "string"
367
518
  }
368
519
  },
520
+ "edition": {
521
+ "description": "Edition of the spec that was applied (`\"2016\"`; empty for single-edition pseudo-specs).",
522
+ "type": "string"
523
+ },
369
524
  "location": {
370
525
  "description": "Location where issue was found",
371
526
  "allOf": [
@@ -378,8 +533,12 @@
378
533
  "description": "Human-readable message",
379
534
  "type": "string"
380
535
  },
536
+ "rule": {
537
+ "description": "Stable, edition-free rule id (`ST2067-3/SegmentDuration`).",
538
+ "type": "string"
539
+ },
381
540
  "severity": {
382
- "description": "Severity level",
541
+ "description": "Severity level (the table default, possibly remapped by a rules config).",
383
542
  "allOf": [
384
543
  {
385
544
  "$ref": "#/definitions/Severity"
@@ -387,14 +546,29 @@
387
546
  ]
388
547
  },
389
548
  "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",
549
+ "description": "Authority that emitted this issue (XSD layer, prose rule, engine internal), derived from the rule's spec.",
392
550
  "allOf": [
393
551
  {
394
552
  "$ref": "#/definitions/IssueSource"
395
553
  }
396
554
  ]
397
555
  },
556
+ "spec": {
557
+ "description": "Spec the rule belongs to.",
558
+ "allOf": [
559
+ {
560
+ "$ref": "#/definitions/Spec"
561
+ }
562
+ ]
563
+ },
564
+ "strength": {
565
+ "description": "Normative strength of the rule in that edition.",
566
+ "allOf": [
567
+ {
568
+ "$ref": "#/definitions/Strength"
569
+ }
570
+ ]
571
+ },
398
572
  "suggestion": {
399
573
  "description": "Suggestion for how to fix",
400
574
  "type": [