Files
kjvstudy.org/kjvstudy_org/data/schemas/featured_verses.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

48 lines
1008 B
JSON

{
"$defs": {
"FeaturedVerse": {
"description": "Schema for individual featured verse",
"properties": {
"book": {
"minLength": 1,
"title": "Book",
"type": "string"
},
"chapter": {
"minimum": 1,
"title": "Chapter",
"type": "integer"
},
"verse": {
"minimum": 1,
"title": "Verse",
"type": "integer"
}
},
"required": [
"book",
"chapter",
"verse"
],
"title": "FeaturedVerse",
"type": "object"
}
},
"description": "Schema for featured_verses.json",
"properties": {
"verses": {
"items": {
"$ref": "#/$defs/FeaturedVerse"
},
"minItems": 1,
"title": "Verses",
"type": "array"
}
},
"required": [
"verses"
],
"title": "Schema for featured_verses.json",
"type": "object",
"$id": "https://kjvstudy.org/schemas/featured_verses.schema.json"
}