Skip to content

Schema generated for default empty arrays is not valid #108

@kuisathaverat

Description

@kuisathaverat

In the case you pass the type [array] the schema has the default value "[]" that is a String not an Array

## @section tittle
## @param features [array] list of features to enable
features: []
{
    "title": "Chart Values",
    "type": "object",
    "properties": {
        "features": {
            "type": "array",
            "description": "list of features to enable",
            "default": "[]",
            "items": {
                "type": "string"
            }
        }
    }
}

If you do not set the type, the default value in the schema is correct, but items does not have type

## @section tittle
## @param features
features: []
{
    "title": "Chart Values",
    "type": "object",
    "properties": {
        "features": {
            "type": "array",
            "description": "",
            "default": [],
            "items": {}
        }
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions