Skip to content

Date nested in allOf/oneOf/anyOf doesn't use the configured decoding strategy #263

@czechboy0

Description

@czechboy0

This was discovered in the k8s API, which (simplified) uses this pattern:

Foo:
  allOf:
    type: string
    format: date-time

When decoding the generated struct with the single value property in it of type Date, the Date decoding doesn't get caught by the decoding strategy on the JSONDecoder, instead it goes directly to Date.init(from:), because of how we generate the code.

Metadata

Metadata

Assignees

Labels

kind/bugFeature doesn't work as expected.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions