This has taken me 6 HOURS to work out. I am very VERY angry at the cavalier way PESC has been approached.
I am also angry at Redocly for the cryptic wording of the error required value must be ["array"].
This bug has prevented almost all examples from actually being validated, because quite simply Redocly falls over as soon as a list with MR obligation shows up.
Recall that in PESC, arrays are encoded as { XLIST: X : [ A, B ] }
In the generated schema, if a list has MR obligation, i.e. at least one element, that is converted into JSON Schema as:
SchoolContactList:
description: >-
<p>A list of contact persons associated with a school.</p>
type: object
required:
- "SchoolContact"
properties:
SchoolContact:
type: array
items:
$ref: '#/definitions/SchoolContact'
This has taken me 6 HOURS to work out. I am very VERY angry at the cavalier way PESC has been approached.
I am also angry at Redocly for the cryptic wording of the error
required value must be ["array"].
This bug has prevented almost all examples from actually being validated, because quite simply Redocly falls over as soon as a list with MR obligation shows up.
Recall that in PESC, arrays are encoded as { XLIST: X : [ A, B ] }
In the generated schema, if a list has MR obligation, i.e. at least one element, that is converted into JSON Schema as:
The
required
statement is an array:- "SchoolContact"
That is correct in Goessner mode.
stand by