-
Notifications
You must be signed in to change notification settings - Fork 32
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(dynamite): Fix pattern check for enums #1313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a unit test to dynamite_e2e.
I'd suggest a new spec just for pattern checking.
For enums we should be able to verify the pattern at generation time as the value of an enum is constant. Should we do so long term? If so we should open an issue for that.
Yes, I forgot to add the test before creating the PR 😅 |
ed5000c
to
1330c36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it'll fit better into:
https://github.com/nextcloud/neon/blob/main/packages/dynamite/dynamite_end_to_end_test/lib/pattern_check.openapi.json
Other than that LGTM
Right but in this case I don't want to test the pattern checking itself but that it works with serialized parameters (which was broken before). |
1330c36
to
7cdd1ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blocking for now
7cdd1ec
to
9fbff5a
Compare
9fbff5a
to
74b1f8a
Compare
Signed-off-by: jld3103 <[email protected]>
74b1f8a
to
befbd0b
Compare
A null input for the pattern checks is always allowed. This was not handled correctly and the tests for it were also wrong. If the input is not allowed to be null then it needs to be checked elsewhere and not with the patterns. |
The pattern has to be checked after the value has been serialized (not only applies to enums, but that's the only use case so far).