Files
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

90 lines
1.6 KiB
JSON

{
"description": "Schema for resource_slugs.json",
"properties": {
"study_guides": {
"items": {
"type": "string"
},
"title": "Study Guides",
"type": "array"
},
"angels": {
"items": {
"type": "string"
},
"title": "Angels",
"type": "array"
},
"prophets": {
"items": {
"type": "string"
},
"title": "Prophets",
"type": "array"
},
"names_of_god": {
"items": {
"type": "string"
},
"title": "Names Of God",
"type": "array"
},
"parables": {
"items": {
"type": "string"
},
"title": "Parables",
"type": "array"
},
"covenants": {
"items": {
"type": "string"
},
"title": "Covenants",
"type": "array"
},
"apostles": {
"items": {
"type": "string"
},
"title": "Apostles",
"type": "array"
},
"women": {
"items": {
"type": "string"
},
"title": "Women",
"type": "array"
},
"festivals": {
"items": {
"type": "string"
},
"title": "Festivals",
"type": "array"
},
"fruits_of_spirit": {
"items": {
"type": "string"
},
"title": "Fruits Of Spirit",
"type": "array"
}
},
"required": [
"study_guides",
"angels",
"prophets",
"names_of_god",
"parables",
"covenants",
"apostles",
"women",
"festivals",
"fruits_of_spirit"
],
"title": "Schema for resource_slugs.json",
"type": "object",
"$id": "https://kjvstudy.org/schemas/resource_slugs.schema.json"
}