-
Notifications
You must be signed in to change notification settings - Fork 251
Description
Given the following schema for a theoretical request/response body:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "myArray": { "type": "array", "items": { "type": "object", "properties": { "identifier": { "type": "string", "description": "The identifier string.", "examples": ["123-45-6789"], "minLength": 1, "maxLength": 100 }, "assigner": { "type": "string", "description": "Identifier assigner.", "oneOf": [ { "enum": ["INTERNAL"], "examples":["INTERNAL"], "readOnly": true, "description": "INTERNAL identifiers are system generated. You cannot assign these." }, { "enum": ["EXTERNAL"], "examples":["EXTERNAL"], "description": "EXTERNAL identifiers are assigned by you." } ] }, "type": { "type": "string", "description": "The type of identifier.", "enum": ["SSN", "UUID", "INTEGER"], "examples": ["SSN"] } }, "identifier": ["id", "type", "authority"], "minProperties": 1, "description": "You must assign at least one identifier." }, "minItems": 1, "description": "Array of identifiers." } }, "required": ["myArray"] }
For property assigner, the enumeration value (or constant -- I tried both) does not display, nor do the example values, nor the read-only flag. The oneOf dropdown does work. assigner should look identical to the type enumeration below it, with a read-only flag displaying on the first "oneOf" -- it just happens to be inside of a oneOf:
First "oneOf" selected:
Second "oneOf" selected:
The read-only flag should display as shown below for a non-"oneOf" property: