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

39 lines
877 B
JSON

{
"description": "Schema for bible_metadata.json",
"properties": {
"old_testament_books": {
"items": {
"type": "string"
},
"maxItems": 39,
"minItems": 39,
"title": "Old Testament Books",
"type": "array"
},
"new_testament_books": {
"items": {
"type": "string"
},
"maxItems": 27,
"minItems": 27,
"title": "New Testament Books",
"type": "array"
},
"book_abbreviations": {
"additionalProperties": {
"type": "string"
},
"minProperties": 1,
"title": "Book Abbreviations",
"type": "object"
}
},
"required": [
"old_testament_books",
"new_testament_books",
"book_abbreviations"
],
"title": "Schema for bible_metadata.json",
"type": "object",
"$id": "https://kjvstudy.org/schemas/bible_metadata.schema.json"
}