Skip to content

fix: multiple XML collection deserialization bugs #768

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

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

kstich
Copy link
Contributor

@kstich kstich commented Jan 21, 2020

This commit fixes a couple issues with generating code to deserialize
structure, union, or body members that target collection members.

  1. Unflattened shapes that could return multiple entries in their
    collection but only return one would result in an error at runtime
    trying to iterate over an object like it was an Array.
  2. Unflattened shapes that were not set in the provided output would
    result in an error at runtime when trying to validate the entry exists
    element without validating that its parent element existed.

This update also bumps the version of smithy-aws-traits to latest.

Fixes #765

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kstich kstich requested a review from mtdowling January 21, 2020 19:53
@kstich kstich changed the title Fix multiple XML collection deserialization bugs fix: multiple XML collection deserialization bugs Jan 21, 2020
@aws-sdk-js-automation

This comment has been minimized.

@codecov-io
Copy link

codecov-io commented Jan 21, 2020

Codecov Report

❗ No coverage uploaded for pull request base (smithy-codegen@133430c). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##             smithy-codegen     #768   +/-   ##
=================================================
  Coverage                  ?   92.41%           
=================================================
  Files                     ?      137           
  Lines                     ?     2676           
  Branches                  ?      463           
=================================================
  Hits                      ?     2473           
  Misses                    ?      203           
  Partials                  ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 133430c...2ab0649. Read the comment docs.

This commit fixes a couple issues with generating code to deserialize
structure, union, or body members that target collection members.

1. Unflattened shapes that could return multiple entries in their
collection but only return one would result in an error at runtime
trying to iterate over an object like it was an Array.
2. Unflattened shapes that were not set in the provided output would
result in an error at runtime when trying to validate the entry exists
element without validating that its parent element existed.

This update also bumps the version of smithy-aws-traits to latest.
@kstich kstich force-pushed the xml_aggregate_fix branch from c6258d9 to 2ab0649 Compare January 21, 2020 20:46
@kstich kstich requested a review from mtdowling January 21, 2020 20:47
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@kstich kstich merged commit 7f29be8 into aws:smithy-codegen Jan 21, 2020
@kstich kstich deleted the xml_aggregate_fix branch January 21, 2020 22:47
@lock
Copy link

lock bot commented Jan 29, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants