Skip to content

Feat: allow null and empty arrays for optional array attributes - #80

Merged
kodumbeats merged 6 commits into
mainfrom
feat-null-valid-for-optional-array-attributes
Nov 2, 2021
Merged

kodumbeats merged 6 commits into
mainfrom
feat-null-valid-for-optional-array-attributes

Conversation

@kodumbeats

@kodumbeats kodumbeats commented Oct 29, 2021 •

Copy link
Copy Markdown
Contributor

Summary

Edge cases around validating arrays kept popping up, so I've cleaned up the logic of the Structure validator, and that covered all cases where the incorrect validator was applied. This change was required because array attributes were validated with the wrong validator. Additionally, this change accepts empty arrays as well as null for optional array attributes.

Tests

Additional unit tests have been added to Structure tests to check these cases.

Bug

optional URL array attribute is required

Request

Bildschirmfoto 2021-10-28 um 12 39 44

Error

Bildschirmfoto 2021-10-28 um 12 39 55

Structure

Bildschirmfoto 2021-10-28 um 12 40 32

@kodumbeats
kodumbeats marked this pull request as draft October 29, 2021 20:01
@kodumbeats
kodumbeats marked this pull request as ready for review November 2, 2021 00:38
@kodumbeats
kodumbeats merged commit 9b46976 into main Nov 2, 2021
@abnegate
abnegate deleted the feat-null-valid-for-optional-array-attributes branch November 23, 2023 01:50
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