[!TIP]
π Deutsche Version hier verfΓΌgbar π
This document explains how cross-language SDK consistency is maintained in this open-source project.
The .NET project is the source of truth for all models. The Java SDK models are manually maintained and verified against the generated JSON Schema to ensure parity.
.NET Models β JSON Schema
β
Parity Tests Verify Java Matches
When .NET models change, the XsdGenerator project regenerates:
schemas/xjustiz-core.schema.json)The Java models are manually crafted in sdk/java/src/main/java/de/xjustiz/core/models/.
Automated parity tests verify that Java models:
The pipeline runs:
SchemaParityTest - Verifies Java models match the schemaIf any discrepancy is found, the pipeline fails.
sdk/dotnet/src/xjustiz.core-dotnet/Models/Use the sync script to automatically update Java models based on .NET models:
python scripts/sync-java-models.py
The script will:
sdk/dotnet/src/xjustiz.core-dotnet/Models/Entities/# Java parity tests (via Gradle)
cd sdk/java && gradle test --tests "*SchemaParityTest*"
X.Justiz.Core/
βββ sdk/dotnet/src/xjustiz.core-dotnet/ # Source of Truth
β βββ Models/ # .NET models (edit here)
βββ schemas/
β βββ xjustiz-core.schema.json # Generated from .NET
βββ sdk/java/src/main/java/de/xjustiz/core/
β βββ models/ # Java models (synced from .NET)
β βββ serialization/ # Hand-written utilities
βββ scripts/
βββ sync-java-models.py # Sync Java models from .NET