Skip to content

Most generated JSONSchema files are invalid

Bug Description

When Linting the generated JSONSchema files, every schema that inherits from SCThing is not a valid Draft6 JSONSchema. The reported errors are always within the description and type property of the interface extending SCThing. Both properties are expected to be a concrete type instead of an object.

Field Error Value
.definitions['SCAcademicEvent'].description should be string {"type": "string", "description": "Description of the thing", "minLength": 1 }
.definitions['SCAcademicEvent'].type should be equal to one of the allowed values { "$ref": "#/definitions/SCAcademicEventType", "description": "Type of an academic event" }

How should the model be instead?

All generated JSONSchema files should be valid according to Draft6 JSONSchema specification.

Edited by Rainer Killinger