Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#273): support for preventBodyLoad in request flow #275

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

fredmaggiowski
Copy link
Member

@fredmaggiowski fredmaggiowski commented Oct 12, 2023

This PR partially address #273; in the issue the proposal is to be able to decide on multiple levels when the body should not be read (request/response/all).

Working on the request side (which addresses our main issue) was easy, while working on the response is not immediately obvious, the problem there has two faces:

  • there's still some tech debt on owns the responsibility to read the body
  • the response flow is mostly meant to interact with the body, changing the underlying behaviour without proper considerations could make the feature useless

Having dealt with only the request flow I avoided working on the configuration at the general options level.

@fredmaggiowski fredmaggiowski marked this pull request as ready for review October 12, 2023 13:39
@fredmaggiowski fredmaggiowski added the enhancement New feature or request label Oct 12, 2023
@fredmaggiowski fredmaggiowski linked an issue Oct 12, 2023 that may be closed by this pull request
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6496471016

  • 21 of 23 (91.3%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 84.23%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openapi/openapi_utils.go 6 8 75.0%
Totals Coverage Status
Change from base Build 6493116691: -0.01%
Covered Lines: 2003
Relevant Lines: 2378

💛 - Coveralls

openapi/openapi_utils_test.go Show resolved Hide resolved
service/handler.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Oct 12, 2023

Pull Request Test Coverage Report for Build 6496872753

  • 24 of 26 (92.31%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 84.23%

Changes Missing Coverage Covered Lines Changed/Added Lines %
openapi/openapi_utils.go 6 8 75.0%
Totals Coverage Status
Change from base Build 6493116691: -0.01%
Covered Lines: 2003
Relevant Lines: 2378

💛 - Coveralls

Copy link
Member

@davidebianchi davidebianchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidebianchi davidebianchi merged commit 7101922 into main Oct 12, 2023
7 checks passed
@davidebianchi davidebianchi deleted the feat/#273-preventBodyLoad-in-request branch October 12, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent reading request and response body
4 participants