Update Swagger documentation for REST Api methods #13234

Closed
opened 2025-11-02 10:35:43 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @lraubuch on GitHub (Jul 4, 2024).

Feature Description

When checking the REST Api documentation I came across the method to add a collaborator to a repository.
In the documentation it said, that the payload body needs to contain a permission value which was expected. Unfortunately there was no documentation of what that string value should be to set the appropriate permissions.
After digging deep into the code I found that the permission can be one of three values.

IMHO this should be documented in the Swagger documentation of the REST Api.

Screenshots

grafik

Originally created by @lraubuch on GitHub (Jul 4, 2024). ### Feature Description When checking the REST Api documentation I came across the method to add a collaborator to a repository. In the [documentation](https://docs.gitea.com/api/1.20/#tag/repository/operation/repoCheckCollaborator) it said, that the payload body needs to contain a permission value which was expected. Unfortunately there was no documentation of what that string value should be to set the appropriate permissions. After digging deep into the [code](https://github.com/go-gitea/gitea/blob/b270b30aebf42fb45d9a57288cf3dcbfa842a760/models/perm/access_mode.go#L46) I found that the permission can be one of three values. IMHO this should be documented in the Swagger documentation of the REST Api. ### Screenshots ![grafik](https://github.com/go-gitea/gitea/assets/35454706/94f77718-a4e4-4871-a9f6-62ec07be0950)
GiteaMirror added the type/proposaltype/docs labels 2025-11-02 10:35:43 -06:00
Author
Owner

@wolfogre commented on GitHub (Jul 31, 2024):

It's just missed. I don't think it's difficult to add it.

@wolfogre commented on GitHub (Jul 31, 2024): It's just missed. I don't think it's difficult to add it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13234