Skip to content

[BUG] [GO] Client does not allow unknown fields in response meaning additions to APIs break clients #21446

Open
@acabarbaye

Description

@acabarbaye

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
    make the json serialisation of responses more permissive
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

wherever deserialisation is performed, option DisallowUnknownFields is set

. This means that if an API is being extended on a server and fields are added. Although this should not be a breaking change, this leads to all clients failing parsing server responses.

Suggest a fix

Either add an option to be strict or not about the schema or be more permissive and remove the DisallowUnknownFields when parsing responses

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