Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List a team's member API page parameter is 0-based (should be 1-based) #24747

Closed
yamadayutaka opened this issue May 16, 2023 · 3 comments · Fixed by #24754
Closed

List a team's member API page parameter is 0-based (should be 1-based) #24747

yamadayutaka opened this issue May 16, 2023 · 3 comments · Fixed by #24754
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Milestone

Comments

@yamadayutaka
Copy link

Description

In the API specification, page is supposed to be specified as 1-based.

https://try.gitea.io/api/swagger#/organization/orgListTeamMembers

image

However, it seems to be implemented with 0-based. (Please see screenshots)

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Target Organization/Team

image

Result when page=1 is specified

image

Result when page=0 is specified

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Installed with Helm chart and running on Kubernetes.

Override values

service:
  http:
    type: LoadBalancer

Install command

helm install gitea gitea-charts/gitea --version 8.3.0 -f override-values.yaml

Database

None

@lunny lunny added this to the 1.19.4 milestone May 16, 2023
@yardenshoham
Copy link
Member

The fix would be a breaking change so this shouldn't go in 1.19.4

@lunny
Copy link
Member

lunny commented May 16, 2023

It should be a bug, because the API documentation said it's 1 based.

@yardenshoham
Copy link
Member

I agree it's a bug. The fix itself would be a breaking change so it should be fixed in 1.20

@lunny lunny modified the milestones: 1.19.4, 1.20.0 May 16, 2023
@yardenshoham yardenshoham added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label May 16, 2023
lunny pushed a commit that referenced this issue May 17, 2023
Now it's 1-based instead of 0-based

- Fixes #24747

### Before

![image](https://github.com/go-gitea/gitea/assets/20454870/9b58ecfa-666c-4b78-bd0f-93233efeecbd)

### After

![image](https://github.com/go-gitea/gitea/assets/20454870/103b767a-e02e-4473-9f9f-5a676a61c174)

## ⚠️ BREAKING ⚠️
Previous API consumers may have relied on the 0-based pagination of this
endpoint. The page numbering now starts at 1, as documented.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2023
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this issue Jul 5, 2023
Now it's 1-based instead of 0-based

- Fixes go-gitea#24747

![image](https://github.com/go-gitea/gitea/assets/20454870/9b58ecfa-666c-4b78-bd0f-93233efeecbd)

![image](https://github.com/go-gitea/gitea/assets/20454870/103b767a-e02e-4473-9f9f-5a676a61c174)

Previous API consumers may have relied on the 0-based pagination of this
endpoint. The page numbering now starts at 1, as documented.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants