Skip to content

Why are array fields allowed to contain undefined, but other fields aren't? #120

Closed
@pikajude

Description

@pikajude

Probably the easiest way to see this is to check the "Kitchen Sink" example and see "dislike": [null] at the bottom. null is neither a valid string value nor undefined. This trips up the jsonschema library which I'm using in conjunction with this one, because it doesn't check for nulls.

I looked through the code but wasn't able to figure it out. I know that arrays get an empty item added to them if they don't have a default value, but I don't know why it ends up in the output rather than just getting filtered out, like other invalid/non-present attributes do.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions