You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
Expected behavior
resource/ should accept a value such as: {"eventType":"foo", "bar":"val"}
and reject a value such as: {"not":"acceptable"}
Current behavior
Both are considered valid.
Seems to me the issue is that unless the discriminator field is present there's no validation at all and everything is valid.
There should be a validation that the discriminator field exists and then check for valid values of that field and validate accordingly, otherwise it should fail.
Hey @jpbelang , sorry to pull you in but it seems you're the most active maintainer. If you could point me in the right direction I could probably throw in a PR to fix this defect. I appreciate your input.
Also, is the library really deprecated as the repo description states?
Consider the following RAML
Expected behavior
resource/ should accept a value such as:
{"eventType":"foo", "bar":"val"}
and reject a value such as:
{"not":"acceptable"}
Current behavior
Both are considered valid.
Seems to me the issue is that unless the discriminator field is present there's no validation at all and everything is valid.
There should be a validation that the discriminator field exists and then check for valid values of that field and validate accordingly, otherwise it should fail.
I added test cases in this PR #602
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-39
The text was updated successfully, but these errors were encountered: