Skip to content

Referecing object with array property from $defs in oneOf throws an error #108

@akorny

Description

@akorny

First of all, I want to thank you for providing this awesome library and it's integration in Django.

Recently I discovered an issue. When I am trying to reference an object with array type property from $defs inside another object, the error TypeError: can't access property "length", t is undefined is thrown and UI fails to load.

Here is an example of such schema:

{
    "type": "object",
    "oneOf": [
         {
             "$ref": "#/$defs/sample_object"
         }
    ],
    "$defs": {
        "sample_object": { 
            "type": "object",
            "properties": {
                "array_in_object": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions