Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schema warnings from Ajv #73

Merged
merged 6 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to include these!

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