sartography / spiff-arena

SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
GNU Lesser General Public License v2.1
44 stars 34 forks source link

make sure additionalProperties works in user tasks #1481

Open burnettk opened 2 weeks ago

burnettk commented 2 weeks ago

if you have a json schema with this property, make sure it doesn't generate errors.

this works:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Name Form",
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50
    }
  },
  "required": ["first_name"],
  "additionalProperties": false
}

UPDATE: ok, you need to set a variable before the user task (like in a script task or anything), and then it will complain about any of those fields that are not in the form. however, in MUI forms, it says "[form] must NOT have additional properties" so that is much clearer than the nothing we get with carbon, so it is much less of an issue.