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

Request encoding user info #576

Merged
merged 17 commits into from
Aug 7, 2023
Merged

Request encoding user info #576

merged 17 commits into from
Aug 7, 2023

Conversation

adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Aug 6, 2023

  • Add RequestEncodingContainer class that holds references to request headers, query parameters and uri.
  • Add methods for encoding headers, query parameters and uri sections and use these to construct the AWSHTTPRequest.
  • Use the above to replace all usages of Mirror
  • Add AWSHTTPBody, AWSEventStream encode(to:) that uses the above
  • Conform ResponseDecodingContainer function names to the same as RequestEncodingContainer
  • Allow XMLEncoder to return nil (if you encode a type whose encode function only has a singleValueContainer used to encode a nil value then there is no XML to serialise).

@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Merging #576 (bd76668) into 7.x.x (076d383) will increase coverage by 2.11%.
The diff coverage is 76.85%.

❗ Current head bd76668 differs from pull request most recent head f2e77d9. Consider uploading reports for the commit f2e77d9 to get more accurate results

@@            Coverage Diff             @@
##            7.x.x     #576      +/-   ##
==========================================
+ Coverage   79.11%   81.22%   +2.11%     
==========================================
  Files          78       77       -1     
  Lines        6512     6457      -55     
==========================================
+ Hits         5152     5245      +93     
+ Misses       1360     1212     -148     
Files Changed Coverage Δ
Sources/SotoCore/Concurrency/EventStream.swift 83.92% <0.00%> (-11.99%) ⬇️
Sources/SotoCore/AWSShapes/EventPayload.swift 40.00% <40.00%> (ø)
Sources/SotoCore/Encoder/RequestContainer.swift 72.72% <72.72%> (ø)
Sources/SotoCore/Encoder/ResponseContainer.swift 75.00% <87.50%> (+39.19%) ⬆️
Sources/SotoXML/XMLEncoder.swift 46.17% <88.46%> (+0.78%) ⬆️
Sources/SotoCore/HTTP/AWSHTTPRequest.swift 90.04% <94.87%> (-4.61%) ⬇️
Sources/SotoCore/Doc/AWSShape.swift 62.50% <100.00%> (+11.77%) ⬆️
Sources/SotoCore/Encoder/QueryEncoder.swift 66.89% <100.00%> (ø)
Sources/SotoCore/HTTP/AWSHTTPBody.swift 60.65% <100.00%> (+10.65%) ⬆️
Sources/SotoTestUtils/TestServer.swift 94.76% <100.00%> (ø)

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@adam-fowler adam-fowler requested a review from 0xTim August 6, 2023 10:21
@adam-fowler adam-fowler merged commit c3e86a6 into 7.x.x Aug 7, 2023
@adam-fowler adam-fowler deleted the request-encoding-user-info branch August 7, 2023 13:43
adam-fowler added a commit that referenced this pull request Aug 12, 2023
* Add RequestEncodingContainer, pass to encoders

* Fixup checksum tests

* Get rid of all uses of Mirror, fix Payloads

* Fix requests with payload and headers

* Move URL building to RequestEncoderContainer

* Changes to get services woking

* Add EventPayload

* Fix up tests

* Conform AWSEventStream to decodable

* Make RequestContainer code inlinable

* Rename decode functions to align with RequestContainer

* comments

* Remove unused code

* Add SingleValueEncodingContainer.encodeNil

* add file header

* Add more tests

* More tests
adam-fowler added a commit that referenced this pull request Dec 24, 2023
* Add RequestEncodingContainer, pass to encoders

* Fixup checksum tests

* Get rid of all uses of Mirror, fix Payloads

* Fix requests with payload and headers

* Move URL building to RequestEncoderContainer

* Changes to get services woking

* Add EventPayload

* Fix up tests

* Conform AWSEventStream to decodable

* Make RequestContainer code inlinable

* Rename decode functions to align with RequestContainer

* comments

* Remove unused code

* Add SingleValueEncodingContainer.encodeNil

* add file header

* Add more tests

* More tests
adam-fowler added a commit that referenced this pull request Apr 5, 2024
* Add RequestEncodingContainer, pass to encoders

* Fixup checksum tests

* Get rid of all uses of Mirror, fix Payloads

* Fix requests with payload and headers

* Move URL building to RequestEncoderContainer

* Changes to get services woking

* Add EventPayload

* Fix up tests

* Conform AWSEventStream to decodable

* Make RequestContainer code inlinable

* Rename decode functions to align with RequestContainer

* comments

* Remove unused code

* Add SingleValueEncodingContainer.encodeNil

* add file header

* Add more tests

* More tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants