From 4238a2607024b05a0a44a584fbc5ae1cfd56644a Mon Sep 17 00:00:00 2001 From: Sebastian Iancu Date: Fri, 24 Nov 2023 22:58:10 +0100 Subject: [PATCH] fix handling UMDvDate in codegen yaml (#99 SPECITS-70) --- development/src/Writer/Codegen.php | 2 +- specifications/schemas/data_types/DvIntervalOfDate.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/development/src/Writer/Codegen.php b/development/src/Writer/Codegen.php index 9ad4440e..1c76f8ac 100644 --- a/development/src/Writer/Codegen.php +++ b/development/src/Writer/Codegen.php @@ -18,7 +18,7 @@ class Codegen extends AbstractWriter { protected function prepareInput(): void { echo "prepareInput() ..."; $this->input = preg_replace('#\\/schemas\\/U((?:Dv|Party|Version|Object|Uid|Content|Item|DataValue)[a-zA-Z]*)#', '\\/schemas\\/$1', $this->input); - $this->input = preg_replace('#\\/schemas\\/UM(DvDateTime)#', '\\/schemas\\/$1', $this->input); + $this->input = preg_replace('#\\/schemas\\/UM(DvDateTime|DvDate)#', '\\/schemas\\/$1', $this->input); } /** diff --git a/specifications/schemas/data_types/DvIntervalOfDate.yaml b/specifications/schemas/data_types/DvIntervalOfDate.yaml index 535ad0a4..83c85627 100644 --- a/specifications/schemas/data_types/DvIntervalOfDate.yaml +++ b/specifications/schemas/data_types/DvIntervalOfDate.yaml @@ -7,7 +7,7 @@ properties: type: string default: DV_INTERVAL lower: - $ref: ./UMDvDate.yaml + $ref: ../data_types/UMDvDate.yaml upper: - $ref: ./UMDvDate.yaml + $ref: ../data_types/UMDvDate.yaml x-discriminator-value: DV_INTERVAL_of_DATE