Files
kjvstudy.org/kjvstudy_org/data/schemas/word_studies.schema.json
T
kennethreitz 8a03d22b9a Add JSON schema validation with Pydantic
- Add Pydantic models for all 6 main data files:
  - bible_metadata.json
  - word_studies.json
  - study_guides.json
  - verse_commentary.json
  - featured_verses.json
  - resource_slugs.json

- Add BookIntroduction schema for book JSON files

- Create scripts/validate_data.py:
  - Validates JSON data using Pydantic models
  - Can generate JSON schemas from Pydantic models
  - CLI with --verbose and --generate-schemas flags

- Add test suite (tests/test_data_validation.py):
  - 12 tests validating data file structure
  - Parametrized tests for all data files
  - Integrated into existing test suite

All validation tests pass. JSON schemas auto-generated from Pydantic models.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 18:34:44 -05:00

122 lines
2.6 KiB
JSON

{
"$defs": {
"WordStudy": {
"description": "Schema for individual word study entry",
"properties": {
"ot_term": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ot Term"
},
"ot_transliteration": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ot Transliteration"
},
"ot_meaning": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ot Meaning"
},
"ot_note": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ot Note"
},
"nt_term": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Nt Term"
},
"nt_transliteration": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Nt Transliteration"
},
"nt_meaning": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Nt Meaning"
},
"nt_note": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Nt Note"
}
},
"title": "WordStudy",
"type": "object"
}
},
"additionalProperties": {
"$ref": "#/$defs/WordStudy"
},
"description": "Schema for word_studies.json",
"title": "Schema for word_studies.json",
"type": "object",
"$id": "https://kjvstudy.org/schemas/word_studies.schema.json"
}