-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Request CTO validation is not working #157
Comments
Validation seems to be triggered, so it might be down to Concerto. If you can attach the archive, it would be helpful for reproducing with the same context. Below is a run on the promissory notes template. The last example is a String value instead of a Double which does not raise the expected validation error.
|
Same behaviour in Concerto:
|
Cicero |
Concerto uses
|
I'm moving this issue to Concerto. |
Concerto is generally quite lose with validation. Bug or feature?
|
A proposed resolution is to change the validation semantics to be strict. This means atomic values in the JSON will have to be proper instances of the corresponding atomic type. New Validation Semantics
Breaking changesBoolean
String
Double
Integer / Long
DateTime
|
Initial PR implementing the proposal is in #161 |
The change in this PR is great at identifying potential issues in tests. E.g., in Ergo: |
Fixed based on proposal in #161 in the |
Describe the bug
It is possible to send an invalid request (with respect to the CTO model) and have the Ergo execute.
To Reproduce
cicero execute --request monthlysales-invalid.json --state state.json
Expected behavior
The execution should fail because
sales[0].price.doubleValue
is a string.Version
Cicero 0.13.5
The text was updated successfully, but these errors were encountered: