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

Fix the uniqueItems implementation to accomodate undefined values nested inside lists of objects #732

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

pose
Copy link
Contributor

@pose pose commented Apr 4, 2023

Description of changes: I'm explicitly adding handling and test cases for scenarios where undefined and null values are passed.

I also added a new validation test for restJson1:

  ● RestJsonMalformedUniqueItemsStructureMissingKeyList:MalformedRequest

    expect(received).toBe(expected) // Object.is equality

    Expected: 400
    Received: 500

      4818 |
      4819 |   expect(testFunction.mock.calls.length).toBe(0);
    > 4820 |   expect(r.statusCode).toBe(400);
           |                        ^
      4821 |   expect(r.headers["x-amzn-errortype"]).toBeDefined();
      4822 |   expect(r.headers["x-amzn-errortype"]).toBe("ValidationException");
      4823 |

      at Object.<anonymous> (test/functional/restjson1.spec.ts:4820:24)

Locally, after yarn linking the new changes, the error is gone which indicated that the regression has been fixed.

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

@pose pose requested review from a team as code owners April 4, 2023 14:20
@srchase srchase merged commit 30f53a5 into main Apr 17, 2023
@pose pose deleted the fixes/uniqueItems-nested-undefined branch April 19, 2023 09:05
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.

3 participants