expressir 2.1.29 → 2.1.31

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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docs.yml +98 -0
  3. data/.github/workflows/links.yml +100 -0
  4. data/.github/workflows/rake.yml +4 -0
  5. data/.github/workflows/release.yml +5 -0
  6. data/.github/workflows/validate_schemas.yml +1 -1
  7. data/.gitignore +3 -0
  8. data/.rubocop.yml +1 -1
  9. data/.rubocop_todo.yml +209 -55
  10. data/Gemfile +2 -1
  11. data/README.adoc +650 -83
  12. data/docs/Gemfile +12 -0
  13. data/docs/_config.yml +141 -0
  14. data/docs/_guides/changes/changes-format.adoc +778 -0
  15. data/docs/_guides/changes/importing-eengine.adoc +898 -0
  16. data/docs/_guides/changes/index.adoc +396 -0
  17. data/docs/_guides/changes/programmatic-usage.adoc +1038 -0
  18. data/docs/_guides/changes/validating-changes.adoc +681 -0
  19. data/docs/_guides/cli/benchmark-performance.adoc +834 -0
  20. data/docs/_guides/cli/coverage-analysis.adoc +921 -0
  21. data/docs/_guides/cli/format-schemas.adoc +547 -0
  22. data/docs/_guides/cli/index.adoc +8 -0
  23. data/docs/_guides/cli/managing-changes.adoc +927 -0
  24. data/docs/_guides/cli/validate-ascii.adoc +645 -0
  25. data/docs/_guides/cli/validate-schemas.adoc +534 -0
  26. data/docs/_guides/index.adoc +165 -0
  27. data/docs/_guides/ler/creating-packages.adoc +664 -0
  28. data/docs/_guides/ler/index.adoc +305 -0
  29. data/docs/_guides/ler/loading-packages.adoc +707 -0
  30. data/docs/_guides/ler/package-formats.adoc +748 -0
  31. data/docs/_guides/ler/querying-packages.adoc +826 -0
  32. data/docs/_guides/ler/validating-packages.adoc +750 -0
  33. data/docs/_guides/liquid/basic-templates.adoc +813 -0
  34. data/docs/_guides/liquid/documentation-generation.adoc +1042 -0
  35. data/docs/_guides/liquid/drops-reference.adoc +829 -0
  36. data/docs/_guides/liquid/filters-and-tags.adoc +912 -0
  37. data/docs/_guides/liquid/index.adoc +468 -0
  38. data/docs/_guides/manifests/creating-manifests.adoc +483 -0
  39. data/docs/_guides/manifests/index.adoc +307 -0
  40. data/docs/_guides/manifests/resolving-manifests.adoc +557 -0
  41. data/docs/_guides/manifests/validating-manifests.adoc +713 -0
  42. data/docs/_guides/ruby-api/formatting-schemas.adoc +605 -0
  43. data/docs/_guides/ruby-api/index.adoc +257 -0
  44. data/docs/_guides/ruby-api/parsing-files.adoc +421 -0
  45. data/docs/_guides/ruby-api/search-engine.adoc +609 -0
  46. data/docs/_guides/ruby-api/working-with-repository.adoc +577 -0
  47. data/docs/_pages/data-model.adoc +665 -0
  48. data/docs/_pages/express-language.adoc +506 -0
  49. data/docs/_pages/getting-started.adoc +414 -0
  50. data/docs/_pages/index.adoc +116 -0
  51. data/docs/_pages/introduction.adoc +256 -0
  52. data/docs/_pages/ler-packages.adoc +837 -0
  53. data/docs/_pages/parsers.adoc +683 -0
  54. data/docs/_pages/schema-manifests.adoc +431 -0
  55. data/docs/_references/index.adoc +228 -0
  56. data/docs/_tutorials/creating-ler-package.adoc +735 -0
  57. data/docs/_tutorials/documentation-coverage.adoc +795 -0
  58. data/docs/_tutorials/index.adoc +221 -0
  59. data/docs/_tutorials/liquid-templates.adoc +806 -0
  60. data/docs/_tutorials/parsing-your-first-schema.adoc +522 -0
  61. data/docs/_tutorials/querying-schemas.adoc +751 -0
  62. data/docs/_tutorials/working-with-multiple-schemas.adoc +676 -0
  63. data/docs/index.adoc +242 -0
  64. data/docs/lychee.toml +84 -0
  65. data/examples/demo_ler_usage.sh +86 -0
  66. data/examples/ler/README.md +111 -0
  67. data/examples/ler/simple_example.ler +0 -0
  68. data/examples/ler/simple_schema.exp +33 -0
  69. data/examples/ler_build.rb +75 -0
  70. data/examples/ler_cli.rb +79 -0
  71. data/examples/ler_demo_complete.rb +276 -0
  72. data/examples/ler_query.rb +91 -0
  73. data/examples/ler_query_examples.rb +305 -0
  74. data/examples/ler_stats.rb +81 -0
  75. data/examples/phase3_demo.rb +159 -0
  76. data/examples/query_demo_simple.rb +131 -0
  77. data/expressir.gemspec +2 -0
  78. data/lib/expressir/changes/schema_change.rb +32 -22
  79. data/lib/expressir/changes/{edition_change.rb → version_change.rb} +3 -3
  80. data/lib/expressir/cli.rb +12 -4
  81. data/lib/expressir/commands/changes_import_eengine.rb +2 -2
  82. data/lib/expressir/commands/changes_validate.rb +1 -1
  83. data/lib/expressir/commands/manifest.rb +427 -0
  84. data/lib/expressir/commands/package.rb +1274 -0
  85. data/lib/expressir/commands/validate.rb +70 -37
  86. data/lib/expressir/commands/validate_ascii.rb +607 -0
  87. data/lib/expressir/commands/validate_load.rb +88 -0
  88. data/lib/expressir/express/formatter.rb +5 -1
  89. data/lib/expressir/express/formatters/remark_item_formatter.rb +25 -0
  90. data/lib/expressir/express/parser.rb +33 -0
  91. data/lib/expressir/manifest/resolver.rb +213 -0
  92. data/lib/expressir/manifest/validator.rb +195 -0
  93. data/lib/expressir/model/declarations/entity.rb +6 -0
  94. data/lib/expressir/model/dependency_resolver.rb +270 -0
  95. data/lib/expressir/model/indexes/entity_index.rb +103 -0
  96. data/lib/expressir/model/indexes/reference_index.rb +148 -0
  97. data/lib/expressir/model/indexes/type_index.rb +149 -0
  98. data/lib/expressir/model/interface_validator.rb +384 -0
  99. data/lib/expressir/model/repository.rb +400 -5
  100. data/lib/expressir/model/repository_validator.rb +295 -0
  101. data/lib/expressir/model/search_engine.rb +525 -0
  102. data/lib/expressir/model.rb +4 -94
  103. data/lib/expressir/package/builder.rb +200 -0
  104. data/lib/expressir/package/metadata.rb +81 -0
  105. data/lib/expressir/package/reader.rb +165 -0
  106. data/lib/expressir/schema_manifest.rb +11 -1
  107. data/lib/expressir/version.rb +1 -1
  108. data/lib/expressir.rb +16 -3
  109. metadata +115 -5
  110. data/docs/benchmarking.adoc +0 -107
  111. data/docs/liquid_drops.adoc +0 -1547
@@ -0,0 +1,713 @@
1
+ ---
2
+ title: Validating Manifests
3
+ parent: Manifest Workflows
4
+ grand_parent: Guides
5
+ nav_order: 3
6
+ ---
7
+
8
+ = Validating Schema Manifests
9
+
10
+ == Purpose
11
+
12
+ This guide explains how to validate schema manifests at different levels, from basic file existence checks to complete referential integrity validation.
13
+
14
+ == What You'll Learn
15
+
16
+ * Using the `manifest validate` command
17
+ * Understanding validation levels
18
+ * Interpreting validation errors and warnings
19
+ * Using the `--check-references` flag
20
+ * Fixing common validation issues
21
+
22
+ == Prerequisites
23
+
24
+ * Expressir installed
25
+ * An existing manifest file
26
+ * Understanding of link:creating-manifests.html[Creating Manifests]
27
+
28
+ == The `manifest validate` Command
29
+
30
+ === Basic Syntax
31
+
32
+ [source,bash]
33
+ ----
34
+ expressir manifest validate MANIFEST.yaml [OPTIONS]
35
+ ----
36
+
37
+ === Required Parameters
38
+
39
+ `MANIFEST.yaml`::
40
+ The manifest file to validate
41
+
42
+ === Optional Parameters
43
+
44
+ `--verbose`::
45
+ Show detailed validation results including all checks performed
46
+
47
+ `--check-references`::
48
+ Enable referential integrity checking (validates all USE FROM and REFERENCE FROM declarations)
49
+
50
+ == Validation Levels
51
+
52
+ === Level 1: Basic Validation (Always Performed)
53
+
54
+ This is the default validation level, performed even without any flags.
55
+
56
+ **Checks performed:**
57
+
58
+ File existence::
59
+ All schemas with `path:` fields must have files that exist on disk
60
+
61
+ Path completeness::
62
+ Warns about schemas without `path:` fields (unresolved schemas)
63
+
64
+ YAML syntax::
65
+ Manifest file must be valid YAML
66
+
67
+ [example]
68
+ .Example: Basic validation
69
+ ====
70
+ [source,bash]
71
+ ----
72
+ $ expressir manifest validate activity_manifest.yaml
73
+
74
+ Validating manifest: activity_manifest.yaml...
75
+ ✓ Manifest is valid
76
+ Total schemas: 42
77
+ Resolved schemas: 41
78
+ Unresolved schemas: 1
79
+
80
+ Warnings (1):
81
+ - Schema 'Activity_method_mim' has no path specified - please provide path
82
+ ----
83
+ ====
84
+
85
+ === Level 2: Referential Integrity (--check-references)
86
+
87
+ When you add the `--check-references` flag, validation also verifies that all schema dependencies can be resolved.
88
+
89
+ **Additional checks:**
90
+
91
+ USE FROM references::
92
+ Every `USE FROM schema_name` declaration must reference a schema in the manifest
93
+
94
+ REFERENCE FROM references::
95
+ Every `REFERENCE FROM schema_name` declaration must reference a schema in the manifest
96
+
97
+ Schema name matching::
98
+ Schema names in the manifest must match actual SCHEMA declarations in files
99
+
100
+ Dependency completeness::
101
+ All transitive dependencies must be included
102
+
103
+ [example]
104
+ .Example: Referential integrity validation
105
+ ====
106
+ [source,bash]
107
+ ----
108
+ $ expressir manifest validate activity_manifest.yaml --check-references
109
+
110
+ Validating manifest: activity_manifest.yaml...
111
+ Checking referential integrity...
112
+ Validating referential integrity for 42 schemas...
113
+
114
+ USE FROM action_schema (in Activity_mim): ✓ action_schema.exp
115
+ REFERENCE FROM basic_attribute_schema (in action_schema): ✓ basic_attribute_schema.exp
116
+ ...
117
+ REFERENCE FROM support_resource_schema (in topology_schema): ✓ support_resource_schema.exp
118
+ ✓ Manifest is valid
119
+ Total schemas: 42
120
+ Resolved schemas: 42
121
+
122
+ All references resolved successfully!
123
+ ----
124
+ ====
125
+
126
+ == Understanding Validation Output
127
+
128
+ === Success Output
129
+
130
+ When validation passes completely:
131
+
132
+ [source]
133
+ ----
134
+ ✓ Manifest is valid
135
+ Total schemas: 42
136
+ Resolved schemas: 42
137
+ ----
138
+
139
+ **Meaning:**
140
+
141
+ * All file paths exist
142
+ * All schemas have paths (if basic validation)
143
+ * All references resolve (if `--check-references`)
144
+
145
+ === Warning Output
146
+
147
+ Warnings don't fail validation but indicate potential issues:
148
+
149
+ [source]
150
+ ----
151
+ ✓ Manifest is valid
152
+ Total schemas: 42
153
+ Resolved schemas: 41
154
+ Unresolved schemas: 1
155
+
156
+ Warnings (1):
157
+ - Schema 'Activity_method_mim' has no path specified - please provide path
158
+ ----
159
+
160
+ **Common warnings:**
161
+
162
+ * Unresolved schemas (missing `path:`)
163
+ * Schemas in manifest but not referenced (orphaned schemas)
164
+
165
+ === Error Output
166
+
167
+ Errors cause validation to fail:
168
+
169
+ [source]
170
+ ----
171
+ ✗ Manifest validation failed
172
+
173
+ Errors (3):
174
+ - File not found: /path/to/missing_schema.exp
175
+ - Cannot resolve USE FROM geometric_model_schema in action_schema
176
+ - Schema name mismatch: manifest has 'old_name', file contains 'new_name'
177
+ ----
178
+
179
+ **Common errors:**
180
+
181
+ * Missing files
182
+ * Unresolvable references
183
+ * Schema name mismatches
184
+
185
+ == Step-by-Step: Validating a Manifest
186
+
187
+ === Step 1: Basic Validation
188
+
189
+ Always start with basic validation:
190
+
191
+ [source,bash]
192
+ ----
193
+ expressir manifest validate activity_manifest.yaml --verbose
194
+ ----
195
+
196
+ **Expected output (success):**
197
+ [source]
198
+ ----
199
+ Validating manifest: activity_manifest.yaml...
200
+ Checking file existence for 41 schemas...
201
+ ✓ All schema files exist
202
+ ✓ Manifest is valid
203
+ Total schemas: 42
204
+ Resolved schemas: 41
205
+ Unresolved schemas: 1
206
+
207
+ Warnings (1):
208
+ - Schema 'Activity_method_mim' has no path specified
209
+ ----
210
+
211
+ === Step 2: Fix Any Warnings
212
+
213
+ If you see unresolved schema warnings:
214
+
215
+ **Option 1: Use manifest resolve**
216
+ [source,bash]
217
+ ----
218
+ expressir manifest resolve activity_manifest.yaml -o resolved.yaml
219
+ ----
220
+
221
+ **Option 2: Manually add paths**
222
+ [source,bash]
223
+ ----
224
+ vim activity_manifest.yaml
225
+ # Add: path: /path/to/Activity_method_mim.exp
226
+ ----
227
+
228
+ === Step 3: Validate with Reference Checking
229
+
230
+ Once basic validation passes, check references:
231
+
232
+ [source,bash]
233
+ ----
234
+ expressir manifest validate activity_manifest.yaml --check-references --verbose
235
+ ----
236
+
237
+ **Expected output (success):**
238
+ [source]
239
+ ----
240
+ Validating manifest: activity_manifest.yaml...
241
+ Checking referential integrity...
242
+ Validating referential integrity for 42 schemas...
243
+
244
+ Parsing schema files...
245
+ [1/42] Activity_mim.exp ✓
246
+ [2/42] action_schema.exp ✓
247
+ ...
248
+ [42/42] topology_schema.exp ✓
249
+
250
+ Checking references...
251
+ USE FROM action_schema (in Activity_mim): ✓
252
+ REFERENCE FROM basic_attribute_schema (in action_schema): ✓
253
+ ...
254
+
255
+ ✓ Manifest is valid
256
+ Total schemas: 42
257
+ Resolved schemas: 42
258
+
259
+ All references resolved successfully!
260
+ ----
261
+
262
+ === Step 4: Address Any Reference Errors
263
+
264
+ If reference checking fails:
265
+
266
+ [source]
267
+ ----
268
+ ✗ Manifest validation failed
269
+
270
+ Errors (2):
271
+ - Cannot resolve USE FROM geometric_model_schema in action_schema
272
+ - Cannot resolve REFERENCE FROM measure_schema in activity_schema
273
+ ----
274
+
275
+ **Solutions:**
276
+
277
+ 1. Add missing schemas to manifest
278
+ 2. Check if schema names match file contents
279
+ 3. Verify all dependencies are included
280
+
281
+ == Common Validation Scenarios
282
+
283
+ === Scenario 1: Missing File
284
+
285
+ **Error:**
286
+ [source]
287
+ ----
288
+ Errors (1):
289
+ - File not found: /path/to/schemas/action_schema.exp
290
+ ----
291
+
292
+ **Causes:**
293
+
294
+ * Incorrect path in manifest
295
+ * File was moved or deleted
296
+ * Typo in path
297
+
298
+ **Solutions:**
299
+
300
+ 1. **Verify file exists:**
301
+ ```bash
302
+ ls -l /path/to/schemas/action_schema.exp
303
+ ```
304
+
305
+ 2. **Find correct location:**
306
+ ```bash
307
+ find ~/schemas -name "action_schema.exp"
308
+ ```
309
+
310
+ 3. **Update manifest:**
311
+ ```yaml
312
+ action_schema:
313
+ path: /correct/path/to/action_schema.exp
314
+ ```
315
+
316
+ 4. **Re-validate:**
317
+ ```bash
318
+ expressir manifest validate manifest.yaml
319
+ ```
320
+
321
+ === Scenario 2: Unresolved Reference
322
+
323
+ **Error (with --check-references):**
324
+ [source]
325
+ ----
326
+ Errors (1):
327
+ - Cannot resolve USE FROM geometric_model_schema in action_schema
328
+ ----
329
+
330
+ **Meaning:** The file `action_schema.exp` contains `USE FROM geometric_model_schema;` but `geometric_model_schema` is not in the manifest.
331
+
332
+ **Solutions:**
333
+
334
+ 1. **Add to manifest manually:**
335
+ ```yaml
336
+ geometric_model_schema:
337
+ path: /path/to/geometric_model_schema.exp
338
+ ```
339
+
340
+ 2. **Or recreate manifest with better base directories:**
341
+ ```bash
342
+ expressir manifest create action_schema.exp -o manifest.yaml \
343
+ --base-dirs /comprehensive/schema/directory
344
+ ```
345
+
346
+ 3. **Or use resolve command:**
347
+ ```bash
348
+ expressir manifest resolve manifest.yaml -o resolved.yaml \
349
+ --base-dirs /additional/directory
350
+ ```
351
+
352
+ === Scenario 3: Schema Name Mismatch
353
+
354
+ **Error:**
355
+ [source]
356
+ ----
357
+ Errors (1):
358
+ - Schema name mismatch: manifest has 'action_schema', file contains 'Action_Schema'
359
+ ----
360
+
361
+ **Cause:** The SCHEMA declaration in the file doesn't match the manifest key.
362
+
363
+ **Solutions:**
364
+
365
+ 1. **Check actual schema name:**
366
+ ```bash
367
+ grep "^SCHEMA " /path/to/action_schema.exp
368
+ ```
369
+
370
+ 2. **Update manifest to match:**
371
+ ```yaml
372
+ # Change from:
373
+ action_schema:
374
+ path: /path/to/action_schema.exp
375
+
376
+ # To:
377
+ Action_Schema:
378
+ path: /path/to/action_schema.exp
379
+ ```
380
+
381
+ === Scenario 4: Circular Dependencies
382
+
383
+ **Output (with --verbose):**
384
+ [source]
385
+ ----
386
+ Validating referential integrity for 42 schemas...
387
+ ...
388
+ Circular reference detected: measure_schema (valid schema-level circular dependency)
389
+ ...
390
+ ✓ Manifest is valid
391
+ ----
392
+
393
+ **Meaning:** Circular dependencies are **valid** in EXPRESS at the schema level. This is not an error.
394
+
395
+ **No action needed** - the validation passes correctly.
396
+
397
+ == Verbose Mode Details
398
+
399
+ With `--verbose`, you see every step:
400
+
401
+ [source,bash]
402
+ ----
403
+ $ expressir manifest validate manifest.yaml --check-references --verbose
404
+
405
+ Validating manifest: manifest.yaml...
406
+
407
+ Step 1: Checking YAML syntax
408
+ ✓ Valid YAML format
409
+
410
+ Step 2: Checking file existence
411
+ Checking 42 schema files...
412
+ [1/42] /path/to/Activity_mim.exp ✓
413
+ [2/42] /path/to/action_schema.exp ✓
414
+ ...
415
+ ✓ All files exist
416
+
417
+ Step 3: Checking referential integrity
418
+ Parsing schema files...
419
+ [1/42] Parsing Activity_mim.exp... ✓
420
+ [2/42] Parsing action_schema.exp... ✓
421
+ ...
422
+
423
+ Validating references...
424
+ Checking Activity_mim:
425
+ ✓ USE FROM action_schema
426
+ ✓ USE FROM basic_attribute_schema
427
+ ...
428
+ Checking action_schema:
429
+ ✓ REFERENCE FROM basic_attribute_schema
430
+ ✓ REFERENCE FROM support_resource_schema
431
+ ...
432
+
433
+ ✓ Manifest is valid
434
+ Total schemas: 42
435
+ Resolved schemas: 42
436
+
437
+ All references resolved successfully!
438
+ ----
439
+
440
+ == Pre-Package Validation Workflow
441
+
442
+ Before building a package, always validate:
443
+
444
+ [source,bash]
445
+ ----
446
+ # Step 1: Basic validation
447
+ expressir manifest validate manifest.yaml
448
+ # Fix any errors
449
+
450
+ # Step 2: Reference validation
451
+ expressir manifest validate manifest.yaml --check-references
452
+ # Fix any errors
453
+
454
+ # Step 3: Build package
455
+ expressir package build --manifest manifest.yaml output.ler --validate
456
+ ----
457
+
458
+ This ensures:
459
+
460
+ * All files exist
461
+ * All references resolve
462
+ * Package will build successfully
463
+
464
+ == Automating Validation
465
+
466
+ === In Shell Scripts
467
+
468
+ [source,bash]
469
+ ----
470
+ #!/bin/bash
471
+ set -e # Exit on error
472
+
473
+ echo "Validating manifest..."
474
+ expressir manifest validate manifest.yaml --check-references --verbose
475
+
476
+ if [ $? -eq 0 ]; then
477
+ echo "Validation passed! Building package..."
478
+ expressir package build --manifest manifest.yaml output.ler
479
+ else
480
+ echo "Validation failed! Fix errors before building."
481
+ exit 1
482
+ fi
483
+ ----
484
+
485
+ === In CI/CD Pipelines
486
+
487
+ [source,yaml]
488
+ ----
489
+ # GitHub Actions example
490
+ - name: Validate manifest
491
+ run: |
492
+ expressir manifest validate schema_manifest.yaml \
493
+ --check-references \
494
+ --verbose
495
+
496
+ - name: Build package
497
+ if: success()
498
+ run: |
499
+ expressir package build \
500
+ --manifest schema_manifest.yaml \
501
+ release.ler
502
+ ----
503
+
504
+ === In Rake Tasks
505
+
506
+ [source,ruby]
507
+ ----
508
+ # Rakefile
509
+ task :validate_manifest do
510
+ sh "expressir manifest validate manifest.yaml --check-references"
511
+ end
512
+
513
+ task :build_package => :validate_manifest do
514
+ sh "expressir package build --manifest manifest.yaml output.ler"
515
+ end
516
+ ----
517
+
518
+ == Troubleshooting
519
+
520
+ === Validation Hangs or is Very Slow
521
+
522
+ **Problem:** Validation with `--check-references` takes very long or appears to hang
523
+
524
+ **Causes:**
525
+
526
+ * Very large manifest (100+ schemas)
527
+ * Schemas with syntax errors
528
+ * Circular dependency loops (rare)
529
+
530
+ **Solutions:**
531
+
532
+ 1. **Start without `--check-references`:**
533
+ ```bash
534
+ expressir manifest validate manifest.yaml --verbose
535
+ ```
536
+
537
+ 2. **Check for syntax errors in schemas:**
538
+ ```bash
539
+ expressir validate /path/to/suspect_schema.exp
540
+ ```
541
+
542
+ 3. **Validate incrementally** (comment out schemas in manifest to narrow down the issue)
543
+
544
+ === False Positive: "Cannot resolve" Error
545
+
546
+ **Problem:** Validation claims a schema isn't in the manifest, but it is
547
+
548
+ **Causes:**
549
+
550
+ * Case sensitivity - `Action_Schema` vs `action_schema`
551
+ * Schema name in file differs from manifest key
552
+
553
+ **Solutions:**
554
+
555
+ 1. **Check exact schema name in file:**
556
+ ```bash
557
+ grep "^SCHEMA " /path/to/schema.exp
558
+ ```
559
+
560
+ 2. **Ensure manifest key matches exactly:**
561
+ ```yaml
562
+ Action_Schema: # Must match case exactly
563
+ path: /path/to/schema.exp
564
+ ```
565
+
566
+ === Warnings Won't Go Away
567
+
568
+ **Problem:** Unresolved schema warnings persist after adding paths
569
+
570
+ **Cause:** Manifest file wasn't saved or wrong file edited
571
+
572
+ **Solutions:**
573
+
574
+ 1. **Verify file was saved:**
575
+ ```bash
576
+ grep "Activity_method_mim" manifest.yaml -A2
577
+ ```
578
+ Should show the path you added.
579
+
580
+ 2. **Check you're validating the right file:**
581
+ ```bash
582
+ expressir manifest validate /full/path/to/manifest.yaml
583
+ ```
584
+
585
+ == Best Practices
586
+
587
+ === Always Validate Before Building
588
+
589
+ Never skip validation:
590
+
591
+ [source,bash]
592
+ ----
593
+ # Good workflow
594
+ expressir manifest validate manifest.yaml --check-references
595
+ expressir package build --manifest manifest.yaml output.ler
596
+
597
+ # Bad workflow (skipping validation)
598
+ expressir package build --manifest manifest.yaml output.ler # May fail!
599
+ ----
600
+
601
+ === Use --verbose During Development
602
+
603
+ See what's happening:
604
+
605
+ [source,bash]
606
+ ----
607
+ expressir manifest validate manifest.yaml --check-references --verbose > validation.log 2>&1
608
+ ----
609
+
610
+ === Validate After Every Change
611
+
612
+ After modifying manifest:
613
+
614
+ [source,bash]
615
+ ----
616
+ vim manifest.yaml
617
+ expressir manifest validate manifest.yaml --check-references
618
+ ----
619
+
620
+ === Store Validation Results
621
+
622
+ Keep logs for troubleshooting:
623
+
624
+ [source,bash]
625
+ ----
626
+ expressir manifest validate manifest.yaml --check-references --verbose \
627
+ | tee validation_$(date +%Y%m%d_%H%M%S).log
628
+ ----
629
+
630
+ == Complete Validation Example
631
+
632
+ Here's a complete validation workflow with all error types:
633
+
634
+ [source,bash]
635
+ ----
636
+ # Initial validation
637
+ $ expressir manifest validate manifest.yaml
638
+
639
+ ✗ Manifest validation failed
640
+
641
+ Errors (2):
642
+ - File not found: /old/path/action_schema.exp
643
+ - File not found: /old/path/approval_schema.exp
644
+
645
+ # Fix file paths
646
+ $ vim manifest.yaml
647
+ # Update paths to correct locations
648
+
649
+ # Validate again
650
+ $ expressir manifest validate manifest.yaml
651
+
652
+ ✓ Manifest is valid
653
+ Total schemas: 42
654
+ Resolved schemas: 40
655
+ Unresolved schemas: 2
656
+
657
+ Warnings (2):
658
+ - Schema 'Activity_method_mim' has no path specified
659
+ - Schema 'geometric_model_schema' has no path specified
660
+
661
+ # Resolve missing schemas
662
+ $ expressir manifest resolve manifest.yaml -o resolved.yaml --verbose
663
+
664
+ Resolving schema paths in: manifest.yaml...
665
+ Activity_method_mim: ✓ found at activity_method/mim.exp
666
+ geometric_model_schema: ✓ found at geometric_model_schema.exp
667
+ ✓ Manifest resolved: resolved.yaml
668
+
669
+ # Validate resolved manifest
670
+ $ expressir manifest validate resolved.yaml
671
+
672
+ ✓ Manifest is valid
673
+ Total schemas: 42
674
+ Resolved schemas: 42
675
+
676
+ # Check referential integrity
677
+ $ expressir manifest validate resolved.yaml --check-references --verbose
678
+
679
+ Validating manifest: resolved.yaml...
680
+ Checking referential integrity...
681
+ Validating referential integrity for 42 schemas...
682
+ ...
683
+ ✓ Manifest is valid
684
+ Total schemas: 42
685
+ Resolved schemas: 42
686
+
687
+ All references resolved successfully!
688
+
689
+ # Build package
690
+ $ expressir package build --manifest resolved.yaml output.ler --validate
691
+ ✓ Package created: output.ler
692
+ ----
693
+
694
+ == Next Steps
695
+
696
+ Now that you can validate manifests:
697
+
698
+ **Build your package**::
699
+ See link:../../pages/ler-packages.html#building-from-manifests[Building from Manifests]
700
+
701
+ **Understand the complete workflow**::
702
+ Review link:index.html[Manifest Workflows] for best practices
703
+
704
+ **Troubleshoot issues**::
705
+ Return to link:creating-manifests.html[Creating Manifests] or link:resolving-manifests.html[Resolving Manifests] as needed
706
+
707
+ == Bibliography
708
+
709
+ * link:../../pages/schema-manifests.html#validating-a-manifest[Manifest Validation Reference]
710
+ * link:creating-manifests.html[Creating Manifests]
711
+ * link:resolving-manifests.html[Resolving Manifests]
712
+ * link:index.html[Manifest Workflows Overview]
713
+ * link:../../pages/ler-packages.html[LER Packages]