Skip to content

[Bug]: JsonSchema fails with JSON round-trip #5264

Description

@Mattias-Sehlstedt

Description of the problem/issue

JsonSchema type field is asymmetric since there is a custom serializer that does not have a matching deserializer. This leads to a JSON round-trip failing when a single type is set.

Affected Version

2.2.53

Steps to Reproduce

  1. Create an instance of JsonSchema where there is a single type defined
  2. Serialize it
  3. Deserialize it, and see that it fails with reading type: X into types

Expected Behavior

Deserialization should work.

Actual Behavior

Deserialization does not work.

Logs / Stack Traces

Additional Context

Checklist

  • I have searched the existing issues and this is not a duplicate.
  • I have provided sufficient information for maintainers to reproduce the issue.

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