tercul-backend/schemas/_defs.json
google-labs-jules[bot] 4c2f20c33d feat: Implement blog schema and example content
This commit introduces a new blog feature by implementing a JSON schema for blog posts and providing five example content files.

Key changes:
- Created a new directory structure for schemas and content (`schemas/`, `content/blog/`).
- Implemented a JSON schema for blog posts, split into `blog.json` and `_defs.json` for reusability.
- Added five example blog post files with full, realistic content.
- Included a Python script (`validate.py`) to validate the example content against the schema.
2025-09-07 23:22:36 +00:00

42 lines
1.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/schemas/_defs.json",
"title": "Common Definitions",
"$defs": {
"imageAsset": {
"type": "object",
"additionalProperties": false,
"required": ["url", "alt"],
"properties": {
"url": { "type": "string", "format": "uri" },
"alt": { "type": "string" },
"width": { "type": "integer", "minimum": 1 },
"height": { "type": "integer", "minimum": 1 },
"mime": { "type": "string" }
}
},
"attachment": {
"type": "object",
"additionalProperties": false,
"required": ["label", "url"],
"properties": {
"label": { "type": "string" },
"url": { "type": "string", "format": "uri" },
"mime": { "type": "string" }
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["title", "url"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"publisher": { "type": "string" },
"url": { "type": "string", "format": "uri" },
"date_accessed": { "type": "string", "format": "date" }
}
}
}
}