Skip to content

Commit

Permalink
Merge pull request #73 from jakejscott/feat/fix-readme
Browse files Browse the repository at this point in the history
Fix schema warnings from Ajv
  • Loading branch information
eoinsha authored Jan 19, 2022
2 parents 8a4e27e + 6fcf38f commit b6e17aa
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 60 deletions.
5 changes: 5 additions & 0 deletions serverless-plugin/config-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ const commonAlarmProperties = {
const alarmSchemas = {}
for (const service of Object.keys(supportedAlarms)) {
alarmSchemas[service] = {
type: 'object',
properties: {
...commonAlarmProperties
},
additionalProperties: false
}
for (const metricAlarm of supportedAlarms[service]) {
alarmSchemas[service].properties[metricAlarm] = {
type: 'object',
properties: {
...commonAlarmProperties
},
Expand Down Expand Up @@ -117,13 +119,15 @@ const commonWidgetProperties = {
const widgetSchemas = {}
for (const service of Object.keys(supportedWidgets)) {
widgetSchemas[service] = {
type: 'object',
properties: {
...commonWidgetProperties
},
additionalProperties: false
}
for (const metricWidget of supportedWidgets[service]) {
widgetSchemas[service].properties[metricWidget] = {
type: 'object',
properties: {
...commonWidgetProperties
},
Expand Down Expand Up @@ -154,6 +158,7 @@ const dashboardSchema = {
}]
},
widgets: {
type: 'object',
properties: {
...commonWidgetProperties,
...widgetSchemas
Expand Down
181 changes: 136 additions & 45 deletions serverless-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions serverless-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"license": "Apache",
"dependencies": {
"ajv": "^8.9.0",
"case": "^1.6.3",
"lodash": "^4.17.21",
"yaml": "^1.10.2"
Expand Down
Loading

0 comments on commit b6e17aa

Please sign in to comment.