Skip to content
Open
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
10 changes: 10 additions & 0 deletions scripts/pull-schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,15 @@ modify '.definitions.AlertRuleExport.properties.keepFiringFor = { "type" : "stri
# "Unstructured" should truly be unstructured. Not an object with an "Object" property that allows anything.
modify '.definitions.Unstructured.properties = {}'

modify '.definitions.AlertRuleExport.properties.execErrState.enum += ["KeepLast"]'
modify '.definitions.AlertRuleExport.properties.noDataState.enum += ["KeepLast"]'
modify '.definitions.GettableGrafanaRule.properties.exec_err_state.enum += ["KeepLast"]'
modify '.definitions.GettableGrafanaRule.properties.no_data_state.enum += ["KeepLast"]'
modify '.definitions.PostableGrafanaRule.properties.exec_err_state.enum += ["KeepLast"]'
modify '.definitions.PostableGrafanaRule.properties.no_data_state.enum += ["KeepLast"]'
modify '.definitions.ProvisionedAlertRule.properties.execErrState.enum += ["KeepLast"]'
modify '.definitions.ProvisionedAlertRule.properties.noDataState.enum += ["KeepLast"]'

# Write the schema to a file
echo "${SCHEMA}" > "${SCRIPT_DIR}/schema.json"