Skip to content

Commit

Permalink
Validate config improvements (#6837)
Browse files Browse the repository at this point in the history
* validate config

* fix

* fix
  • Loading branch information
eromano committed Mar 22, 2021
1 parent 5c55c7e commit d35ba2e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
25 changes: 11 additions & 14 deletions lib/core/app-config/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$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",
"description": "Configuration object for ADF components used by your application",
"definitions": {
Expand Down Expand Up @@ -348,20 +348,23 @@
},
"exclude": {
"type": "array",
"minItems": 0,
"items": {
"description": "Property name",
"type": "string"
}
},
"readOnlyAspects": {
"type": "array",
"minItems": 0,
"items": {
"description": "Disable editing in these aspects",
"type": "string"
}
},
"readOnlyProperties": {
"type": "array",
"minItems": 0,
"items": {
"description": "Disable editing in these properties",
"type": "string"
Expand Down Expand Up @@ -1010,6 +1013,7 @@
],
"properties": {
"presets": {
"type": "object",
"description": "Presets for content metadata component",
"patternProperties": {
".*": {
Expand Down Expand Up @@ -1378,6 +1382,7 @@
}
},
"highlight": {
"type": "object",
"description": " Request that highlight fragments to be added to result set rows The properties reflect SOLR highlighting parameters.",
"properties": {
"prefix": {
Expand Down Expand Up @@ -1440,6 +1445,7 @@
}
},
"sorting": {
"type" : "object",
"description": "Sorting options and defaults",
"required": [
"options"
Expand Down Expand Up @@ -1479,18 +1485,10 @@
},
"defaults": {
"description": "Predefined sorting to execute by default",
"options": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"key",
"label",
"type",
"field",
"ascending"
],
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
Expand All @@ -1508,7 +1506,6 @@
"type": "boolean"
}
}
}
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"stylelint": "stylelint ./**/*.scss --config stylelint-config.json",
"04": "echo -------------------------------------------- Demo Shell -----------------------------------------------",
"04s": "",
"start": "npm run validate-config && concurrently \"ng serve demoshell --open\" \"npm run style:dev -- --watch >&-\" ",
"start:prod": "npm run validate-config && ng serve demoshell --prod --open",
"build": "npm run validate-config && 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",
"start": "concurrently \"ng serve demoshell --open\" \"npm run style:dev -- --watch >&-\" ",
"start:prod": "ng serve demoshell --prod --open",
"build": "npm run style:dev && ng build demoshell",
"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",
"test": "npm run validate-config && ng test demoshell --watch=false",
"test": "ng test demoshell --watch=false",
"05": "echo -------------------------------------------- E2e -----------------------------------------------",
"05s": "",
"e2e": "./scripts/test-e2e-lib.sh -host 'localhost:4200' -dev --folder demo-shell",
Expand Down
3 changes: 2 additions & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ nx affected:lint --parallel --all --maxParallel=9 && \
npm run lint-e2e && \
npm run stylelint && \
npm run spellcheck && \
npm run license-checker
npm run license-checker && \
npm run validate-config

0 comments on commit d35ba2e

Please sign in to comment.