Skip to content

docs(openapi): give alert pipeline examples a real if shape - #308

Merged
ysyneu merged 1 commit into
mainfrom
fix/alert-pipeline-examples
Aug 25, 2026
Merged

docs(openapi): give alert pipeline examples a real if shape#308
ysyneu merged 1 commit into
mainfrom
fix/alert-pipeline-examples

Conversation

@ysyneu

@ysyneu ysyneu commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The three alert-pipeline examples all used "if": null or an empty rules array, so nothing in them exercised the filter field. Generated clients validate their model layer by decoding these canonical examples, and null decodes into any shape — which is why if could carry the wrong type without any example failing.

Examples now carry the shapes the endpoints actually return:

  • pipeline/info + pipeline/upsert — a title_reset rule with an if condition and a [TPL] title template, alongside the existing unconditional severity_reset.
  • pipeline/list — an alert_inhibit rule, so settings.source_filters is covered too.

Follow-up to #307, which corrected the schema for those two fields.

The three alert-pipeline examples all used `"if": null` or an empty
`rules` array, so nothing in them exercised the filter field. Generated
clients validate their model layer by decoding these canonical examples,
and a null decodes into any shape — which is why the `if` field could
carry the wrong type without any example failing.

Give the examples the shapes the endpoints actually return:

- `pipeline/info` and `pipeline/upsert`: a `title_reset` rule with an
  `if` condition and a `[TPL]` title template, alongside the existing
  unconditional `severity_reset`.
- `pipeline/list`: an `alert_inhibit` rule, so `settings.source_filters`
  is covered too.

Both fields now decode from a real payload rather than from `null`.
@ysyneu
ysyneu merged commit 2779801 into main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant