Skip to content

Commit 9ac9a28

Browse files
committed
#2224 fix metadata validation after changes in metadata json schema
1 parent ae98e32 commit 9ac9a28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Components/JSON/BEXIS.JSON.Helpers/MetadataStructureConverter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ private bool IsChoice(XmlNode xmlNode)
378378

379379
private JSchemaType GetJSchemaType(BaseUsage usage)
380380
{
381-
if(IsChoice(usage.Extra))
381+
// if choice and max cardinality >1 then array
382+
if (IsChoice(usage.Extra) && getMaxCardinality(usage) > 1)
383+
return JSchemaType.Array;
384+
else if (IsChoice(usage.Extra))
382385
return JSchemaType.Object;
383386
else if (getMaxCardinality(usage) > 1)
384387
return JSchemaType.Array;

0 commit comments

Comments
 (0)