Skip to content

Commit af0e8bb

Browse files
philippfrommebarmac
authored andcommitted
feat: restructure binding type requirements
1 parent 84f804d commit af0e8bb

13 files changed

+314
-321
lines changed

packages/zeebe-element-templates-json-schema/src/defs/template.json

Lines changed: 29 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,34 @@
213213
}
214214
}
215215
}
216+
],
217+
"properties": {
218+
"properties": {
219+
"contains": {
220+
"properties": {
221+
"binding": {
222+
"properties": {
223+
"type": {
224+
"const": "zeebe:calledElement"
225+
},
226+
"property": {
227+
"const": "processId"
228+
}
229+
},
230+
"required": [
231+
"property",
232+
"type"
233+
]
234+
}
235+
},
236+
"required": [
237+
"binding"
238+
]
239+
}
240+
}
241+
},
242+
"required": [
243+
"properties"
216244
]
217245
}
218246
},
@@ -600,250 +628,7 @@
600628
}
601629
},
602630
{
603-
"if": {
604-
"properties": {
605-
"properties": {
606-
"contains": {
607-
"properties": {
608-
"binding": {
609-
"properties": {
610-
"property": {
611-
"const": "bindingType"
612-
},
613-
"type": {
614-
"enum": [
615-
"zeebe:calledDecision",
616-
"zeebe:formDefinition",
617-
"zeebe:calledElement"
618-
]
619-
}
620-
},
621-
"required": [
622-
"property",
623-
"type"
624-
]
625-
},
626-
"value": {
627-
"const": "versionTag"
628-
}
629-
},
630-
"required": [
631-
"binding",
632-
"value"
633-
]
634-
}
635-
}
636-
},
637-
"required": [
638-
"properties"
639-
]
640-
},
641-
"then": {
642-
"properties": {
643-
"properties": {
644-
"contains": {
645-
"properties": {
646-
"binding": {
647-
"properties": {
648-
"type": {
649-
"enum": [
650-
"zeebe:calledDecision",
651-
"zeebe:formDefinition",
652-
"zeebe:calledElement"
653-
]
654-
},
655-
"property": {
656-
"const": "versionTag"
657-
}
658-
},
659-
"required": [
660-
"property",
661-
"type"
662-
]
663-
}
664-
},
665-
"required": [
666-
"binding"
667-
]
668-
}
669-
}
670-
},
671-
"required": [
672-
"properties"
673-
]
674-
}
675-
},
676-
{
677-
"if": {
678-
"properties": {
679-
"properties": {
680-
"contains": {
681-
"properties": {
682-
"binding": {
683-
"properties": {
684-
"property": {
685-
"const": "versionTag"
686-
}
687-
},
688-
"required": [
689-
"property"
690-
]
691-
}
692-
},
693-
"required": ["binding"],
694-
"not": {
695-
"required": [
696-
"condition"
697-
]
698-
}
699-
}
700-
}
701-
},
702-
"required": ["properties"]
703-
},
704-
"then": {
705-
"properties": {
706-
"properties": {
707-
"contains": {
708-
"properties": {
709-
"binding": {
710-
"properties": {
711-
"property": {
712-
"const": "bindingType"
713-
}
714-
},
715-
"required": ["property"]
716-
},
717-
"value": {
718-
"const": "versionTag"
719-
}
720-
},
721-
"required": ["binding", "value"]
722-
}
723-
}
724-
},
725-
"required": ["properties"]
726-
}
727-
},
728-
{
729-
"if": {
730-
"properties": {
731-
"properties": {
732-
"contains": {
733-
"properties": {
734-
"binding": {
735-
"properties": {
736-
"property": {
737-
"const": "bindingType"
738-
},
739-
"type": {
740-
"const": "zeebe:formDefinition"
741-
}
742-
},
743-
"required": [
744-
"property",
745-
"type"
746-
]
747-
}
748-
},
749-
"required": [
750-
"binding"
751-
]
752-
}
753-
}
754-
},
755-
"required": [
756-
"properties"
757-
]
758-
},
759-
"then": {
760-
"properties": {
761-
"properties": {
762-
"contains": {
763-
"properties": {
764-
"binding": {
765-
"properties": {
766-
"type": {
767-
"const": "zeebe:formDefinition"
768-
},
769-
"property": {
770-
"const": "formId"
771-
}
772-
},
773-
"required": [
774-
"property",
775-
"type"
776-
]
777-
}
778-
},
779-
"required": [
780-
"binding"
781-
]
782-
}
783-
}
784-
},
785-
"required": [
786-
"properties"
787-
]
788-
}
789-
},
790-
{
791-
"if": {
792-
"properties": {
793-
"properties": {
794-
"contains": {
795-
"properties": {
796-
"binding": {
797-
"properties": {
798-
"type": {
799-
"const": "zeebe:calledElement"
800-
}
801-
},
802-
"required": [
803-
"type"
804-
]
805-
}
806-
},
807-
"required": [
808-
"binding"
809-
]
810-
}
811-
}
812-
},
813-
"required": [
814-
"properties"
815-
]
816-
},
817-
"then": {
818-
"properties": {
819-
"properties": {
820-
"contains": {
821-
"properties": {
822-
"binding": {
823-
"properties": {
824-
"type": {
825-
"const": "zeebe:calledElement"
826-
},
827-
"property": {
828-
"const": "processId"
829-
}
830-
},
831-
"required": [
832-
"property",
833-
"type"
834-
]
835-
}
836-
},
837-
"required": [
838-
"binding"
839-
]
840-
}
841-
}
842-
},
843-
"required": [
844-
"properties"
845-
]
846-
}
631+
"$ref": "./template/bindingType.json"
847632
},
848633
{
849634
"if": {

0 commit comments

Comments
 (0)