diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 7b48f442534..a3cd94b2fc9 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -2696,6 +2696,240 @@ "fileMatch": ["envilder.json", "envilder.*.json"], "url": "https://envilder.com/schema/map-file.v1.json" }, + { + "name": "Enonic XP API descriptor", + "description": "YAML descriptor for Enonic XP Universal and Harmonized APIs", + "fileMatch": [ + "**/src/main/resources/apis/*/*.yaml", + "**/src/main/resources/apis/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-api-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-api-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-api-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Admin Extension descriptor", + "description": "YAML descriptor for Enonic XP Admin Extensions", + "fileMatch": [ + "**/src/main/resources/admins/extensions/*/*.yaml", + "**/src/main/resources/admins/extensions/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-admin-extension-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-admin-extension-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-admin-extension-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Admin Tool descriptor", + "description": "YAML descriptor for Enonic XP Admin Tools", + "fileMatch": [ + "**/src/main/resources/admin/tools/*/*.yaml", + "**/src/main/resources/admin/tools/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-admin-tool-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-admin-tool-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-admin-tool-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Application descriptor", + "description": "YAML descriptor for Enonic XP Applications", + "fileMatch": [ + "**/src/main/resources/application.yaml", + "**/src/main/resources/application.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-application-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-application-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-application-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP CMS descriptor", + "description": "YAML descriptor for Enonic XP CMS configuration", + "fileMatch": [ + "**/src/main/resources/cms/cms.yaml", + "**/src/main/resources/cms/cms.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-cms-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-cms-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-cms-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Content Type descriptor", + "description": "YAML descriptor for Enonic XP Content Types", + "fileMatch": [ + "**/src/main/resources/cms/content-types/*/*.yaml", + "**/src/main/resources/cms/content-types/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-content-type-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-content-type-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-content-type-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Form Fragment descriptor", + "description": "YAML descriptor for Enonic XP Form Fragments", + "fileMatch": [ + "**/src/main/resources/cms/form-fragments/*/*.yaml", + "**/src/main/resources/cms/form-fragments/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-form-fragment-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-form-fragment-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-form-fragment-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP ID Provider descriptor", + "description": "YAML descriptor for Enonic XP ID Providers", + "fileMatch": [ + "**/src/main/resources/idprovider/idprovider.yaml", + "**/src/main/resources/idprovider/idprovider.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-idprovider-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-idprovider-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-idprovider-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Layout descriptor", + "description": "YAML descriptor for Enonic XP Layouts", + "fileMatch": [ + "**/src/main/resources/cms/layouts/*/*.yaml", + "**/src/main/resources/cms/layouts/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-layout-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-layout-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-layout-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Macro descriptor", + "description": "YAML descriptor for Enonic XP Macros", + "fileMatch": [ + "**/src/main/resources/cms/macros/*/*.yaml", + "**/src/main/resources/cms/macros/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-macro-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-macro-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-macro-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Mixin descriptor", + "description": "YAML descriptor for Enonic XP Mixins", + "fileMatch": [ + "**/src/main/resources/cms/mixins/*/*.yaml", + "**/src/main/resources/cms/mixins/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-mixin-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-mixin-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-mixin-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Page descriptor", + "description": "YAML descriptor for Enonic XP Pages", + "fileMatch": [ + "**/src/main/resources/cms/pages/*/*.yaml", + "**/src/main/resources/cms/pages/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-page-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-page-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-page-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Part descriptor", + "description": "YAML descriptor for Enonic XP Parts", + "fileMatch": [ + "**/src/main/resources/cms/parts/*/*.yaml", + "**/src/main/resources/cms/parts/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-part-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-part-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-part-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Service descriptor", + "description": "YAML descriptor for Enonic XP Services", + "fileMatch": [ + "**/src/main/resources/services/*/*.yaml", + "**/src/main/resources/services/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-service-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-service-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-service-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Site descriptor", + "description": "YAML descriptor for Enonic XP Sites", + "fileMatch": [ + "**/src/main/resources/cms/site.yaml", + "**/src/main/resources/cms/site.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-site-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-site-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-site-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Style descriptor", + "description": "YAML descriptor for Enonic XP Styles", + "fileMatch": [ + "**/src/main/resources/cms/style/style.yaml", + "**/src/main/resources/cms/style/style.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-style-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-style-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-style-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Task descriptor", + "description": "YAML descriptor for Enonic XP Tasks", + "fileMatch": [ + "**/src/main/resources/tasks/*/*.yaml", + "**/src/main/resources/tasks/*/*.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-task-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-task-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-task-8.0.0-B4.json" + } + }, + { + "name": "Enonic XP Webapp descriptor", + "description": "YAML descriptor for Enonic XP Webapps", + "fileMatch": [ + "**/src/main/resources/webapp/webapp.yaml", + "**/src/main/resources/webapp/webapp.yml" + ], + "url": "https://www.schemastore.org/enonic-xp-webapp-8.0.0-B4.json", + "versions": { + "latest": "https://www.schemastore.org/enonic-xp-webapp-8.0.0-B4.json", + "8.0.0-B4": "https://www.schemastore.org/enonic-xp-webapp-8.0.0-B4.json" + } + }, { "name": ".esmrc.json", "description": "Configuration files for the esm module/package in Node.js", diff --git a/src/negative_test/enonic-xp-admin-extension-8.0.0-B4/invalid-admin-extension-descriptor.yaml b/src/negative_test/enonic-xp-admin-extension-8.0.0-B4/invalid-admin-extension-descriptor.yaml new file mode 100644 index 00000000000..8e27970bfc8 --- /dev/null +++ b/src/negative_test/enonic-xp-admin-extension-8.0.0-B4/invalid-admin-extension-descriptor.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-admin-extension-8.0.0-B4.json +kind: 'AdminExtension' +title: 'Invalid Extension' +unknownProp: 'value' diff --git a/src/negative_test/enonic-xp-admin-tool-8.0.0-B4/invalid-admin-tool-descriptor.yaml b/src/negative_test/enonic-xp-admin-tool-8.0.0-B4/invalid-admin-tool-descriptor.yaml new file mode 100644 index 00000000000..8021d91dd4f --- /dev/null +++ b/src/negative_test/enonic-xp-admin-tool-8.0.0-B4/invalid-admin-tool-descriptor.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-admin-tool-8.0.0-B4.json +kind: 'AdminTool' +title: 'My Admin Tool' +unknownProp: 'value' diff --git a/src/negative_test/enonic-xp-api-8.0.0-B4/invalid-api-descriptor.yml b/src/negative_test/enonic-xp-api-8.0.0-B4/invalid-api-descriptor.yml new file mode 100644 index 00000000000..69cb71e3c12 --- /dev/null +++ b/src/negative_test/enonic-xp-api-8.0.0-B4/invalid-api-descriptor.yml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-api-8.0.0-B4.json +kind: 'API' +title: 'My API' +mount: + - 'unknown-mount' diff --git a/src/negative_test/enonic-xp-application-8.0.0-B4/invalid-application-descriptor.yaml b/src/negative_test/enonic-xp-application-8.0.0-B4/invalid-application-descriptor.yaml new file mode 100644 index 00000000000..76ce51487ad --- /dev/null +++ b/src/negative_test/enonic-xp-application-8.0.0-B4/invalid-application-descriptor.yaml @@ -0,0 +1,3 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-application-8.0.0-B4.json +kind: 'Application' +description: 123 diff --git a/src/negative_test/enonic-xp-cms-8.0.0-B4/invalid-cms-descriptor.yaml b/src/negative_test/enonic-xp-cms-8.0.0-B4/invalid-cms-descriptor.yaml new file mode 100644 index 00000000000..7fd9a4aa1c7 --- /dev/null +++ b/src/negative_test/enonic-xp-cms-8.0.0-B4/invalid-cms-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-cms-8.0.0-B4.json +kind: 'CMS' +form: + - type: 'TextLine' + name: 'myField' diff --git a/src/negative_test/enonic-xp-content-type-8.0.0-B4/invalid-content-type-descriptor.yaml b/src/negative_test/enonic-xp-content-type-8.0.0-B4/invalid-content-type-descriptor.yaml new file mode 100644 index 00000000000..41ca6b58929 --- /dev/null +++ b/src/negative_test/enonic-xp-content-type-8.0.0-B4/invalid-content-type-descriptor.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-content-type-8.0.0-B4.json +kind: 'ContentType' +title: 'Invalid Content type' +form: + - type: 'TextLine' + label: 'Title' diff --git a/src/negative_test/enonic-xp-form-fragment-8.0.0-B4/invalid-form-fragment-descriptor.yaml b/src/negative_test/enonic-xp-form-fragment-8.0.0-B4/invalid-form-fragment-descriptor.yaml new file mode 100644 index 00000000000..41da62074d5 --- /dev/null +++ b/src/negative_test/enonic-xp-form-fragment-8.0.0-B4/invalid-form-fragment-descriptor.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-form-fragment-8.0.0-B4.json +kind: 'FormFragment' +title: 'Invalid Form Fragment' +unknownProp: 'value' diff --git a/src/negative_test/enonic-xp-idprovider-8.0.0-B4/invalid-idprovider-descriptor.yaml b/src/negative_test/enonic-xp-idprovider-8.0.0-B4/invalid-idprovider-descriptor.yaml new file mode 100644 index 00000000000..f0d60e963ed --- /dev/null +++ b/src/negative_test/enonic-xp-idprovider-8.0.0-B4/invalid-idprovider-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-idprovider-8.0.0-B4.json +kind: 'IdProvider' +form: + - type: 'FormFragment' + name: 'myFragment' diff --git a/src/negative_test/enonic-xp-layout-8.0.0-B4/invalid-layout-descriptor.yaml b/src/negative_test/enonic-xp-layout-8.0.0-B4/invalid-layout-descriptor.yaml new file mode 100644 index 00000000000..a2718e6e775 --- /dev/null +++ b/src/negative_test/enonic-xp-layout-8.0.0-B4/invalid-layout-descriptor.yaml @@ -0,0 +1,3 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-layout-8.0.0-B4.json +kind: 'Layout' +title: 'Invalid Layout' diff --git a/src/negative_test/enonic-xp-macro-8.0.0-B4/invalid-macro-descriptor.yaml b/src/negative_test/enonic-xp-macro-8.0.0-B4/invalid-macro-descriptor.yaml new file mode 100644 index 00000000000..8825c49d9bc --- /dev/null +++ b/src/negative_test/enonic-xp-macro-8.0.0-B4/invalid-macro-descriptor.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-macro-8.0.0-B4.json +kind: 'Macro' +title: 'Invalid macro' +form: + - type: 'FormFragment' + name: 'myFragment' diff --git a/src/negative_test/enonic-xp-mixin-8.0.0-B4/invalid-mixin-descriptor.yaml b/src/negative_test/enonic-xp-mixin-8.0.0-B4/invalid-mixin-descriptor.yaml new file mode 100644 index 00000000000..8ce2cf1a7bb --- /dev/null +++ b/src/negative_test/enonic-xp-mixin-8.0.0-B4/invalid-mixin-descriptor.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-mixin-8.0.0-B4.json +kind: 'Mixin' +title: 'My Mixin' +form: + - type: 'TextLine' + name: 'myField' diff --git a/src/negative_test/enonic-xp-page-8.0.0-B4/invalid-page-descriptor.yaml b/src/negative_test/enonic-xp-page-8.0.0-B4/invalid-page-descriptor.yaml new file mode 100644 index 00000000000..36647ab0771 --- /dev/null +++ b/src/negative_test/enonic-xp-page-8.0.0-B4/invalid-page-descriptor.yaml @@ -0,0 +1,3 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-page-8.0.0-B4.json +kind: 'Page' +title: 'My Page' diff --git a/src/negative_test/enonic-xp-part-8.0.0-B4/invalid-part-descriptor.yaml b/src/negative_test/enonic-xp-part-8.0.0-B4/invalid-part-descriptor.yaml new file mode 100644 index 00000000000..a2923f75656 --- /dev/null +++ b/src/negative_test/enonic-xp-part-8.0.0-B4/invalid-part-descriptor.yaml @@ -0,0 +1,4 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-part-8.0.0-B4.json +kind: 'Part' +title: 'My Part' +unknownProp: 'value' diff --git a/src/negative_test/enonic-xp-service-8.0.0-B4/invalid-service-descriptor.yaml b/src/negative_test/enonic-xp-service-8.0.0-B4/invalid-service-descriptor.yaml new file mode 100644 index 00000000000..adafc10b5cb --- /dev/null +++ b/src/negative_test/enonic-xp-service-8.0.0-B4/invalid-service-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-service-8.0.0-B4.json +kind: 'Service' +title: 'My Service' +allow: + - 123 diff --git a/src/negative_test/enonic-xp-site-8.0.0-B4/invalid-site-descriptor.yaml b/src/negative_test/enonic-xp-site-8.0.0-B4/invalid-site-descriptor.yaml new file mode 100644 index 00000000000..2ec885775c8 --- /dev/null +++ b/src/negative_test/enonic-xp-site-8.0.0-B4/invalid-site-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-site-8.0.0-B4.json +kind: 'Site' +mappings: + - pattern: '/path/*' + match: "_path like '/path/*'" diff --git a/src/negative_test/enonic-xp-style-8.0.0-B4/invalid-style-descriptor.yaml b/src/negative_test/enonic-xp-style-8.0.0-B4/invalid-style-descriptor.yaml new file mode 100644 index 00000000000..13fe8190c47 --- /dev/null +++ b/src/negative_test/enonic-xp-style-8.0.0-B4/invalid-style-descriptor.yaml @@ -0,0 +1,3 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-style-8.0.0-B4.json +kind: 'Style' +unknownProp: 'value' diff --git a/src/negative_test/enonic-xp-task-8.0.0-B4/invalid-task-descriptor.yaml b/src/negative_test/enonic-xp-task-8.0.0-B4/invalid-task-descriptor.yaml new file mode 100644 index 00000000000..b93b62f01e2 --- /dev/null +++ b/src/negative_test/enonic-xp-task-8.0.0-B4/invalid-task-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-task-8.0.0-B4.json +kind: 'Task' +form: + - type: 'FormFragment' + name: 'myFragment' diff --git a/src/negative_test/enonic-xp-webapp-8.0.0-B4/invalid-webapp-descriptor.yaml b/src/negative_test/enonic-xp-webapp-8.0.0-B4/invalid-webapp-descriptor.yaml new file mode 100644 index 00000000000..cf702914541 --- /dev/null +++ b/src/negative_test/enonic-xp-webapp-8.0.0-B4/invalid-webapp-descriptor.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-webapp-8.0.0-B4.json +kind: 'WebApp' +description: + text: 'My WebApp' + i18n: 'webapps.mywebapp.description' +unknownProp: 'value' diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 2f776b1a7d0..2c82b9431fb 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -72,6 +72,24 @@ "dotnetcli.host.json", "drone.json", "drupal-recipe.json", + "enonic-xp-admin-extension-8.0.0-B4.json", + "enonic-xp-admin-tool-8.0.0-B4.json", + "enonic-xp-api-8.0.0-B4.json", + "enonic-xp-application-8.0.0-B4.json", + "enonic-xp-cms-8.0.0-B4.json", + "enonic-xp-content-type-8.0.0-B4.json", + "enonic-xp-form-fragment-8.0.0-B4.json", + "enonic-xp-idprovider-8.0.0-B4.json", + "enonic-xp-layout-8.0.0-B4.json", + "enonic-xp-macro-8.0.0-B4.json", + "enonic-xp-mixin-8.0.0-B4.json", + "enonic-xp-page-8.0.0-B4.json", + "enonic-xp-part-8.0.0-B4.json", + "enonic-xp-service-8.0.0-B4.json", + "enonic-xp-site-8.0.0-B4.json", + "enonic-xp-style-8.0.0-B4.json", + "enonic-xp-task-8.0.0-B4.json", + "enonic-xp-webapp-8.0.0-B4.json", "electron-builder.json", "eslintrc.json", "esmrc.json", @@ -316,7 +334,25 @@ "zarf.json", "yamllint.json", "vector.json", - "scarb.json" + "scarb.json", + "enonic-xp-admin-extension-8.0.0-B4.json", + "enonic-xp-admin-tool-8.0.0-B4.json", + "enonic-xp-api-8.0.0-B4.json", + "enonic-xp-application-8.0.0-B4.json", + "enonic-xp-cms-8.0.0-B4.json", + "enonic-xp-content-type-8.0.0-B4.json", + "enonic-xp-form-fragment-8.0.0-B4.json", + "enonic-xp-idprovider-8.0.0-B4.json", + "enonic-xp-layout-8.0.0-B4.json", + "enonic-xp-macro-8.0.0-B4.json", + "enonic-xp-mixin-8.0.0-B4.json", + "enonic-xp-page-8.0.0-B4.json", + "enonic-xp-part-8.0.0-B4.json", + "enonic-xp-service-8.0.0-B4.json", + "enonic-xp-site-8.0.0-B4.json", + "enonic-xp-style-8.0.0-B4.json", + "enonic-xp-task-8.0.0-B4.json", + "enonic-xp-webapp-8.0.0-B4.json" ], "missingCatalogUrl": [ // Below this line are subschemas that are included from other schema diff --git a/src/schemas/json/enonic-xp-admin-extension-8.0.0-B4.json b/src/schemas/json/enonic-xp-admin-extension-8.0.0-B4.json new file mode 100644 index 00000000000..59afaecd534 --- /dev/null +++ b/src/schemas/json/enonic-xp-admin-extension-8.0.0-B4.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-admin-extension-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Admin Extensions.\nhttps://developer.enonic.com/docs/code/stable/extensions", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "AdminExtension" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "allow": { + "type": "array", + "items": { + "type": "string" + } + }, + "interfaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-admin-tool-8.0.0-B4.json b/src/schemas/json/enonic-xp-admin-tool-8.0.0-B4.json new file mode 100644 index 00000000000..5ba05d03130 --- /dev/null +++ b/src/schemas/json/enonic-xp-admin-tool-8.0.0-B4.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-admin-tool-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Admin Tools.\nhttps://developer.enonic.com/docs/code/stable/tools", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "AdminTool" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "allow": { + "type": "array", + "items": { + "type": "string" + } + }, + "apis": { + "type": "array", + "items": { + "type": "string" + } + }, + "interfaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-api-8.0.0-B4.json b/src/schemas/json/enonic-xp-api-8.0.0-B4.json new file mode 100644 index 00000000000..f12d5847c7c --- /dev/null +++ b/src/schemas/json/enonic-xp-api-8.0.0-B4.json @@ -0,0 +1,70 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-api-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Universal and Harmonized APIs.\nhttps://developer.enonic.com/docs/code/stable/apis", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "API" + }, + "allow": { + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "documentationUrl": { + "type": "string" + }, + "mount": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "enum": ["web", "management"] + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-application-8.0.0-B4.json b/src/schemas/json/enonic-xp-application-8.0.0-B4.json new file mode 100644 index 00000000000..37c8b25515e --- /dev/null +++ b/src/schemas/json/enonic-xp-application-8.0.0-B4.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-application-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Applications.\nhttps://developer.enonic.com/docs/code/stable/fundamentals/apps", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Application" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "vendorName": { + "type": "string" + }, + "vendorUrl": { + "type": "string" + }, + "url": { + "type": "string" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-cms-8.0.0-B4.json b/src/schemas/json/enonic-xp-cms-8.0.0-B4.json new file mode 100644 index 00000000000..7f15ec13b7d --- /dev/null +++ b/src/schemas/json/enonic-xp-cms-8.0.0-B4.json @@ -0,0 +1,1069 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-cms-8.0.0-B4.json", + "$defs": { + "mixinMapping": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "allowContentTypes": { + "type": "string" + }, + "optional": { + "type": "boolean" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP CMS configuration.\nhttps://developer.enonic.com/docs/code/stable/schemas", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "CMS" + }, + "mixins": { + "type": "array", + "items": { + "$ref": "#/$defs/mixinMapping" + } + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-content-type-8.0.0-B4.json b/src/schemas/json/enonic-xp-content-type-8.0.0-B4.json new file mode 100644 index 00000000000..c045511f9a6 --- /dev/null +++ b/src/schemas/json/enonic-xp-content-type-8.0.0-B4.json @@ -0,0 +1,1080 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-content-type-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Content Types.\nhttps://developer.enonic.com/docs/cms/stable/content/content-types", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "ContentType" + }, + "superType": { + "type": "string" + }, + "abstract": { + "type": "boolean" + }, + "final": { + "type": "boolean" + }, + "allowChildContent": { + "type": "boolean" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "allowChildContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "displayNamePlaceholder": { + "$ref": "#/$defs/localizedTextDef" + }, + "displayNameExpression": { + "type": "string" + }, + "displayNameListExpression": { + "type": "string" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "additionalProperties": false, + "required": ["kind", "title"] +} diff --git a/src/schemas/json/enonic-xp-form-fragment-8.0.0-B4.json b/src/schemas/json/enonic-xp-form-fragment-8.0.0-B4.json new file mode 100644 index 00000000000..84fb0bb2f70 --- /dev/null +++ b/src/schemas/json/enonic-xp-form-fragment-8.0.0-B4.json @@ -0,0 +1,1050 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-form-fragment-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Form Fragments.\nhttps://developer.enonic.com/docs/cms/stable/schemas/form-fragments", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "FormFragment" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + } + }, + "required": ["kind", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-idprovider-8.0.0-B4.json b/src/schemas/json/enonic-xp-idprovider-8.0.0-B4.json new file mode 100644 index 00000000000..dccb5a09417 --- /dev/null +++ b/src/schemas/json/enonic-xp-idprovider-8.0.0-B4.json @@ -0,0 +1,1012 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-idprovider-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP ID Providers.\nhttps://developer.enonic.com/docs/code/stable/http/id-providers", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "IdProvider" + }, + "mode": { + "type": "string", + "enum": ["LOCAL", "EXTERNAL", "MIXED"] + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "additionalProperties": false, + "required": ["kind"] +} diff --git a/src/schemas/json/enonic-xp-layout-8.0.0-B4.json b/src/schemas/json/enonic-xp-layout-8.0.0-B4.json new file mode 100644 index 00000000000..97ad96e4f04 --- /dev/null +++ b/src/schemas/json/enonic-xp-layout-8.0.0-B4.json @@ -0,0 +1,1060 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-layout-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Layouts.\nhttps://developer.enonic.com/docs/cms/stable/pages/parts#layouts", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Layout" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "regions": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "regions", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-macro-8.0.0-B4.json b/src/schemas/json/enonic-xp-macro-8.0.0-B4.json new file mode 100644 index 00000000000..a1ba9a0ec19 --- /dev/null +++ b/src/schemas/json/enonic-xp-macro-8.0.0-B4.json @@ -0,0 +1,904 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-macro-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + } + }, + "description": "YAML descriptor for Enonic XP Macros.\nhttps://developer.enonic.com/docs/cms/stable/richtext/macros", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Macro" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-mixin-8.0.0-B4.json b/src/schemas/json/enonic-xp-mixin-8.0.0-B4.json new file mode 100644 index 00000000000..0c571adf818 --- /dev/null +++ b/src/schemas/json/enonic-xp-mixin-8.0.0-B4.json @@ -0,0 +1,1053 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-mixin-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Mixins.\nhttps://developer.enonic.com/docs/cms/stable/content/mixins", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Mixin" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-page-8.0.0-B4.json b/src/schemas/json/enonic-xp-page-8.0.0-B4.json new file mode 100644 index 00000000000..87b0bb00cc8 --- /dev/null +++ b/src/schemas/json/enonic-xp-page-8.0.0-B4.json @@ -0,0 +1,1060 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-page-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Pages.\nhttps://developer.enonic.com/docs/cms/stable/pages/page", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Page" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "regions": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "regions", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-part-8.0.0-B4.json b/src/schemas/json/enonic-xp-part-8.0.0-B4.json new file mode 100644 index 00000000000..6bc9d1fa518 --- /dev/null +++ b/src/schemas/json/enonic-xp-part-8.0.0-B4.json @@ -0,0 +1,1053 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-part-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "formFragmentDef": { + "type": "object", + "properties": { + "include": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "FormFragment" + } + }, + "oneOf": [ + { + "required": ["include"], + "not": { + "anyOf": [ + { + "required": ["name"] + }, + { + "required": ["type"] + } + ] + } + }, + { + "required": ["type", "name"], + "not": { + "required": ["include"] + } + } + ], + "unevaluatedProperties": false + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/formFragmentDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Parts.\nhttps://developer.enonic.com/docs/cms/stable/pages/parts", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Part" + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind", "title"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-service-8.0.0-B4.json b/src/schemas/json/enonic-xp-service-8.0.0-B4.json new file mode 100644 index 00000000000..46706893956 --- /dev/null +++ b/src/schemas/json/enonic-xp-service-8.0.0-B4.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-service-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + } + }, + "description": "YAML descriptor for Enonic XP Services.\nhttps://developer.enonic.com/docs/code/stable/http", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Service" + }, + "allow": { + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-site-8.0.0-B4.json b/src/schemas/json/enonic-xp-site-8.0.0-B4.json new file mode 100644 index 00000000000..03720914910 --- /dev/null +++ b/src/schemas/json/enonic-xp-site-8.0.0-B4.json @@ -0,0 +1,110 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-site-8.0.0-B4.json", + "$defs": { + "processor": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "order": { + "type": "integer" + } + }, + "required": ["name"], + "additionalProperties": false + }, + "controllerMapping": { + "type": "object", + "properties": { + "service": { + "type": "string" + }, + "controller": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "invertPattern": { + "type": "boolean" + }, + "match": { + "type": "string" + }, + "order": { + "type": "integer" + } + }, + "allOf": [ + { + "oneOf": [ + { + "required": ["controller"] + }, + { + "required": ["filter"] + } + ] + }, + { + "not": { + "required": ["controller", "filter"] + } + }, + { + "if": { + "required": ["invertPattern"] + }, + "then": { + "required": ["pattern"] + } + } + ], + "additionalProperties": false + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Sites.\nhttps://developer.enonic.com/docs/code/stable/sites", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Site" + }, + "processors": { + "type": "array", + "items": { + "$ref": "#/$defs/processor" + } + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/$defs/controllerMapping" + } + }, + "apis": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/schemas/json/enonic-xp-style-8.0.0-B4.json b/src/schemas/json/enonic-xp-style-8.0.0-B4.json new file mode 100644 index 00000000000..a1c219a627e --- /dev/null +++ b/src/schemas/json/enonic-xp-style-8.0.0-B4.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-style-8.0.0-B4.json", + "$defs": { + "styleItemDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "editor": { + "$ref": "#/$defs/editorDef" + } + }, + "required": ["name", "type"] + }, + "imageStyleDef": { + "allOf": [ + { + "$ref": "#/$defs/styleItemDef" + } + ], + "properties": { + "type": { + "type": "string", + "const": "Image" + }, + "filter": { + "type": "string" + }, + "aspectRatio": { + "type": "string" + } + }, + "unevaluatedProperties": false + }, + "editorDef": { + "type": "object", + "properties": { + "css": { + "type": "string" + } + }, + "additionalProperties": false + }, + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + } + }, + "description": "YAML descriptor for Enonic XP Styles.\nhttps://developer.enonic.com/docs/cms/stable/richtext/styles", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Style" + }, + "styles": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/$defs/imageStyleDef" + } + ] + } + } + }, + "additionalProperties": false, + "required": ["kind"] +} diff --git a/src/schemas/json/enonic-xp-task-8.0.0-B4.json b/src/schemas/json/enonic-xp-task-8.0.0-B4.json new file mode 100644 index 00000000000..e70b4b643f3 --- /dev/null +++ b/src/schemas/json/enonic-xp-task-8.0.0-B4.json @@ -0,0 +1,1011 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-task-8.0.0-B4.json", + "$defs": { + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + }, + "inputsDef": { + "oneOf": [ + { + "$ref": "#/$defs/textLineDef" + }, + { + "$ref": "#/$defs/textAreaDef" + }, + { + "$ref": "#/$defs/radioButtonDef" + }, + { + "$ref": "#/$defs/checkBoxDef" + }, + { + "$ref": "#/$defs/attachmentUploaderDef" + }, + { + "$ref": "#/$defs/comboBoxDef" + }, + { + "$ref": "#/$defs/contentSelectorDef" + }, + { + "$ref": "#/$defs/contentTypeFilterDef" + }, + { + "$ref": "#/$defs/customSelectorDef" + }, + { + "$ref": "#/$defs/dateDef" + }, + { + "$ref": "#/$defs/dateTimeDef" + }, + { + "$ref": "#/$defs/doubleDef" + }, + { + "$ref": "#/$defs/geoPointDef" + }, + { + "$ref": "#/$defs/htmlAreaDef" + }, + { + "$ref": "#/$defs/imageSelectorDef" + }, + { + "$ref": "#/$defs/instantDef" + }, + { + "$ref": "#/$defs/longDef" + }, + { + "$ref": "#/$defs/mediaSelectorDef" + }, + { + "$ref": "#/$defs/principalSelectorDef" + }, + { + "$ref": "#/$defs/tagDef" + }, + { + "$ref": "#/$defs/timeDef" + } + ] + }, + "fieldSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "FieldSet" + } + }, + "required": ["label"], + "additionalProperties": false + } + ] + }, + "itemSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + }, + "type": { + "const": "ItemSet" + } + }, + "required": ["name"], + "additionalProperties": false + } + ] + }, + "optionSetDef": { + "allOf": [ + { + "$ref": "#/$defs/formItemDef" + }, + { + "type": "object", + "properties": { + "type": { + "const": "OptionSet" + }, + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "expanded": { + "type": "boolean" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "options": { + "$ref": "#/$defs/optionSetOptionsDef" + }, + "selection": { + "$ref": "#/$defs/occurrencesDef" + } + }, + "required": ["name", "options"], + "additionalProperties": false + } + ] + }, + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "formItemsDef": { + "oneOf": [ + { + "$ref": "#/$defs/inputsDef" + }, + { + "$ref": "#/$defs/fieldSetDef" + }, + { + "$ref": "#/$defs/itemSetDef" + }, + { + "$ref": "#/$defs/optionSetDef" + } + ] + }, + "formDef": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + }, + "additionalProperties": false + }, + "textLineDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextLine" + }, + "maxLength": { + "type": "integer" + }, + "regexp": { + "type": "string" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "textAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "TextArea" + }, + "maxLength": { + "type": "integer" + }, + "showCounter": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "radioButtonDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "RadioButton" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + } + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "checkBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CheckBox" + }, + "alignment": { + "type": "string" + }, + "default": { + "type": "string", + "enum": ["checked", "unchecked"] + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "attachmentUploaderDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "AttachmentUploader" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "comboBoxDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ComboBox" + }, + "options": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + } + }, + "additionalProperties": false + } + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label", "options"], + "additionalProperties": false + }, + "contentSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "contentTypeFilterDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ContentTypeFilter" + }, + "context": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "customSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "CustomSelector" + }, + "service": { + "type": "string", + "deprecated": true, + "description": "Deprecated. Use 'extension' instead." + }, + "extension": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "galleryMode": { + "type": "boolean" + }, + "default": { + "type": "string" + } + }, + "oneOf": [ + { + "required": ["service"], + "not": { + "required": ["extension"] + } + }, + { + "required": ["extension"], + "not": { + "required": ["service"] + } + } + ], + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Date" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "dateTimeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "DateTime" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "doubleDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Double" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "default": { + "type": "number" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "geoPointDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "GeoPoint" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "htmlAreaDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "HtmlArea" + }, + "exclude": { + "type": "string" + }, + "include": { + "type": "string" + }, + "allowHeadings": { + "type": "string" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "imageSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "ImageSelector" + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "instantDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Instant" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "longDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Long" + }, + "max": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "min": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + }, + "default": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807 + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "mediaSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "MediaSelector" + }, + "allowContentType": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowPath": { + "type": "array", + "items": { + "type": "string" + } + }, + "treeMode": { + "type": "boolean" + }, + "hideToggleIcon": { + "type": "boolean" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "principalSelectorDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "PrincipalSelector" + }, + "principalType": { + "type": "string", + "enum": ["USER", "GROUP", "ROLE"] + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "tagDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Tag" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "timeDef": { + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "occurrences": { + "$ref": "#/$defs/occurrencesDef" + }, + "attributes": { + "$ref": "#/$defs/genericValueDef" + }, + "type": { + "const": "Time" + }, + "default": { + "type": "string" + } + }, + "required": ["type", "name", "label"], + "additionalProperties": false + }, + "occurrencesDef": { + "type": "object", + "properties": { + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + } + }, + "required": ["min", "max"], + "additionalProperties": false + }, + "formItemDef": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"] + }, + "optionSetOptionsDef": { + "type": "array", + "items": { + "$ref": "#/$defs/optionSetOptionDef" + } + }, + "optionSetOptionDef": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/$defs/localizedTextDef" + }, + "helpText": { + "$ref": "#/$defs/localizedTextDef" + }, + "selected": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/$defs/formItemsDef" + } + } + }, + "required": ["name", "label"], + "additionalProperties": false + } + }, + "description": "YAML descriptor for Enonic XP Tasks.\nhttps://developer.enonic.com/docs/code/stable/background/tasks", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "Task" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "form": { + "$ref": "#/$defs/formDef" + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "additionalProperties": false, + "required": ["kind"] +} diff --git a/src/schemas/json/enonic-xp-webapp-8.0.0-B4.json b/src/schemas/json/enonic-xp-webapp-8.0.0-B4.json new file mode 100644 index 00000000000..2900501c883 --- /dev/null +++ b/src/schemas/json/enonic-xp-webapp-8.0.0-B4.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://json.schemastore.org/enonic-xp-webapp-8.0.0-B4.json", + "$defs": { + "localizedTextDef": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "text": { + "type": "string" + }, + "i18n": { + "type": "string" + } + }, + "required": ["text"], + "additionalProperties": false + } + ] + }, + "genericValueDef": { + "type": "object", + "additionalProperties": { + "not": { + "type": "null" + } + } + } + }, + "description": "YAML descriptor for Enonic XP Webapps.\nhttps://developer.enonic.com/docs/code/stable/webapps", + "type": "object", + "properties": { + "kind": { + "type": "string", + "const": "WebApp" + }, + "description": { + "$ref": "#/$defs/localizedTextDef" + }, + "apis": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "$ref": "#/$defs/genericValueDef" + } + }, + "required": ["kind"], + "additionalProperties": false +} diff --git a/src/test/enonic-xp-admin-extension-8.0.0-B4/admin-extension-descriptor.yaml b/src/test/enonic-xp-admin-extension-8.0.0-B4/admin-extension-descriptor.yaml new file mode 100644 index 00000000000..a3b22fcd921 --- /dev/null +++ b/src/test/enonic-xp-admin-extension-8.0.0-B4/admin-extension-descriptor.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-admin-extension-8.0.0-B4.json +kind: 'AdminExtension' +title: 'My Extension' +description: 'MyExtension description' +allow: + - 'role:system.user.admin' +interfaces: + - 'com.enonic.xp.my-interface' diff --git a/src/test/enonic-xp-admin-tool-8.0.0-B4/admin-tool-descriptor.yaml b/src/test/enonic-xp-admin-tool-8.0.0-B4/admin-tool-descriptor.yaml new file mode 100644 index 00000000000..1f4e332ff96 --- /dev/null +++ b/src/test/enonic-xp-admin-tool-8.0.0-B4/admin-tool-descriptor.yaml @@ -0,0 +1,18 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-admin-tool-8.0.0-B4.json +kind: 'AdminTool' +title: 'My Admin Tool' +description: + text: 'Admin Tool Description' + i18n: 'admin.description' +allow: + - 'role:system.admin' +apis: + - 'myapp:api' +interfaces: + - 'com.example.interface' +config: + property_1: 'value_1' + property_2: 'value_2' + property_3: + property_31: 'value-31' + property_32: 123 diff --git a/src/test/enonic-xp-api-8.0.0-B4/api-descriptor.yaml b/src/test/enonic-xp-api-8.0.0-B4/api-descriptor.yaml new file mode 100644 index 00000000000..a68a95c0162 --- /dev/null +++ b/src/test/enonic-xp-api-8.0.0-B4/api-descriptor.yaml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-api-8.0.0-B4.json +kind: 'API' +title: 'GraphQL API' +description: 'Description of GraphQL API' +mount: + - 'web' +allow: + - 'role:system.roleId_1' + - 'role:system.roleId_2' +documentationUrl: 'https://docs.mygraphqlapi.com' +config: + property_1: 'value_1' + property_2: 'value_2' diff --git a/src/test/enonic-xp-application-8.0.0-B4/application-descriptor.yaml b/src/test/enonic-xp-application-8.0.0-B4/application-descriptor.yaml new file mode 100644 index 00000000000..a8abdc4112c --- /dev/null +++ b/src/test/enonic-xp-application-8.0.0-B4/application-descriptor.yaml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-application-8.0.0-B4.json +kind: 'Application' +description: 'My Application' +title: 'Title' +vendorName: 'Vendor Name' +vendorUrl: 'https://vendorname.com' +url: 'appUrl' +config: + p1: 1 + p2: 'string' + p3: + p31: 'p3v31' + p32: true diff --git a/src/test/enonic-xp-cms-8.0.0-B4/cms-descriptor.yaml b/src/test/enonic-xp-cms-8.0.0-B4/cms-descriptor.yaml new file mode 100644 index 00000000000..d50a93544c0 --- /dev/null +++ b/src/test/enonic-xp-cms-8.0.0-B4/cms-descriptor.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-cms-8.0.0-B4.json +kind: 'CMS' +config: + property_1: 'value_1' + property_2: 'value_2' + +mixins: + - name: 'all-except-folders' + allowContentTypes: '^(?!base:folder$).*' + optional: true + - name: 'folders-only' + allowContentTypes: 'base:folder' + optional: false + +form: + - type: 'RadioButton' + name: 'backgroundColor' + label: 'Page background' + options: + - value: 'white' + label: 'White' + - value: 'grey' + label: 'Grey' + default: 'white' diff --git a/src/test/enonic-xp-content-type-8.0.0-B4/content-type-descriptor.yaml b/src/test/enonic-xp-content-type-8.0.0-B4/content-type-descriptor.yaml new file mode 100644 index 00000000000..54497a464de --- /dev/null +++ b/src/test/enonic-xp-content-type-8.0.0-B4/content-type-descriptor.yaml @@ -0,0 +1,17 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-content-type-8.0.0-B4.json +kind: 'ContentType' +superType: 'base:structured' +abstract: false +final: false +allowChildContent: true +title: 'My Content Type' +description: 'Content type description' +allowChildContentType: + - 'myapp:article' +form: + - type: 'TextLine' + name: 'title' + label: 'Title' + - type: 'HtmlArea' + name: 'body' + label: 'Body' diff --git a/src/test/enonic-xp-form-fragment-8.0.0-B4/form-fragment-descriptor.yaml b/src/test/enonic-xp-form-fragment-8.0.0-B4/form-fragment-descriptor.yaml new file mode 100644 index 00000000000..8cb456e87f9 --- /dev/null +++ b/src/test/enonic-xp-form-fragment-8.0.0-B4/form-fragment-descriptor.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-form-fragment-8.0.0-B4.json +kind: 'FormFragment' +title: 'My Form Fragment' +description: 'Fragment description' +form: + - type: 'TextLine' + name: 'myField' + label: 'My Field' diff --git a/src/test/enonic-xp-idprovider-8.0.0-B4/idprovider-descriptor.yaml b/src/test/enonic-xp-idprovider-8.0.0-B4/idprovider-descriptor.yaml new file mode 100644 index 00000000000..cdde7740a03 --- /dev/null +++ b/src/test/enonic-xp-idprovider-8.0.0-B4/idprovider-descriptor.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-idprovider-8.0.0-B4.json +kind: 'IdProvider' +mode: 'MIXED' +form: + - type: 'TextLine' + name: 'domain' + label: 'Domain' diff --git a/src/test/enonic-xp-layout-8.0.0-B4/layout-descriptor.yaml b/src/test/enonic-xp-layout-8.0.0-B4/layout-descriptor.yaml new file mode 100644 index 00000000000..4eff6ce8ca9 --- /dev/null +++ b/src/test/enonic-xp-layout-8.0.0-B4/layout-descriptor.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-layout-8.0.0-B4.json +kind: 'Layout' +title: 'My Layout' +description: 'Layout description' +regions: + - 'main' + - 'aside' +form: + - type: 'TextLine' + name: 'config' + label: 'Config' diff --git a/src/test/enonic-xp-macro-8.0.0-B4/macro-descriptor.yaml b/src/test/enonic-xp-macro-8.0.0-B4/macro-descriptor.yaml new file mode 100644 index 00000000000..75436832356 --- /dev/null +++ b/src/test/enonic-xp-macro-8.0.0-B4/macro-descriptor.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-macro-8.0.0-B4.json +kind: 'Macro' +title: 'My Macro' +description: 'Macro description' +form: + - type: 'TextLine' + name: 'body' + label: 'Body' diff --git a/src/test/enonic-xp-mixin-8.0.0-B4/mixin-descriptor.yaml b/src/test/enonic-xp-mixin-8.0.0-B4/mixin-descriptor.yaml new file mode 100644 index 00000000000..7f4b27b7eed --- /dev/null +++ b/src/test/enonic-xp-mixin-8.0.0-B4/mixin-descriptor.yaml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-mixin-8.0.0-B4.json +kind: 'Mixin' +title: 'My Mixin' +description: 'Mixin description' +form: + - type: 'TextLine' + name: 'myField' + label: 'My Field' diff --git a/src/test/enonic-xp-page-8.0.0-B4/page-descriptor.yaml b/src/test/enonic-xp-page-8.0.0-B4/page-descriptor.yaml new file mode 100644 index 00000000000..b84d15074fd --- /dev/null +++ b/src/test/enonic-xp-page-8.0.0-B4/page-descriptor.yaml @@ -0,0 +1,5 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-page-8.0.0-B4.json +kind: 'Page' +title: 'My Page' +regions: + - 'main' diff --git a/src/test/enonic-xp-part-8.0.0-B4/part-descriptor.yaml b/src/test/enonic-xp-part-8.0.0-B4/part-descriptor.yaml new file mode 100644 index 00000000000..5048f1c0173 --- /dev/null +++ b/src/test/enonic-xp-part-8.0.0-B4/part-descriptor.yaml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-part-8.0.0-B4.json +kind: 'Part' +title: 'My Part' +description: 'Part description' +form: + - type: 'TextLine' + name: 'myField' + label: 'My Field' +config: + key: 'value' diff --git a/src/test/enonic-xp-service-8.0.0-B4/service-descriptor.yaml b/src/test/enonic-xp-service-8.0.0-B4/service-descriptor.yaml new file mode 100644 index 00000000000..a7aa5121c3b --- /dev/null +++ b/src/test/enonic-xp-service-8.0.0-B4/service-descriptor.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-service-8.0.0-B4.json +kind: 'Service' +title: 'My Service' +allow: + - 'role:system.admin' + - 'role:cms.admin' diff --git a/src/test/enonic-xp-site-8.0.0-B4/site-descriptor.yaml b/src/test/enonic-xp-site-8.0.0-B4/site-descriptor.yaml new file mode 100644 index 00000000000..5eb7e419acc --- /dev/null +++ b/src/test/enonic-xp-site-8.0.0-B4/site-descriptor.yaml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-site-8.0.0-B4.json +kind: 'Site' +mappings: + - filter: 'myapp:myfilter' + pattern: '/path/*' + - controller: 'myapp:mycontroller' + pattern: '/path/*' + - service: 'myapp:myservice' + filter: 'myapp:myfilter' +processors: + - name: 'myapp:myprocessor' + order: 10 +apis: + - 'myapi' +config: + p1: 1 diff --git a/src/test/enonic-xp-style-8.0.0-B4/style-descriptor.yaml b/src/test/enonic-xp-style-8.0.0-B4/style-descriptor.yaml new file mode 100644 index 00000000000..ef091f69b88 --- /dev/null +++ b/src/test/enonic-xp-style-8.0.0-B4/style-descriptor.yaml @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-style-8.0.0-B4.json +kind: 'Style' +styles: + - name: 'sepia-shake' + type: 'Image' + label: 'Sepia wide screen' + editor: + css: | + /* Target the figure block itself */ + .sepia-shake { + display: inline-block; + filter: sepia(100%); + animation: shake-anim 0.5s infinite; + } + + /* Target the image inside the block automatically */ + .sepia-shake img { + display: block; + width: 100px; + height: 100px; + } + + @keyframes shake-anim { + 0% { transform: translate(1px, 1px) rotate(0deg); } + 10% { transform: translate(-1px, -2px) rotate(-1deg); } + 20% { transform: translate(-3px, 0px) rotate(1deg); } + 100% { transform: translate(1px, -2px) rotate(-1deg); } + } diff --git a/src/test/enonic-xp-task-8.0.0-B4/task-descriptor.yaml b/src/test/enonic-xp-task-8.0.0-B4/task-descriptor.yaml new file mode 100644 index 00000000000..02f1fe21dc0 --- /dev/null +++ b/src/test/enonic-xp-task-8.0.0-B4/task-descriptor.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-task-8.0.0-B4.json +kind: 'Task' +description: 'My Task' +form: + - type: 'TextLine' + name: 'param' + label: 'Parameter' diff --git a/src/test/enonic-xp-webapp-8.0.0-B4/webapp-descriptor.yaml b/src/test/enonic-xp-webapp-8.0.0-B4/webapp-descriptor.yaml new file mode 100644 index 00000000000..455dc9881ae --- /dev/null +++ b/src/test/enonic-xp-webapp-8.0.0-B4/webapp-descriptor.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=../../schemas/json/enonic-xp-webapp-8.0.0-B4.json +kind: 'WebApp' +description: 'My WebApp' +apis: + - 'myapi' + - 'myapp:api1' + - 'myapp:api2' +config: + p1: 123