apple / apple/swift-openapi-generator

Investigate header percent-encoding with clarifications in recent OpenAPI versions

Open
#827 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

The question of percent-encoding header values over the evolution of the OpenAPI specification has been a bit messy, and 3.1.2 adds to it again: https://spec.openapis.org/oas/v3.1.2.html#appendix-d-serializing-headers-and-cookies

This issue tracks tracking down the correct behavior, and possibly defaulting to different behavior based on the version of the OpenAPI document - to avoid making backwards-incompatible changes.

This might require extending OpenAPI Runtime to allow customizing whether to percent-encode header values or not (maybe can even be added to the Configuration struct), and try to use the correct behavior on the newer version of OpenAPI docs where this behavior was clarified.

Contributor guide

Open the contributing guide

Research direction

Start with OpenAPI Runtime and the Configuration struct, then compare their current header serialization behavior with Appendix D of the OpenAPI 3.1.2 specification. Done means the runtime can apply the correct percent-encoding behavior for the relevant OpenAPI document version without introducing a backwards-incompatible default.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, swift
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.