softwaremill / softwaremill/tapir
[FEATURE] Allow opting out from validation of header values
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.5k
- Forks
- 468
- Avg merge
- 5h 37m
- Merged PRs (30d)
- 34
Description
Tapir version: 1.0.0
Scala version: 2.13.8
Description
original post in gitter: https://gitter.im/softwaremill/tapir?at=62b1f6000a522647985b7307
Consider an endpoint which define a response header based on some configuration:
.out(header("Keep-Alive", s"timeout=$keepAliveSeconds"))
same endpoint is reused in an sttp client.
Now client does not necessarily have same configuration as server, thus that endpoint looks a bit different.
When trying to use the sttp client, one would get something of this sort:
Mismatch(Some(Keep-Alive: timeout=0),Some(Keep-Alive: timeout=3600))
But this is not very helpful.
A possible solution might have an attribute we can set on the input, which would be used when decoding.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how header inputs are validated during decoding and how mismatches are reported for reused endpoints. Define an opt-out mechanism that permits differing configured header values between the server and sttp client, then add coverage for the Keep-Alive example and verify that validation remains unchanged when opting out is not requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100