kae-made / dtdl-schema-generator

MIT License
1 stars 0 forks source link

Missing commas when translating to "@type": "Object" #3

Open mkp-emde opened 1 year ago

mkp-emde commented 1 year ago

When I define a structured datatype in Bridgepoint, the generator creates an object ("@type": "Object"). Now in the DTDL-definition of the corresponding fields there are commas missing in between fields.

Example of generated DTDL:

... "contents": [ { "@type": "Property", "name": "SomeStruct", "schema": { "@type": "Object", "displayName": "exampleType_t", "fields": [ { "name": "Number", "schema": "integer" } { "name": "Kilometer", "schema": "integer" } { "name": "Description", "schema": "string" } ] } } ...

And how it should be:

... "contents": [ { "@type": "Property", "name": "SomeStruct", "schema": { "@type": "Object", "displayName": "exampleType_t", "fields": [ { "name": "Number", "schema": "integer" }, { "name": "Kilometer", "schema": "integer" }, { "name": "Description", "schema": "string" } ] } } ...

mkp-emde commented 1 year ago

When I add all missing commas the DTDL is valid and I can use it without problems.