OpenAPI spec lists pagination parameters not actually supported #813

Open
opened 2024-06-20 17:50:47 +00:00 by Oneric · 0 comments
Member

Your setup

From source

Extra details

Alpine 3.20

Version

5992e8bb16

PostgreSQL version

16

What’s the problem?

Followup to #794, putting this here so it isn’t forgotten about

Currently pagiantion_params() from api spec helpers is shared across almost all endpoints with some kind of pagination. However, not all of those actually support, e.g. offset, but due to the API spec listing it it will show up as an supported parameter in e.g. swagger UI confusing users.

We should break up pagination_params into more fine grained subsets and only include actually supported parameters.

Current users of pagination_params()

# controller    operation
notification    index

search          search2

account         statuses
                followers
                following
                mutes
                blocks

status          favourites (of oneself)
                bookmarks (of oneself)

directory       index

pleroma_conv    statuses

pleroma_account favourites (of another user)

timeline        home
                direct
                public
                bubble
                hashtag
                list

conversation    index

scheduled_act   index

The following define custom pagiantion_params() in their API spec file:

tag             show_followed
                (max_id, min_id, limit)

follow_request  index
                (max_id, since_id, limit)

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup From source ### Extra details Alpine 3.20 ### Version 5992e8bb16e017ddbc0cd7704587cf10e16d2c29 ### PostgreSQL version 16 ### What’s the problem? Followup to #794, putting this here so it isn’t forgotten about Currently `pagiantion_params()` from api spec helpers is shared across almost all endpoints with some kind of pagination. However, not all of those actually support, e.g. `offset`, but due to the API spec listing it it will show up as an supported parameter in e.g. swagger UI confusing users. We should break up `pagination_params` into more fine grained subsets and only include actually supported parameters. Current users of `pagination_params()` ``` # controller operation notification index search search2 account statuses followers following mutes blocks status favourites (of oneself) bookmarks (of oneself) directory index pleroma_conv statuses pleroma_account favourites (of another user) timeline home direct public bubble hashtag list conversation index scheduled_act index ``` The following define custom `pagiantion_params()` in their API spec file: ``` tag show_followed (max_id, min_id, limit) follow_request index (max_id, since_id, limit) ``` ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Oneric added the
bug
label 2024-06-20 17:50:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#813
No description provided.