From d3cec13f98e556a58deb36f872b4d7e1112571bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 12 Nov 2026 13:29:02 +0100 Subject: [PATCH] docs(api): regenerate the contract The test push answers with a reason instead of per-endpoint counts. --- docs/api/openapi.yaml | 48 ++++++++++++------------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index 5ca3812df..ce479a2e1 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -24711,16 +24711,16 @@ paths: post: tags: - Notifications - summary: Send a test push to the newest Web Push subscription + summary: Send a test push to every Web Push subscription description: >- - Fires one notification to the caller's MOST RECENT subscription only — a person with a phone, a tablet and a - desktop registered should not get three buzzes per click. Takes no body. Rate-limited 5 per minute per user. + Fires one notification to each of the caller's subscriptions, through the same sender real reminders use, with + the text in the account's language. The device the test was pressed on gets it whichever subscription is newest. + Endpoints the push service reports gone (404/410) are removed, as on a real send. Takes no body. Rate-limited 5 + per minute per user. - Read `ok`, not the status. A push that the service rejects still answers 200, with `ok: false` and the service's - own status in `perEndpoint`. Only the endpoint's HOST is reported: the full endpoint is the routing secret for - that subscription, and push services embed it in their own error messages, so it is stripped before anything is - logged or returned. + Read `ok`, not the status. A push that every service rejects still answers 200, with `ok: false` and a `reason`. + No endpoint is returned: the full endpoint is the routing secret for that subscription. responses: "200": description: The test ran. `ok` says whether the push was accepted; a false here is a real failure reported inside a @@ -90475,40 +90475,18 @@ components: properties: ok: type: boolean - sent: - type: integer - minimum: -9007199254740991 - maximum: 9007199254740991 - description: 1 on success, 0 on failure. Never more than one. + description: Whether at least one of the account's subscriptions accepted the push. latencyMs: - description: Round-trip to the push service. Present on success only. + description: Time to send to every subscription. Present on success only. type: integer minimum: -9007199254740991 maximum: 9007199254740991 - perEndpoint: - type: array - items: - type: object - properties: - host: - type: string - description: Host of the push service the test went to — the endpoint path is a routing secret and is never returned. - status: - anyOf: - - type: integer - minimum: -9007199254740991 - maximum: 9007199254740991 - - type: "null" - description: The push service's HTTP status, or null when the attempt threw before one existed. - required: - - host - - status - additionalProperties: false - description: "One entry: only the newest subscription is tested." + reason: + description: Why it was not, when `ok` is false. Absent on success. The sender's own classification, the same code a + failed reminder records (`web_push_410_gone` when every endpoint is gone, a status-derived code otherwise). + type: string required: - ok - - sent - - perEndpoint additionalProperties: false ApnsTestEnvelope: type: object