[chore] Stub /api/v1/announcements implementation (#3630)

* [chore] Stub /api/v1/announcements implementation

This implements the /api/v1/announcements endpoint by simply returning
an empty array. This indicates there are no instance announcements.

Some clients retrieve this endpoint and get surprised by a 404. It tends
to be harmless, but results in some unnecessary logging when trying to
debug other things.

* [fix] Forgot some swagger

* [fix] Fix swagger some more
This commit is contained in:
Daenney
2024-12-23 16:43:50 +01:00
committed by GitHub
parent 9ae0c7b363
commit 1aa7f70660
4 changed files with 148 additions and 0 deletions

View File

@ -6745,6 +6745,34 @@ paths:
summary: View instance rule with the given id.
tags:
- admin
/api/v1/announcements:
get:
description: 'THIS ENDPOINT IS CURRENTLY NOT FULLY IMPLEMENTED: it will always return an empty array.'
operationId: announcementsGet
produces:
- application/json
responses:
"200":
description: ""
schema:
items:
type: object
maxItems: 0
type: array
"400":
description: bad request
"401":
description: unauthorized
"406":
description: not acceptable
"500":
description: internal server error
security:
- OAuth2 Bearer:
- read:announcements
summary: Get an array of currently active announcements.
tags:
- announcements
/api/v1/apps:
post:
consumes: