Adjust schema for collection elements of collections that aren't populated

This commit is contained in:
mvdbeek
2024-04-22 11:52:18 +02:00
parent e3aba2d2b0
commit 5648478e6d
2 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -3751,7 +3751,7 @@ export interface components {
* Element Type
* @description The type of the element. Used to interpret the `object` field.
*/
element_type: components["schemas"]["DCEType"];
element_type?: components["schemas"]["DCEType"] | null;
/**
* Dataset Collection Element ID
* @example 0123456789ABCDEF
@@ -3767,10 +3767,11 @@ export interface components {
* Object
* @description The element's specific data depending on the value of `element_type`.
*/
object:
object?:
| components["schemas"]["HDAObject"]
| components["schemas"]["HDADetailed"]
| components["schemas"]["DCObject"];
| components["schemas"]["DCObject"]
| null;
};
/**
* DCEType
+4 -4
View File
@@ -971,13 +971,13 @@ class DCESummary(Model, WithModelClass):
title="Element Identifier",
description="The actual name of this element.",
)
element_type: DCEType = Field(
...,
element_type: Optional[DCEType] = Field(
None,
title="Element Type",
description="The type of the element. Used to interpret the `object` field.",
)
object: Union[HDAObject, HDADetailed, DCObject] = Field(
...,
object: Optional[Union[HDAObject, HDADetailed, DCObject]] = Field(
None,
title="Object",
description="The element's specific data depending on the value of `element_type`.",
)