ZDL Domain Modeling Language
ZDL is a domain specific language (DSL) for modeling Event-Driven microservices.
Among all approaches to software development, Domain-Driven Design is the only one that focused on language as the key tool for a deep understanding of a given domain’s complexity. - Alberto Brandolini in Event Storming
Inspired by JHipster JDL, ZDL is a language for describing DDD Bounded Contexts, including domain entities and their relationships, services, commands, events and business policies... for Event-Driven Architectures.
It's designed to be compact, readable and expressive. Business friendly, developer friendly, and machine friendly.
ZDL works well as an Ubiquitous Language format.

File Structure
ZDL files follow a structured format with two main sections:
File Types and Extensions
ZenWave supports two file types for different purposes:
.zwfiles - Plugin configuration files that can be executed directly from IntelliJ using the play button in the gutter.zdlfiles - Domain model files that can include both model-related configuration and domain definitions
1. Prolog Section (Optional)
Contains metadata and configuration used by ZenWave tooling:
global javadoc- File-level documentationconfig- Plugin configuration and generation settings (for.zwfiles) or model-related configuration (for.zdlfiles)apis- API definitions (OpenAPI, AsyncAPI references)
2. Domain Definition Section
Contains the actual domain model declarations:
entities- Domain entities and aggregatesenums- Enumeration typesservices- Business operations and commandsinputs/outputs- Data transfer objectsevents- Domain eventspolicies- Business rules and policies
Structure Rules
- Files can be split into plugin configuration (
.zw) and model configuration (.zdl) - Prolog elements (
global javadoc,config,apis) must appear at the top if present - Domain elements can be declared in any order and quantity
- All prolog elements are optional
Syntax Pattern
[<global javadoc>][<config>][<apis>][<entity> | <enum> | <aggregate> | <policies> | <service> | <input> | <output> | <event>]*

The following Complete ZDL Examples demonstrate a full application with aggregates, REST API adapters, and domain event publishing:
ZenWave Scripts (.zw)
// This is a ZenWave Scripts File (.zw)//// This file defines ZenWave SDK plugins and their configurations for SDK execution and code generation.//// Usage:// - Execute plugins using the Play button in IntelliJ IDEA ZenWave Model Editor// - Or Copy the generated command line hovering the play button on each plugin// - Or Run commands directly from terminal using the generated command line//// Plugin: https://plugins.jetbrains.com/plugin/22858-zenwave-domain-model-editor-for-zdl//// There are global properties that apply to all plugins, and plugin specific properties.// Configuration Precedence (highest to lowest):// 1. Command line arguments always have the highest precedence// 2. Plugin-specific properties (defined in this file)// 3. Global properties (defined in this file)// 4. Properties from referenced .zdl files//config {// This is a global configuration that applies to all plugins.zdlFile "zenwave-model.zdl"// these should match the values of openapi-generator-maven-plugin// used by the OpenAPIControllersPlugin and SpringWebTestClientPluginopenApiApiPackage "{{basePackage}}.adapters.web"openApiModelPackage "{{basePackage}}.adapters.web.model"openApiModelNameSuffix DTOplugins {/** Generates an OpenAPI 3.0 specification from the ZDL model. */ZDLToOpenAPIPlugin {idType integeridTypeFormat int64targetFile "src/main/resources/public/apis/openapi.yml"}/** Generates an AsyncAPI 3.0 specification from the ZDL model. */ZDLToAsyncAPIPlugin {asyncapiVersion v3idType integeridTypeFormat int64targetFile "src/main/resources/public/apis/asyncapi.yml"includeCloudEventsHeaders trueincludeKafkaCommonHeaders true}/** Generates a Backend Application from the ZDL model. (Headless Core) */BackendApplicationDefaultPlugin {useLombok falseuseJSpecify trueincludeEmitEventsImplementation true// --force // overwite all files}/** Generates Spring MVC controllers from the OpenAPI specification (Web Adapters). */OpenAPIControllersPlugin {openapiFile "src/main/resources/public/apis/openapi.yml"}SpringWebTestClientPlugin {openapiFile "src/main/resources/public/apis/openapi.yml"}SpringWebTestClientPlugin {openapiFile "src/main/resources/public/apis/openapi.yml"groupBy businessFlowbusinessFlowTestName CreateUpdateDeleteCustomerIntegrationTestoperationIds createCustomer,updateCustomer,deleteCustomer,getCustomer}OpenAPIKaratePlugin {openapiFile "src/main/resources/public/apis/openapi.yml"}OpenAPIKaratePlugin {openapiFile "src/main/resources/public/apis/openapi.yml"groupBy businessFlowbusinessFlowTestName CreateUpdateDeleteCustomerKarateTestoperationIds createCustomer,updateCustomer,deleteCustomer,getCustomer}}}