diff --git a/CHANGELOG.md b/CHANGELOG.md index 602c288..e609d16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.4.0 (03/12/2018) + +* Array elements now supported. (pdanpdan) + ## v1.3.1 (18/04/2018) * Allows object properties to be omitted. diff --git a/package.json b/package.json index b213c96..baa59f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsonschema-avro", - "version": "1.3.1", + "version": "1.4.0", "description": "Convert JSON-schema into avro schema", "main": "src/index.js", "scripts": { diff --git a/test/samples/array/expected.json b/test/samples/array/expected.json new file mode 100644 index 0000000..d60dfa1 --- /dev/null +++ b/test/samples/array/expected.json @@ -0,0 +1,20 @@ +{ + "doc": "Array example", + "fields": [ + { + "doc": "example array", + "name": "list", + "type": { + "items": { + "doc": "a string", + "name": "list", + "type": "string" + }, + "type": "array" + } + } + ], + "name": "main", + "namespace": "http.yourdomain.com.schemas.myschema.json", + "type": "record" +} diff --git a/test/samples/array/input.json b/test/samples/array/input.json new file mode 100644 index 0000000..59ff640 --- /dev/null +++ b/test/samples/array/input.json @@ -0,0 +1,15 @@ +{ + "id": "http://yourdomain.com/schemas/myschema.json", + "description": "Array example", + "type": "object", + "properties": { + "list": { + "description": "example array", + "type": "array", + "items": { + "description": "a string", + "type": "string" + } + } + } +}