-
Notifications
You must be signed in to change notification settings - Fork 197
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
Implement JSON Schema and Validator for C8 templates #561
Comments
During investigations to create a C8 template schema out of our existing schema the smartest way possible, I experimented with json-schema-ref-parser to make our schemas more composable. Rationale: The current JSON Schema is very huge (768 loc). If we want to prevent us from even extending this to apply C8 element templates, considering splitting the schema up in reasonable chunks could save us a lot of future efforts. I'll probably conduct a lightning talk for this topic ⚡ WIP branch: https://github.com/camunda/element-templates-json-schema/tree/561-c8-schema |
Kickoff results (14th Feb) Board: https://miro.com/app/board/uXjVOPpXIIc=/
|
Good to know :) |
Some reasoning about this point (since the discussion is not documented)
|
What should we do?
It should be possible to validate my C8 templates against a JSON schema, as we already do with C7 (cf. https://github.com/camunda/element-templates-json-schema + https://github.com/bpmn-io/element-templates-validator).
zeebe:taskDefinition
zeebe:taskHeader
zeebe:input
zeebe:output
groups
optional
for inputs and outputselement-templates-json-schema
to provide two packages@camunda/element-templates-json-schema@0.7.0/resources/schema.json
@camunda/zeebe-element-templates-json-schema@0.1.0/resources/schema.json
element-templates-validator
to also validate C8 templatescloud-element-templates
provider$schema
, throw if empty or malformed@camunda/zeebe-element-templates-json-schema
What we should consider here on top
platform
property? Via the existing$schema
property?element-templates-validator
or shall it be agnostic?Miro board for conceptual work: https://miro.com/app/board/uXjVOPpXIIc=/
Why should we do it?
A proper JSON Schema validation helps a lot to build + consume valid templates.
Child of camunda/camunda-modeler#2640
The text was updated successfully, but these errors were encountered: