diff options
| author | 2025-04-04 18:29:22 +0200 | |
|---|---|---|
| committer | 2025-04-04 18:29:22 +0200 | |
| commit | b1844323314dd1f0832f1fcdb765a7f67ca01dbc (patch) | |
| tree | e568a5941a6155e9ca55f3e4194b3256ad2fe352 /docs/api | |
| parent | [chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) (diff) | |
| download | gotosocial-b1844323314dd1f0832f1fcdb765a7f67ca01dbc.tar.xz | |
[feature] Allow editing domain blocks/allows, fix comment import (#3967)
* start implementing editing of existing domain permissions
* [feature] Allow editing domain blocks/allows, fix comment import
* [bugfix] Use "comment" via /api/v1/instance
* fix the stuff
Diffstat (limited to 'docs/api')
| -rw-r--r-- | docs/api/swagger.yaml | 116 |
1 files changed, 114 insertions, 2 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index e1c1c14e9..778b1c843 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -1099,13 +1099,22 @@ definitions: domain: description: Domain represents a remote domain properties: + comment: + description: |- + If the domain is blocked, what's the publicly-stated reason for the block. + Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance. + example: they smell + type: string + x-go-name: Comment domain: description: The hostname of the domain. example: example.org type: string x-go-name: Domain public_comment: - description: If the domain is blocked, what's the publicly-stated reason for the block. + description: |- + If the domain is blocked, what's the publicly-stated reason for the block. + Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance. example: they smell type: string x-go-name: PublicComment @@ -1124,6 +1133,13 @@ definitions: x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model domainPermission: properties: + comment: + description: |- + If the domain is blocked, what's the publicly-stated reason for the block. + Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance. + example: they smell + type: string + x-go-name: Comment created_at: description: Time at which the permission entry was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" @@ -1162,7 +1178,9 @@ definitions: type: string x-go-name: PrivateComment public_comment: - description: If the domain is blocked, what's the publicly-stated reason for the block. + description: |- + If the domain is blocked, what's the publicly-stated reason for the block. + Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance. example: they smell type: string x-go-name: PublicComment @@ -5823,6 +5841,53 @@ paths: summary: View domain allow with the given ID. tags: - admin + put: + consumes: + - multipart/form-data + operationId: domainAllowUpdate + parameters: + - description: The id of the domain allow. + in: path + name: id + required: true + type: string + - description: Obfuscate the name of the domain when serving it publicly. Eg., `example.org` becomes something like `ex***e.org`. + in: formData + name: obfuscate + type: boolean + - description: Public comment about this domain allow. This will be displayed alongside the domain allow if you choose to share allows. + in: formData + name: public_comment + type: string + - description: Private comment about this domain allow. Will only be shown to other admins, so this is a useful way of internally keeping track of why a certain domain ended up allowed. + in: formData + name: private_comment + type: string + produces: + - application/json + responses: + "200": + description: The updated domain allow. + schema: + $ref: '#/definitions/domainPermission' + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "404": + description: not found + "406": + description: not acceptable + "500": + description: internal server error + security: + - OAuth2 Bearer: + - admin:write:domain_allows + summary: Update a single domain allow. + tags: + - admin /api/v1/admin/domain_blocks: get: operationId: domainBlocksGet @@ -5990,6 +6055,53 @@ paths: summary: View domain block with the given ID. tags: - admin + put: + consumes: + - multipart/form-data + operationId: domainBlockUpdate + parameters: + - description: The id of the domain block. + in: path + name: id + required: true + type: string + - description: Obfuscate the name of the domain when serving it publicly. Eg., `example.org` becomes something like `ex***e.org`. + in: formData + name: obfuscate + type: boolean + - description: Public comment about this domain block. This will be displayed alongside the domain block if you choose to share blocks. + in: formData + name: public_comment + type: string + - description: Private comment about this domain block. Will only be shown to other admins, so this is a useful way of internally keeping track of why a certain domain ended up blocked. + in: formData + name: private_comment + type: string + produces: + - application/json + responses: + "200": + description: The updated domain block. + schema: + $ref: '#/definitions/domainPermission' + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "404": + description: not found + "406": + description: not acceptable + "500": + description: internal server error + security: + - OAuth2 Bearer: + - admin:write:domain_blocks + summary: Update a single domain block. + tags: + - admin /api/v1/admin/domain_keys_expire: post: consumes: |
