apple / apple/swift-openapi-generator
Allowing disabling percent encoding for some HTTP header fields
- Dominant language
- Swift
- Stars
- 2k
- Forks
- 182
- Avg merge
- 13h 28m
- Merged PRs (30d)
- 5
Description
### Question
I want to redirect to `domain2.com` from `domain1.com`.
I can redirect same domain.
ex: from`domain1.com/login` to `domain1.com/account`.
```yaml
responses:
'303':
headers:
location:
schema:
type: string
```
```swift
func login(_ input: Operations.login.Input) async throws -> Operations.login.Output {
// login
return .seeOther(.init(headers: .init(location: "https:/example2.com")))
}
```
Contributor guide
Research direction
Start by reproducing the cross-domain redirect using the provided OpenAPI YAML and Swift login handler, then inspect how the generated Location header is encoded. Done means the requested header can preserve the intended external redirect URL without unwanted percent encoding, with coverage for the demonstrated case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, swift
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100