diff --git a/examples/schema.json b/examples/schema.json new file mode 100644 index 0000000..7c3cd60 --- /dev/null +++ b/examples/schema.json @@ -0,0 +1,65 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Application Configuration", + "description": "Configuration schema for the application", + "type": "object", + "properties": { + "app": { + "type": "object", + "description": "Application settings", + "properties": { + "name": { + "type": "string", + "description": "Application name" + }, + "version": { + "type": "string", + "description": "Application version" + }, + "debug": { + "type": "boolean", + "description": "Enable debug mode", + "default": false + } + }, + "required": ["name"] + }, + "database": { + "type": "object", + "description": "Database connection settings", + "properties": { + "host": { + "type": "string", + "description": "Database host address" + }, + "port": { + "type": "integer", + "description": "Database port number", + "minimum": 1, + "maximum": 65535 + }, + "name": { + "type": "string", + "description": "Database name" + } + } + }, + "logging": { + "type": "object", + "description": "Logging configuration", + "properties": { + "level": { + "type": "string", + "description": "Logging level", + "enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], + "default": "INFO" + }, + "file": { + "type": "string", + "description": "Log file path" + } + } + } + }, + "required": ["app", "database"] +}