Skip to content

Required empty string is removed #26

@ibrot

Description

@ibrot

Hi,

I currently have the problem that I want to define a required string property with empty default value like ""

test.schema.json

{
    "definitions": {},
    "type": "object",
    "title": "Test Schema",
    "required": [
        "test"
    ],
    "properties": {
        "test": {
            "type": "string",
            "default": ""
        }
    }
}

test.json

{
    "test": ""
}

atom-json-editor now remove the property "test" and throws the error

Object missing the required property 'test'

, but I want to allow empty strings. I also tried using a regex pattern but no success. :(

Online JSON Schema validators said that this should be valid.

Am I doing something wrong or is this a problem in atom-json-editor?

Thank you and best regards :)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions