mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-26 05:36:38 +00:00
[chore] Fix Swagger paths for lists API endpoints (#1904)
This commit is contained in:
parent
73bfb5fbff
commit
84eb7eaf26
|
@ -4517,7 +4517,34 @@ paths:
|
||||||
description: internal server error
|
description: internal server error
|
||||||
tags:
|
tags:
|
||||||
- instance
|
- instance
|
||||||
/api/v1/list:
|
/api/v1/lists:
|
||||||
|
get:
|
||||||
|
operationId: lists
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Array of all lists owned by the requesting user.
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/list'
|
||||||
|
type: array
|
||||||
|
"400":
|
||||||
|
description: bad request
|
||||||
|
"401":
|
||||||
|
description: unauthorized
|
||||||
|
"404":
|
||||||
|
description: not found
|
||||||
|
"406":
|
||||||
|
description: not acceptable
|
||||||
|
"500":
|
||||||
|
description: internal server error
|
||||||
|
security:
|
||||||
|
- OAuth2 Bearer:
|
||||||
|
- read:lists
|
||||||
|
summary: Get all lists for owned by authorized user.
|
||||||
|
tags:
|
||||||
|
- lists
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -4568,61 +4595,7 @@ paths:
|
||||||
summary: Create a new list.
|
summary: Create a new list.
|
||||||
tags:
|
tags:
|
||||||
- lists
|
- lists
|
||||||
put:
|
/api/v1/lists/{id}:
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
- application/xml
|
|
||||||
- application/x-www-form-urlencoded
|
|
||||||
operationId: listUpdate
|
|
||||||
parameters:
|
|
||||||
- description: ID of the list
|
|
||||||
example: Cool People
|
|
||||||
in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
x-go-name: Title
|
|
||||||
- description: Title of this list.
|
|
||||||
example: Cool People
|
|
||||||
in: formData
|
|
||||||
name: title
|
|
||||||
type: string
|
|
||||||
x-go-name: RepliesPolicy
|
|
||||||
- description: |-
|
|
||||||
RepliesPolicy for this list.
|
|
||||||
followed = Show replies to any followed user
|
|
||||||
list = Show replies to members of the list
|
|
||||||
none = Show replies to no one
|
|
||||||
example: list
|
|
||||||
in: formData
|
|
||||||
name: replies_policy
|
|
||||||
type: string
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The newly updated list.
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/list'
|
|
||||||
"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:lists
|
|
||||||
summary: Update an existing list.
|
|
||||||
tags:
|
|
||||||
- lists
|
|
||||||
/api/v1/list/{id}:
|
|
||||||
delete:
|
delete:
|
||||||
operationId: listDelete
|
operationId: listDelete
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -4683,7 +4656,61 @@ paths:
|
||||||
summary: Get a single list with the given ID.
|
summary: Get a single list with the given ID.
|
||||||
tags:
|
tags:
|
||||||
- lists
|
- lists
|
||||||
/api/v1/list/{id}/accounts:
|
put:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- application/xml
|
||||||
|
- application/x-www-form-urlencoded
|
||||||
|
operationId: listUpdate
|
||||||
|
parameters:
|
||||||
|
- description: ID of the list
|
||||||
|
example: Cool People
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
x-go-name: Title
|
||||||
|
- description: Title of this list.
|
||||||
|
example: Cool People
|
||||||
|
in: formData
|
||||||
|
name: title
|
||||||
|
type: string
|
||||||
|
x-go-name: RepliesPolicy
|
||||||
|
- description: |-
|
||||||
|
RepliesPolicy for this list.
|
||||||
|
followed = Show replies to any followed user
|
||||||
|
list = Show replies to members of the list
|
||||||
|
none = Show replies to no one
|
||||||
|
example: list
|
||||||
|
in: formData
|
||||||
|
name: replies_policy
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The newly updated list.
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/list'
|
||||||
|
"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:lists
|
||||||
|
summary: Update an existing list.
|
||||||
|
tags:
|
||||||
|
- lists
|
||||||
|
/api/v1/lists/{id}/accounts:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -4826,34 +4853,6 @@ paths:
|
||||||
summary: Add one or more accounts to the given list.
|
summary: Add one or more accounts to the given list.
|
||||||
tags:
|
tags:
|
||||||
- lists
|
- lists
|
||||||
/api/v1/lists:
|
|
||||||
get:
|
|
||||||
operationId: lists
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Array of all lists owned by the requesting user.
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/list'
|
|
||||||
type: array
|
|
||||||
"400":
|
|
||||||
description: bad request
|
|
||||||
"401":
|
|
||||||
description: unauthorized
|
|
||||||
"404":
|
|
||||||
description: not found
|
|
||||||
"406":
|
|
||||||
description: not acceptable
|
|
||||||
"500":
|
|
||||||
description: internal server error
|
|
||||||
security:
|
|
||||||
- OAuth2 Bearer:
|
|
||||||
- read:lists
|
|
||||||
summary: Get all lists for owned by authorized user.
|
|
||||||
tags:
|
|
||||||
- lists
|
|
||||||
/api/v1/media/{id}:
|
/api/v1/media/{id}:
|
||||||
get:
|
get:
|
||||||
operationId: mediaGet
|
operationId: mediaGet
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListAccountsGETHandler swagger:operation GET /api/v1/list/{id}/accounts listAccounts
|
// ListAccountsGETHandler swagger:operation GET /api/v1/lists/{id}/accounts listAccounts
|
||||||
//
|
//
|
||||||
// Page through accounts in this list.
|
// Page through accounts in this list.
|
||||||
//
|
//
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListAccountsPOSTHandler swagger:operation POST /api/v1/list/{id}/accounts addListAccounts
|
// ListAccountsPOSTHandler swagger:operation POST /api/v1/lists/{id}/accounts addListAccounts
|
||||||
//
|
//
|
||||||
// Add one or more accounts to the given list.
|
// Add one or more accounts to the given list.
|
||||||
//
|
//
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListAccountsDELETEHandler swagger:operation DELETE /api/v1/list/{id}/accounts removeListAccounts
|
// ListAccountsDELETEHandler swagger:operation DELETE /api/v1/lists/{id}/accounts removeListAccounts
|
||||||
//
|
//
|
||||||
// Remove one or more accounts from the given list.
|
// Remove one or more accounts from the given list.
|
||||||
//
|
//
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/validate"
|
"github.com/superseriousbusiness/gotosocial/internal/validate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListCreatePOSTHandler swagger:operation POST /api/v1/list listCreate
|
// ListCreatePOSTHandler swagger:operation POST /api/v1/lists listCreate
|
||||||
//
|
//
|
||||||
// Create a new list.
|
// Create a new list.
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListDELETEHandler swagger:operation DELETE /api/v1/list/{id} listDelete
|
// ListDELETEHandler swagger:operation DELETE /api/v1/lists/{id} listDelete
|
||||||
//
|
//
|
||||||
// Delete a single list with the given ID.
|
// Delete a single list with the given ID.
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListGETHandler swagger:operation GET /api/v1/list/{id} list
|
// ListGETHandler swagger:operation GET /api/v1/lists/{id} list
|
||||||
//
|
//
|
||||||
// Get a single list with the given ID.
|
// Get a single list with the given ID.
|
||||||
//
|
//
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/validate"
|
"github.com/superseriousbusiness/gotosocial/internal/validate"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListUpdatePUTHandler swagger:operation PUT /api/v1/list listUpdate
|
// ListUpdatePUTHandler swagger:operation PUT /api/v1/lists/{id} listUpdate
|
||||||
//
|
//
|
||||||
// Update an existing list.
|
// Update an existing list.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue