Merge pull request #17970 from roidelapluie/roidelapluie/ffapiopenapi
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run

Features API: Add OpenAPI 3.1 and 3.2
This commit is contained in:
Julien 2026-01-29 21:18:04 +01:00 committed by GitHub
commit 22f6d5d335
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,8 @@
"exclude_alerts": true,
"label_values_match": true,
"lifecycle": false,
"openapi_3.1": true,
"openapi_3.2": true,
"otlp_write_receiver": false,
"query_stats": true,
"query_warnings": true,

View file

@ -427,6 +427,8 @@ func New(logger *slog.Logger, o *Options) *Handler {
r.Enable(features.API, "time_range_series") // start/end parameters for /series endpoint.
r.Enable(features.API, "time_range_labels") // start/end parameters for /labels endpoints.
r.Enable(features.API, "exclude_alerts") // exclude_alerts parameter for /rules endpoint.
r.Enable(features.API, "openapi_3.1") // OpenAPI 3.1 specification support.
r.Enable(features.API, "openapi_3.2") // OpenAPI 3.2 specification support.
r.Set(features.UI, "ui_v3", !o.UseOldUI)
r.Set(features.UI, "ui_v2", o.UseOldUI)
}