Skip to content

Conversation

@TriggerAu
Copy link
Contributor

This adds a forced cast inside the method that prevents Powershell from converting a single valued array to an object.

This pr does not include changes to the test methods as Im not sure how the team would intend the use case to be tested

Its a revisit on #35

Issue #50

This adds a forced cast inside the method that prevents Powershell from
converting a single valued array to an object.

This pr does not include changes to the test methods as Im not sure how
the team would intend the use case to be tested

Its a revisit on okta#35
@laura-rodriguez
Copy link
Contributor

Thank you for your contribution, @TriggerAu!

I've filed an internal ticket for the team to review and prioritize.

In the meantime, could you add a unit test to verify this works as expected? -If that's not available to you, that's OK.- We have UTs for this functionality here.

Internal Ref: OKTA-813695

laura-rodriguez added a commit that referenced this pull request Oct 29, 2024
- Update Remove-NullPropertiesFromArray to ensure an array is always returned
- Add tests to verify functionality
- Fix #43
@laura-rodriguez
Copy link
Contributor

Hi @TriggerAu,

I've included your PR in #58 with some additional changes. You will notice that instead of using Remove-NullProperties in line 38, I ended up using Remove-NullPropertiesFromArray. I've also updated the Remove-NullPropertiesFromArray to ensure we always return an array. Additionally, I added more tests to cover objects created with initializer functions.

Feel free to take a look at the PR, and again, thank you for contributing to the Okta PS module ⭐

laura-rodriguez added a commit that referenced this pull request Oct 30, 2024
- Update Remove-NullPropertiesFromArray to ensure an array is always returned
- Add tests to verify functionality
- Fix #43

Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
laura-rodriguez added a commit that referenced this pull request Oct 30, 2024
- Update Remove-NullPropertiesFromArray to ensure an array is always returned
- Add tests to verify functionality
- Fix #43

Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
laura-rodriguez added a commit that referenced this pull request Oct 30, 2024
- Update Remove-NullPropertiesFromArray to ensure an array is always returned
- Add tests to verify functionality
- Fix #43

Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
laura-rodriguez added a commit that referenced this pull request Oct 30, 2024
- Update Remove-NullPropertiesFromArray to ensure an array is always returned
- Add tests to verify functionality
- Fix #43

Signed-off-by: Laura Rodriguez <rdz.maria.laura@gmail.com>
@laura-rodriguez
Copy link
Contributor

Superseded by #58

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