linkml-reference-validator 0.1.7__tar.gz → 0.2.0__tar.gz

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 (153) hide show
  1. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/claude.yml +1 -1
  2. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/dragon-ai.yml +2 -2
  3. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.gitignore +1 -0
  4. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/PKG-INFO +27 -1
  5. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/README.md +26 -0
  6. linkml_reference_validator-0.2.0/docs/setup-guide.md +699 -0
  7. linkml_reference_validator-0.2.0/docs/troubleshooting.md +706 -0
  8. linkml_reference_validator-0.2.0/docs/tutorials/complete-workflow.md +900 -0
  9. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/mkdocs.yml +3 -0
  10. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/reference_fetcher.py +18 -0
  11. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/clinicaltrials.py +15 -2
  12. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/doi.py +22 -0
  13. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/entrez.py +29 -4
  14. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/pmid.py +16 -0
  15. linkml_reference_validator-0.2.0/src/linkml_reference_validator/etl/sources/utils.py +106 -0
  16. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/models.py +14 -0
  17. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_reference_fetcher.py +51 -9
  18. linkml_reference_validator-0.2.0/tests/test_source_utils.py +193 -0
  19. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_sources.py +85 -11
  20. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.claude/.mcp.json +0 -0
  21. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.claude/settings.json +0 -0
  22. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.copier-answers.yml +0 -0
  23. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.devcontainer/devcontainer.json +0 -0
  24. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.devcontainer/post_create.sh +0 -0
  25. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.editorconfig +0 -0
  26. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/actions/claude-code-action/action.yml +0 -0
  27. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
  28. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/actions/claude-issue-triage-action/action.yml +0 -0
  29. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/ai-controllers.json +0 -0
  30. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/copilot-instructions.md +0 -0
  31. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/copilot-setup-steps.yml +0 -0
  32. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/dependabot.yml +0 -0
  33. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/claude-code-review.yml +0 -0
  34. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/claude-issue-summarize.yml +0 -0
  35. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/claude-issue-triage.yml +0 -0
  36. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/claude-ontology-review.yml +0 -0
  37. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/deploy-docs.yaml +0 -0
  38. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/main.yaml +0 -0
  39. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.github/workflows/pypi-publish.yaml +0 -0
  40. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.goosehints +0 -0
  41. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.pre-commit-config.yaml +0 -0
  42. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/.yamllint.yaml +0 -0
  43. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/AGENTS.md +0 -0
  44. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/BUG_GEO_ACCESSION_TO_UID.md +0 -0
  45. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/BUG_ZENODO_DOI_AND_URL_HANDLING.md +0 -0
  46. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/CLAUDE.md +0 -0
  47. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/CLI-ISSUES.md +0 -0
  48. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/CODE_OF_CONDUCT.md +0 -0
  49. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/CONTRIBUTING.md +0 -0
  50. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/FEATURE_REQUEST_REPAIR.md +0 -0
  51. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/LICENSE +0 -0
  52. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/REVIEW2.md +0 -0
  53. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/REVIEW3.md +0 -0
  54. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/ai.just +0 -0
  55. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/copilot-instructions.md +0 -0
  56. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/about.md +0 -0
  57. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/concepts/content-types.md +0 -0
  58. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/concepts/editorial-conventions.md +0 -0
  59. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/concepts/how-it-works.md +0 -0
  60. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/elements/.gitkeep +0 -0
  61. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/add-reference-source.md +0 -0
  62. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/repair-validation-errors.md +0 -0
  63. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/skip-unsupported-references.md +0 -0
  64. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/use-local-files-and-urls.md +0 -0
  65. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-clinical-trials.md +0 -0
  66. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-dois.md +0 -0
  67. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-entrez.md +0 -0
  68. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-obo-files.md +0 -0
  69. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-titles.md +0 -0
  70. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/how-to/validate-urls.md +0 -0
  71. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/index.md +0 -0
  72. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/notebooks/01_getting_started.ipynb +0 -0
  73. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/notebooks/02_advanced_usage.ipynb +0 -0
  74. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/notebooks/03_python_api.ipynb +0 -0
  75. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/notebooks/04_obo_validation.ipynb +0 -0
  76. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/notebooks/05_geo_validation.ipynb +0 -0
  77. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/quickstart.md +0 -0
  78. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/reference/cli.md +0 -0
  79. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/templates-linkml/README.md +0 -0
  80. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/docs/todo.md +0 -0
  81. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/examples/README.md +0 -0
  82. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/justfile +0 -0
  83. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/mypy.ini +0 -0
  84. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/notebooks/01_getting_started.ipynb +0 -0
  85. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/notebooks/02_advanced_usage.ipynb +0 -0
  86. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/notebooks/03_python_api.ipynb +0 -0
  87. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/notebooks/README.md +0 -0
  88. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/project/README.md +0 -0
  89. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/project.justfile +0 -0
  90. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/pyproject.toml +0 -0
  91. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/pytest.ini +0 -0
  92. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/__init__.py +0 -0
  93. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/_version.py +0 -0
  94. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/__init__.py +0 -0
  95. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/cache.py +0 -0
  96. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/lookup.py +0 -0
  97. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/repair.py +0 -0
  98. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/shared.py +0 -0
  99. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/cli/validate.py +0 -0
  100. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/__init__.py +0 -0
  101. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/__init__.py +0 -0
  102. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/base.py +0 -0
  103. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/file.py +0 -0
  104. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/json_api.py +0 -0
  105. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/loader.py +0 -0
  106. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/sources/url.py +0 -0
  107. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/etl/text_extractor.py +0 -0
  108. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/field_detection.py +0 -0
  109. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/plugins/REVIEW.md +0 -0
  110. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/plugins/__init__.py +0 -0
  111. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/plugins/reference_validation_plugin.py +0 -0
  112. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/validation/__init__.py +0 -0
  113. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/validation/fuzzy_text_utils.py +0 -0
  114. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/validation/repairer.py +0 -0
  115. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/src/linkml_reference_validator/validation/supporting_text_validator.py +0 -0
  116. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/__init__.py +0 -0
  117. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/conftest.py +0 -0
  118. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/data/test_data_invalid.yaml +0 -0
  119. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/data/test_data_valid.yaml +0 -0
  120. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/data/test_schema.yaml +0 -0
  121. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/CLINICALTRIALS_NCT00000001.md +0 -0
  122. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/GEO_GSE12345.md +0 -0
  123. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMC_TEST001.md +0 -0
  124. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMC_TEST001.txt +0 -0
  125. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMC_TEST002.md +0 -0
  126. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMC_TEST002.txt +0 -0
  127. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST001.md +0 -0
  128. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST001.txt +0 -0
  129. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST002.md +0 -0
  130. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST002.txt +0 -0
  131. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST003.md +0 -0
  132. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/PMID_TEST003.txt +0 -0
  133. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/fixtures/sample.obo +0 -0
  134. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_cli.py +0 -0
  135. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_cli_lookup.py +0 -0
  136. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_cli_repair.py +0 -0
  137. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_clinicaltrials_integration.py +0 -0
  138. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_e2e_integration.py +0 -0
  139. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_field_detection.py +0 -0
  140. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_fuzzy_suggestions.py +0 -0
  141. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_geo_integration.py +0 -0
  142. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_json_api_source.py +0 -0
  143. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_models.py +0 -0
  144. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_optional_linkml_dependency.py +0 -0
  145. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_plugin_integration.py +0 -0
  146. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_pmc_fulltext.py +0 -0
  147. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_real_validation.py +0 -0
  148. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_repair.py +0 -0
  149. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_supporting_text_validator.py +0 -0
  150. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_text_extractor.py +0 -0
  151. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_title_validation.py +0 -0
  152. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/tests/test_validation_config.py +0 -0
  153. {linkml_reference_validator-0.1.7 → linkml_reference_validator-0.2.0}/uv.lock +0 -0
@@ -31,7 +31,7 @@ jobs:
31
31
  fetch-depth: 1
32
32
 
33
33
  - name: Install uv
34
- uses: astral-sh/setup-uv@v5
34
+ uses: astral-sh/setup-uv@v7
35
35
 
36
36
  - name: Install python tools
37
37
  run: |
@@ -29,7 +29,7 @@ jobs:
29
29
 
30
30
  - name: Check for qualifying mention
31
31
  id: check
32
- uses: actions/github-script@v6
32
+ uses: actions/github-script@v8
33
33
  with:
34
34
  github-token: ${{ secrets.PAT_FOR_PR }} # Use PAT instead of default token
35
35
  script: |
@@ -131,7 +131,7 @@ jobs:
131
131
  ls -alt ${{ env.TOOLS_DIR }}
132
132
 
133
133
  - name: Install uv
134
- uses: astral-sh/setup-uv@v5
134
+ uses: astral-sh/setup-uv@v7
135
135
 
136
136
  - name: Install python tools
137
137
  run: |
@@ -141,3 +141,4 @@ dmypy.json
141
141
  .idea
142
142
  # Local vscode editor config
143
143
  .vscode
144
+ .cursor
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linkml_reference_validator
3
- Version: 0.1.7
3
+ Version: 0.2.0
4
4
  Summary: Validation of supporting text from references and publications
5
5
  Author-email: Chris Mungall <cjmungall@lbl.gov>
6
6
  License-Expression: Apache-2.0
@@ -891,6 +891,32 @@ linkml-reference-validator validate text "text" UNKNOWN:12345
891
891
  # ✗ Valid: False (WARNING) - Could not fetch reference
892
892
  ```
893
893
 
894
+ #### `source_extra_fields` (per-source JSONPath map)
895
+
896
+ Capture additional fields from reference API responses and append them to cached content so they are included in validation. Keys are source prefixes (e.g. `clinicaltrials`, `PMID`, `DOI`, `GEO`); values map a field name to a JSONPath expression into the raw API response. Prefer paths to a single value (string/number). If the path selects a list, its elements are converted to strings and joined with spaces. If it selects an object or other type, its string representation is used.
897
+
898
+ **Example:**
899
+
900
+ Save as `my-config.yaml`:
901
+
902
+ ```yaml
903
+ validation:
904
+ source_extra_fields:
905
+ clinicaltrials:
906
+ eligibility: "$.protocolSection.eligibilityModule.eligibilityCriteria"
907
+ outcomes: "$.protocolSection.outcomesModule.primaryOutcomes"
908
+ ```
909
+
910
+ Pass this config when fetching so the cache includes these sections: use `--config my-config.yaml` with `cache reference` or `validate`. Captured field names are stored in `extra_fields_captured` in the cache frontmatter.
911
+
912
+ ```bash
913
+ # Fetch and cache a trial with extra fields (eligibility, outcomes)
914
+ linkml-reference-validator cache reference clinicaltrials:NCT00000001 --config my-config.yaml
915
+
916
+ # Validate text against the cached content (including extra sections)
917
+ linkml-reference-validator validate text "Inclusion: age >= 18" clinicaltrials:NCT00001372 --config my-config.yaml
918
+ ```
919
+
894
920
  ### Cache Directory
895
921
 
896
922
  Default: `references_cache/` in current directory
@@ -871,6 +871,32 @@ linkml-reference-validator validate text "text" UNKNOWN:12345
871
871
  # ✗ Valid: False (WARNING) - Could not fetch reference
872
872
  ```
873
873
 
874
+ #### `source_extra_fields` (per-source JSONPath map)
875
+
876
+ Capture additional fields from reference API responses and append them to cached content so they are included in validation. Keys are source prefixes (e.g. `clinicaltrials`, `PMID`, `DOI`, `GEO`); values map a field name to a JSONPath expression into the raw API response. Prefer paths to a single value (string/number). If the path selects a list, its elements are converted to strings and joined with spaces. If it selects an object or other type, its string representation is used.
877
+
878
+ **Example:**
879
+
880
+ Save as `my-config.yaml`:
881
+
882
+ ```yaml
883
+ validation:
884
+ source_extra_fields:
885
+ clinicaltrials:
886
+ eligibility: "$.protocolSection.eligibilityModule.eligibilityCriteria"
887
+ outcomes: "$.protocolSection.outcomesModule.primaryOutcomes"
888
+ ```
889
+
890
+ Pass this config when fetching so the cache includes these sections: use `--config my-config.yaml` with `cache reference` or `validate`. Captured field names are stored in `extra_fields_captured` in the cache frontmatter.
891
+
892
+ ```bash
893
+ # Fetch and cache a trial with extra fields (eligibility, outcomes)
894
+ linkml-reference-validator cache reference clinicaltrials:NCT00000001 --config my-config.yaml
895
+
896
+ # Validate text against the cached content (including extra sections)
897
+ linkml-reference-validator validate text "Inclusion: age >= 18" clinicaltrials:NCT00001372 --config my-config.yaml
898
+ ```
899
+
874
900
  ### Cache Directory
875
901
 
876
902
  Default: `references_cache/` in current directory