Skip to content

docs(api): sync OpenAPI specs with current backend handlers - #322

Merged
ysyneu merged 2 commits into
mainfrom
docs/openapi-spec-sync-20260828
Aug 28, 2026
Merged

docs(api): sync OpenAPI specs with current backend handlers#322
ysyneu merged 2 commits into
mainfrom
docs/openapi-spec-sync-20260828

Conversation

@ysyneu

@ysyneu ysyneu commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Field-level synchronization of all public OpenAPI specs (on-call, monitors, rum, platform, safari — 335 operations) with the current backend handlers, plus removal of the retired monitors endpoints.

Corrections across all modules

  • Request/response property types aligned with Go structs (incl. pointer-scalar nullability)
  • binding-derived constraints fixed: required, min/max, length limits, oneof enums
  • omitempty response fields no longer marked required; omission conditions documented
  • Enums verified against validation/write paths and each value explained
  • Missing/wrong descriptions fixed; epoch integer fields carry Unix-timestamp wording
  • Request/response examples unified between the English and Chinese specs

Retired monitors endpoints

/monit/rule/status, /monit/preview/sync, /monit/query/rows no longer have handlers in monit-webapi, so they are removed from the specs, the API catalog, and the CLI / Go SDK references. (The docs.json nav entries were already dropped in 7ff481b.)

Contract corrections

  • /enrichment/mapping/data/download: 200 is a CSV attachment stream (application/octet-stream), not a JSON envelope
  • /enrichment/mapping/data/upload: request is multipart/form-data (file field) with schema_id / do_not_truncate_first query params
  • /status-page/subscriber/export: CSV response (from the same sync round)
  • Insight export endpoints: CSV streams with per-endpoint export_fields keys

Validation

  • python3 scripts/lint_openapi.py — all 12 spec files pass
  • EN/ZH structural parity verified programmatically (only localized text differs)
  • Every spec path is present in the docs.json nav and both API catalogs (counts: total 335, Monitors 39)

…on pages, alert-source nav, accuracy fixes (doc-review 2026-08-27)
- Field-level corrections across all modules (on-call, monitors, rum,
  platform, safari): fix request/response property types, binding-derived
  constraints (required/min/max/oneof), omitempty nullability, enums, and
  missing or inaccurate descriptions
- Remove retired monitors endpoints /monit/rule/status, /monit/preview/sync
  and /monit/query/rows from the specs and API catalog; update CLI and
  Go SDK references accordingly
- Enrichment mapping data: document the real CSV download stream and the
  multipart/form-data upload contract (schema_id query param, file field)
- Unify request/response examples between the English and Chinese specs
@ysyneu
ysyneu force-pushed the docs/openapi-spec-sync-20260828 branch from cd24cfb to cb2d15c Compare August 28, 2026 07:13
@ysyneu
ysyneu merged commit d9e96ee into main Aug 28, 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