Open mcolom opened 2 years ago
I need more information in order to fix this. A demo can have no parameters at all and parameters don't have optional or required specification. CP checks that the DDL is valid JSON as far as I know.
Could you provide more information on this bug so that I can understand what is broken?
If I recall well, the problem is that the DDL's doc says that the selection_radio property is not mandatory. But it seems that clearly it should be, since if you don't add it the interface has a weird behavior. @kidanger @tinankh could you provide more info about that?
I might be missing something but "selection_radio" is just the type of parameter which is required in every parameter. But having a parameter of type "selection_radio" is not required in any case and there are demos working correctly without one as far as I know. I will wait for further information on how to reproduce the bug.
The issue is visible in demo 5555531082044. Try removing the default_value field for each of the two parameters and running the demo. This produces two different issues, but in each case it could be fixed if we had an error when saving the ddl (because the specified parameters without default_value are not valid for the system).
Both of those parameters need default_value. It is specified in the doc as a required property in the DDL. I will try and see what could be done in the case of not having default_value in the DDL but in any case it should always be there.
It seems the natural solution is to validate the JSON with the DDL's schema. The schema is not ready yet, but contributors are very welcome!
The "selection_radio" property is mandatory in the DDL, but the system doesn't reject a DDL which doesn't have one.