{ "_comment": "Template for defining event schemas in JSON format", "schema_version": "1.0", "event_name": "user.created", "description": "Event triggered when a new user is created.", "source": "user-service", "timestamp": "2024-10-27T10:00:00Z", "payload": { "_comment": "Data associated with the user.created event", "user_id": { "type": "string", "format": "uuid", "description": "Unique identifier for the user" }, "username": { "type": "string", "minLength": 3, "maxLength": 50, "description": "Username of the new user" }, "email": { "type": "string", "format": "email", "description": "Email address of the new user" }, "created_at": { "type": "string", "format": "date-time", "description": "Timestamp of when the user was created" }, "profile": { "type": "object", "description": "User profile information", "properties": { "first_name": { "type": "string", "description": "First name of the user" }, "last_name": { "type": "string", "description": "Last name of the user" } }, "required": [ "first_name", "last_name" ] } }, "required": [ "user_id", "username", "email", "created_at" ], "examples": [ { "_comment": "Example of a user.created event", "user_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "username": "newuser123", "email": "newuser@example.com", "created_at": "2024-10-27T10:00:00Z", "profile": { "first_name": "John", "last_name": "Doe" } } ] }