-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Fix /orgs/{:orgname}/repos post endpoint #11332
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
Conversation
@iondune now it does not match with swagger docu at all :( |
@adelowo @zeripath I know this fix it but the doc is outdated them :/ https://github.com/go-gitea/gitea/pull/11332/files#diff-6c945bcfcee3c77d704a5bd4218c6b68R309 needs an update + |
@6543 that name isn't used by any code and it's not really a problem if the swagger name is different from the actual name used by the code. (Although I get your point that the swagger documentation is part of the documentation for the code and having it incorrect makes the whole process error prone.) |
ok orgname -> org is not an option if we dont like to refactor all other functions :( |
and PS: the bug was an issue of mine sorry for that - didn't had a look at the path param just used the one swagger had documented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break multiple other org endpoints.
The correct solution is to change all of the :orgname endpoints to :org
Closing as already fixed in other PR |
Fixes the issue described in #11331
CreateOrgRepo
expects a parameter named:org
but the route uses:orgname
(see here). Deprecated endpoint uses the same function, but its route uses:org
so it works. This changes updatesCreateOrgRepo
to use the param name from the route, and updates the deprecated route to use the same.