Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JSON Schema Validation @Camunda Modeler

JSON Schema Validation @Camunda Modeler

Why we chose ajv for our utility and why it's maybe not a good idea (anymore).

Niklas Kiefer

March 30, 2021
Tweet

More Decks by Niklas Kiefer

Other Decks in Technology

Transcript

  1. JSON Schema Validation @Camunda Modeler Why we chose ajv for

    our utility and why it's maybe not a good idea (anymore) Niklas
  2. 3 How it’s done (v1) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate for missing id, name, appliesTo, ... - validate all properties - validate all scopes - ... validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema only compatibility
  3. 4 How it’s done (v1) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate for missing id, name, appliesTo, ... - validate all properties - validate all scopes - ... validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema only compatibility Element-Templates-Modal
  4. 5

  5. 6 How it’s done (v1) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate for missing id, name, appliesTo, ... - validate all properties - validate all scopes - ... validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema only compatibility
  6. 7 How it’s done (v2) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate for missing id, name, appliesTo, ... - validate all properties - validate all scopes - ... validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema only compatibility
  7. 8 How it’s done (v2) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate Schema compliant validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema @bpmn-io/json-schema-validator ajv
  8. 9

  9. 10

  10. 11 How it’s done (v2) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate Schema compliant validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema @bpmn-io/json-schema-validator ajv
  11. 12 How it’s done (v2) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate Schema compliant validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema @bpmn-io/json-schema-validator ajv One Template at a time
  12. 13 How it’s done (v2) ElementTemplatesLoader#setTemplates Validator#_validateTemplates - validate Versioning

    - validate Compatibility - validate Schema compliant validTemplates errors bpmn-js-properties-panel @camunda/element-templates-json-schema @bpmn-io/json-schema-validator ajv One Template at a time
  13. 15 Why we chose it in the past • Customizable

    error messages • Configurable • Extendable • Community • Performance • Support the latest JSON Schema definition (we use draft-07) + features
  14. 17

  15. 21 Why we chose it in the past • Customizable

    error messages • Configurable • Extendable • Community • Performance • Support the latest JSON Schema definition (we use draft-07) + features Reminder
  16. 22 Why we chose it in the past • Customizable

    error messages • Configurable • Extendable • Community • Performance • Support the latest JSON Schema definition (we use draft-07) + features Reminder