Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Array Schema

Shaun Francis edited this page Sep 6, 2017 · 1 revision

Arrays are supported albeit in a reduced capacity: arrays must be all of the same type: either all boolean, number, string or object. Mixing types is arrays is supported by json schema and json but not by this application. For example, the following arrays are allowed:

all numbers:

[1, 2, 3, 4, 5]

all objects:

[{"first": "object"}, {"second": "object"}]

Not supported

[3, "different", { "types" : "of values" }]

Arrays will be generated as a generic java.util.List of the appropriate type. For example an array of numbers

[1, 2, 3, 4, 5]

will be generated as

private final List<Integer> myIntegers;

arrays of strings

["squantum", "crapulent"]

will become

private final List<String> strangeWords;
Clone this wiki locally