From 0ab136440aa2937557272e080d2f5ca52e7d6b01 Mon Sep 17 00:00:00 2001
From: MirjamSchr <75301398+MirjamSchr@users.noreply.github.com>
Date: Thu, 20 Feb 2025 09:35:11 +0100
Subject: [PATCH 1/3] Added way to generate the Python data model separately
 and included that into the testing procedure.

---
 template/justfile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/template/justfile b/template/justfile
index 597bc73..6d9ceb5 100644
--- a/template/justfile
+++ b/template/justfile
@@ -99,6 +99,10 @@ gen-doc:
 [group('model development')]
 testdoc: gen-doc _serve
 
+# Generate the Python data model
+gen-python:
+poetry run gen-project -d  {{pymodel}} -I python {{source_schema_path}}
+
 # Generate project files including Python data model
 [group('model development')]
 gen-project:
@@ -177,7 +181,7 @@ _test-schema:
     poetry run gen-project {{config_yaml}} -d tmp {{source_schema_path}}
 
 # Run Python unit tests with pytest
-_test-python:
+_test-python: gen-python
     poetry run python -m pytest
 
 # Run example tests

From 6f2b71b12bc9d991376b949325fd9a3b6c4003f4 Mon Sep 17 00:00:00 2001
From: MirjamSchr <75301398+MirjamSchr@users.noreply.github.com>
Date: Thu, 20 Feb 2025 12:43:13 +0100
Subject: [PATCH 2/3] Fix Typo

---
 template/justfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/template/justfile b/template/justfile
index 6d9ceb5..4d930c4 100644
--- a/template/justfile
+++ b/template/justfile
@@ -101,7 +101,7 @@ testdoc: gen-doc _serve
 
 # Generate the Python data model
 gen-python:
-poetry run gen-project -d  {{pymodel}} -I python {{source_schema_path}}
+  poetry run gen-project -d  {{pymodel}} -I python {{source_schema_path}}
 
 # Generate project files including Python data model
 [group('model development')]

From 2c87872ce4f62e4c5dd401664fad32475ddd3cc0 Mon Sep 17 00:00:00 2001
From: David Linke <dr.david.linke@gmail.com>
Date: Thu, 20 Feb 2025 21:21:20 +0100
Subject: [PATCH 3/3] Add pydantic model generation to gen-python

---
 template/justfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/template/justfile b/template/justfile
index 4d930c4..0ac3d44 100644
--- a/template/justfile
+++ b/template/justfile
@@ -99,9 +99,10 @@ gen-doc:
 [group('model development')]
 testdoc: gen-doc _serve
 
-# Generate the Python data model
+# Generate the Python data models (dataclasses & pydantic)
 gen-python:
   poetry run gen-project -d  {{pymodel}} -I python {{source_schema_path}}
+  poetry run gen-pydantic {{gen_pydantic_args}} {{source_schema_path}} > {{pymodel}}/{{schema_name}}_pydantic.py
 
 # Generate project files including Python data model
 [group('model development')]