From 01e376526863a17d1f5bae72fd7693afa215291a Mon Sep 17 00:00:00 2001 From: nicole mikołajczyk Date: Mon, 9 Jun 2025 12:32:14 +0200 Subject: [feature] Add fields introduced in Mastodon 4.4.0 to `/api/v2/instance` response (#4240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4240 Co-authored-by: nicole mikołajczyk Co-committed-by: nicole mikołajczyk --- docs/api/swagger.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 3ef284ef1..062be9d94 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -2108,6 +2108,20 @@ definitions: example:

Registrations are currently closed on example.org because of spam bots!

type: string x-go-name: Message + min_age: + description: |- + A minimum age required to register, if configured. + Currently not implemented: will always be null. + format: int64 + type: integer + x-go-name: MinAge + reason_required: + description: |- + Whether registrations require the user to provide a reason for joining. + Only applicable when ApprovalRequired is true. + example: true + type: boolean + x-go-name: ReasonRequired title: Information about registering for this instance. type: object x-go-name: InstanceV2Registrations @@ -2178,11 +2192,26 @@ definitions: x-go-package: code.superseriousbusiness.org/gotosocial/internal/api/model instanceV2URLs: properties: + about: + description: Address of the server about page. + example: https://example.org/about + type: string + x-go-name: About + privacy_policy: + description: Address of the server privacy policy, if any. + example: https://example.org/about#rules + type: string + x-go-name: PrivacyPolicy streaming: description: Websockets address for status and notification streaming. example: wss://example.org type: string x-go-name: Streaming + terms_of_service: + description: Address of the server current terms of service, if any. + example: https://example.org/about#privacy_policy + type: string + x-go-name: TermsOfService title: InstanceV2URLs models instance-relevant URLs for client application consumption. type: object x-go-name: InstanceV2URLs -- cgit v1.2.3