Central repository for JSON schemas used across the byteowlz ecosystem.
This repository contains JSON schemas that ensure consistency and validation across multiple projects:
- Extraction schemas: For xtr-py and xtrs data extraction
- Business schemas: For based business management
- Memory schemas: For mmry memory storage
- Search schemas: For sx search results
schemas/
├── extraction/ # Data extraction schemas (xtr-py, xtrs)
│ ├── contact_details.json
│ ├── event.json
│ ├── invoice.json
│ └── ... (10 schemas total)
│
├── business/ # Business entity schemas (based)
│ ├── contact_import.json
│ ├── party.json
│ ├── document.json
│ ├── product.json
│ └── payment.json
│
├── memory/ # Memory storage schemas (mmry)
│ └── memory.json
│
└── search/ # Search result schemas (sx)
└── search_result.json
Each project can sync schemas using a sync script. Example:
#!/usr/bin/env bash
SCHEMA_REPO_URL="https://raw.githubusercontent.com/byteowlz/schemas/main"
# Fetch a specific schema
curl -sf "$SCHEMA_REPO_URL/extraction/contact_details.json" -o schemas/contact_details.jsonAll schemas follow JSON Schema Draft 07 specification:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Schema Name",
"description": "Clear description of what this schema represents",
"type": "object",
"properties": {
"field_name": {
"type": "string",
"description": "Field description"
}
},
"required": ["field_name"]
}- Create the schema file in the appropriate category directory
- Ensure it follows the JSON Schema Draft 07 spec
- Add clear
title,description, and property descriptions - Test with affected projects
- Create a pull request
- Consider backward compatibility
- Test changes against all affected projects
- Document breaking changes in PR description
Validate schemas using:
# Using jsonschema (Python)
pip install jsonschema
jsonschema --check schemas/extraction/contact_details.json
# Using ajv-cli (Node.js)
npm install -g ajv-cli
ajv validate -s schemas/extraction/contact_details.json -d example.jsonSome schemas are designed to be compatible:
contact_details ↔ contact_import
extraction/contact_details.json: Extract from textbusiness/contact_import.json: Import to based- Compatible structure allows seamless data flow
MIT License - See LICENSE file for details