Skip to content

Models specifying omitempty #19

@klische

Description

@klische

I noticed that MX models are specified with omitempty. This results in outputting models/JSON that don't contain objects that have null values, and can cause broken schema generation. For example, on Apple's Swift Codables, decoding JSON will throw an exception if the schema changes from what was expected.

Was there a reason to have omitempty specified? Is there any danger to removing omitempty? I'm also happy to create a PR if you think that omitempty can be safely removed across all models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions