[docs] Fix Swagger URL for the "edit status" operation (#3932)

This commit is contained in:
Leonid Shevtsov
2025-03-30 11:21:08 +03:00
committed by GitHub
parent 13e7ac3e6a
commit 85fb63f46f
2 changed files with 82 additions and 71 deletions

View File

@@ -10732,6 +10732,76 @@ paths:
summary: Create a new status using the given form field parameters. summary: Create a new status using the given form field parameters.
tags: tags:
- statuses - statuses
/api/v1/statuses/{id}:
delete:
description: |-
The deleted status will be returned in the response. The `text` field will contain the original text of the status as it was submitted.
This is useful when doing a 'delete and redraft' type operation.
operationId: statusDelete
parameters:
- description: Target status ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: The status that was just deleted.
schema:
$ref: '#/definitions/status'
"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:
- write:statuses
summary: Delete status with the given ID. The status must belong to you.
tags:
- statuses
get:
operationId: statusGet
parameters:
- description: Target status ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: The requested status.
schema:
$ref: '#/definitions/status'
"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:
- read:statuses
summary: View status with the given ID.
tags:
- statuses
put: put:
consumes: consumes:
- application/json - application/json
@@ -10739,6 +10809,11 @@ paths:
description: The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. description: The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'.
operationId: statusEdit operationId: statusEdit
parameters: parameters:
- description: Target status ID.
in: path
name: id
required: true
type: string
- description: |- - description: |-
Text content of the status. Text content of the status.
If media_ids is provided, this becomes optional. If media_ids is provided, this becomes optional.
@@ -10838,76 +10913,6 @@ paths:
summary: Edit an existing status using the given form field parameters. summary: Edit an existing status using the given form field parameters.
tags: tags:
- statuses - statuses
/api/v1/statuses/{id}:
delete:
description: |-
The deleted status will be returned in the response. The `text` field will contain the original text of the status as it was submitted.
This is useful when doing a 'delete and redraft' type operation.
operationId: statusDelete
parameters:
- description: Target status ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: The status that was just deleted.
schema:
$ref: '#/definitions/status'
"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:
- write:statuses
summary: Delete status with the given ID. The status must belong to you.
tags:
- statuses
get:
operationId: statusGet
parameters:
- description: Target status ID.
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: The requested status.
schema:
$ref: '#/definitions/status'
"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:
- read:statuses
summary: View status with the given ID.
tags:
- statuses
/api/v1/statuses/{id}/bookmark: /api/v1/statuses/{id}/bookmark:
post: post:
operationId: statusBookmark operationId: statusBookmark

View File

@@ -30,7 +30,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/util" "github.com/superseriousbusiness/gotosocial/internal/util"
) )
// StatusEditPUTHandler swagger:operation PUT /api/v1/statuses statusEdit // StatusEditPUTHandler swagger:operation PUT /api/v1/statuses/{id} statusEdit
// //
// Edit an existing status using the given form field parameters. // Edit an existing status using the given form field parameters.
// //
@@ -46,6 +46,12 @@ import (
// //
// parameters: // parameters:
// - // -
// name: id
// type: string
// description: Target status ID.
// in: path
// required: true
// -
// name: status // name: status
// x-go-name: Status // x-go-name: Status
// description: |- // description: |-