Replies: 1 comment
-
With the current implementation of oneOf, it only supports strings. Ex: { "gender": oneOf(["male", "female"]) } Marking this as a feature request. For a workaround, please use expression matcher. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to validate an api which has a response property which returns string or empty or null values based on the data in the backend.
Code sample for reference. Any help to handle this condition is greatly appreciated.
_spec
.get(/api)
.expectStatus(200)
.expectJsonMatch({
property: oneOf([string(), "", null])}
Beta Was this translation helpful? Give feedback.
All reactions