Validate config improvements (#6837)

* validate config

* fix

* fix
This commit is contained in:
Eugenio Romano 2021-03-22 14:02:05 +00:00 committed by GitHub
parent 5c55c7ed13
commit d35ba2eedb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 20 deletions

View File

@ -1,6 +1,6 @@
{ {
"$schema": "http://json-schema.org/schema", "$schema": "http://json-schema.org/schema",
"id": "https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/core/app-config/schema.json", "$id": "https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/core/app-config/schema.json",
"title": "ADF Application config", "title": "ADF Application config",
"description": "Configuration object for ADF components used by your application", "description": "Configuration object for ADF components used by your application",
"definitions": { "definitions": {
@ -348,6 +348,7 @@
}, },
"exclude": { "exclude": {
"type": "array", "type": "array",
"minItems": 0,
"items": { "items": {
"description": "Property name", "description": "Property name",
"type": "string" "type": "string"
@ -355,6 +356,7 @@
}, },
"readOnlyAspects": { "readOnlyAspects": {
"type": "array", "type": "array",
"minItems": 0,
"items": { "items": {
"description": "Disable editing in these aspects", "description": "Disable editing in these aspects",
"type": "string" "type": "string"
@ -362,6 +364,7 @@
}, },
"readOnlyProperties": { "readOnlyProperties": {
"type": "array", "type": "array",
"minItems": 0,
"items": { "items": {
"description": "Disable editing in these properties", "description": "Disable editing in these properties",
"type": "string" "type": "string"
@ -1010,6 +1013,7 @@
], ],
"properties": { "properties": {
"presets": { "presets": {
"type": "object",
"description": "Presets for content metadata component", "description": "Presets for content metadata component",
"patternProperties": { "patternProperties": {
".*": { ".*": {
@ -1378,6 +1382,7 @@
} }
}, },
"highlight": { "highlight": {
"type": "object",
"description": " Request that highlight fragments to be added to result set rows The properties reflect SOLR highlighting parameters.", "description": " Request that highlight fragments to be added to result set rows The properties reflect SOLR highlighting parameters.",
"properties": { "properties": {
"prefix": { "prefix": {
@ -1440,6 +1445,7 @@
} }
}, },
"sorting": { "sorting": {
"type" : "object",
"description": "Sorting options and defaults", "description": "Sorting options and defaults",
"required": [ "required": [
"options" "options"
@ -1479,18 +1485,10 @@
}, },
"defaults": { "defaults": {
"description": "Predefined sorting to execute by default", "description": "Predefined sorting to execute by default",
"options": {
"type": "array", "type": "array",
"minItems": 1, "minItems": 1,
"items": { "items": {
"type": "object", "type": "object",
"required": [
"key",
"label",
"type",
"field",
"ascending"
],
"properties": { "properties": {
"key": { "key": {
"type": "string" "type": "string"
@ -1513,7 +1511,6 @@
} }
} }
} }
}
}, },
"adf-viewer": { "adf-viewer": {
"description": "Viewer default properties", "description": "Viewer default properties",

View File

@ -35,12 +35,12 @@
"stylelint": "stylelint ./**/*.scss --config stylelint-config.json", "stylelint": "stylelint ./**/*.scss --config stylelint-config.json",
"04": "echo -------------------------------------------- Demo Shell -----------------------------------------------", "04": "echo -------------------------------------------- Demo Shell -----------------------------------------------",
"04s": "", "04s": "",
"start": "npm run validate-config && concurrently \"ng serve demoshell --open\" \"npm run style:dev -- --watch >&-\" ", "start": "concurrently \"ng serve demoshell --open\" \"npm run style:dev -- --watch >&-\" ",
"start:prod": "npm run validate-config && ng serve demoshell --prod --open", "start:prod": "ng serve demoshell --prod --open",
"build": "npm run validate-config && npm run style:dev && ng build demoshell", "build": "npm run style:dev && ng build demoshell",
"build:prod": "npm run validate-config && node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build demoshell --prod", "build:prod": "node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build demoshell --prod",
"style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail", "style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail",
"test": "npm run validate-config && ng test demoshell --watch=false", "test": "ng test demoshell --watch=false",
"05": "echo -------------------------------------------- E2e -----------------------------------------------", "05": "echo -------------------------------------------- E2e -----------------------------------------------",
"05s": "", "05s": "",
"e2e": "./scripts/test-e2e-lib.sh -host 'localhost:4200' -dev --folder demo-shell", "e2e": "./scripts/test-e2e-lib.sh -host 'localhost:4200' -dev --folder demo-shell",

View File

@ -12,4 +12,5 @@ nx affected:lint --parallel --all --maxParallel=9 && \
npm run lint-e2e && \ npm run lint-e2e && \
npm run stylelint && \ npm run stylelint && \
npm run spellcheck && \ npm run spellcheck && \
npm run license-checker npm run license-checker && \
npm run validate-config