datacontract/datacontract-cli

JsonSchema importer doesn't support array types

Plozano94 opened this issue · 2 comments

Hi there,
trying JsonSchema importer seems to fail when a property item is an array. In order to test try:

Schema:
myjsonschema.json

{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "eventId": { "type": "string" }, "eventName": { "type": "string" }, "eventCreationDate": { "type": "integer" }, "collections": { "type": "array", "items": [ { "type": "integer" } ] } }, "required": [ "eventId", "eventName", "eventCreationDate", "collections" ] }
Command: "datacontract import --format jsonschema --source myjsonschema.json"

Error:
imagen

I can replicate this, let me dig into it a bit more

Implemented, target with release v0.10.11