-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Repository Configuration API has psuedo-required parameters #13622
Comments
Can you tell me where the description for the api is maintained or is it generated from source code? |
Generated by comments in the sourcecode Example: gitea/routers/api/v1/repo/collaborators.go Lines 21 to 47 in b651409
|
I would take the opportunity to check if I can fix that... |
So after I have taken a deeper look into the swagger docs I'm a little bit unsure because the
The previous one:
Does not describe/mentioned the dependency between the fields like One solution could be the following, but I'm not satisfied with that: What do you think?
|
This PR would presumably Fix #20522 Fix #18773 Fix #19069 Fix #21077 Fix #13622 ----- 1. Check whether unit type is currently enabled 2. Check if it _will_ be enabled via opt 3. Allow modification as necessary Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
[x]
):Description
Related #13620
In the repository configuration API, we have pseudo-required parameters which are misleading and can be confusing for users.
My own quote below, the API skips entire sections if you fail to specify that the unit is enabled, regardless of whether it was already enabled or not.
gitea/routers/api/v1/repo/repo.go
Lines 684 to 728 in 5a991ec
This is somewhat contradictory to the description of the API route itself.
The text was updated successfully, but these errors were encountered: