From 66f2fc81ba78f058c165407a1607123b0df7b7cd Mon Sep 17 00:00:00 2001 From: mattamon Date: Fri, 29 Nov 2024 08:56:19 +0100 Subject: [PATCH] Change data to type mixed in schema --- src/Metadata/Schema/CustomMetadata.php | 2 +- src/Metadata/Schema/PredefinedMetadata.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Metadata/Schema/CustomMetadata.php b/src/Metadata/Schema/CustomMetadata.php index 4ed118c8..4249f11a 100644 --- a/src/Metadata/Schema/CustomMetadata.php +++ b/src/Metadata/Schema/CustomMetadata.php @@ -37,7 +37,7 @@ public function __construct( private readonly string $language, #[Property(description: 'Type', type: 'string', example: 'input')] private readonly string $type, - #[Property(description: 'Data', type: 'string', example: 'data')] + #[Property(description: 'Data', type: 'mixed', example: 'data')] private readonly mixed $data ) { } diff --git a/src/Metadata/Schema/PredefinedMetadata.php b/src/Metadata/Schema/PredefinedMetadata.php index 29926a45..afc6a852 100644 --- a/src/Metadata/Schema/PredefinedMetadata.php +++ b/src/Metadata/Schema/PredefinedMetadata.php @@ -23,7 +23,7 @@ #[Schema( title: 'PredefinedMetadata', - required: ['name', 'type'], + required: ['id', 'name', 'type', 'creationDate', 'modificationDate', 'isWriteable'], type: 'object' )] final class PredefinedMetadata implements AdditionalAttributesInterface @@ -41,7 +41,7 @@ public function __construct( private string $type, #[Property(description: 'Target sub type', type: 'string', example: 'input')] private ?string $targetSubType, - #[Property(description: 'Data', type: 'string', example: 'data')] + #[Property(description: 'Data', type: 'mixed', example: 'data')] private mixed $data, #[Property(description: 'Config', type: 'string', example: 'config')] private ?string $config,