Skip to content

Header values are URI encoded #857

Closed as duplicate
Closed as duplicate

Description

@ahoppen

Header values are URI-encoded by swift-openapi-generator. This is incorrect eg. for Cache-Control headers where translating max-cache=3600 to max-cache%3D3600 produces an invalid cache-control header.

Activity

  1. czechboy0 commented on Jan 8, 2026

    @czechboy0
    Contributor

    Yeah this is a bug. In earlier OpenAPI spec versions, it was implied that headers should be percent-encoded. And then recently, in 3.2.0, they clarified that they shouldn't. So we'll need to find a way to gently switch that behavior while breaking the fewest existing adopters.

    TBD what the process will be, ideas welcome.

    The fix will be in swift-openapi-runtime, and we want new adopters to use it, so the obvious solutions like a flag in openapi-runtime-config.yaml wouldn't work very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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