Skip to content

Conversation

surya-purohit
Copy link
Contributor

Updates the swagger documentation for the diffpatch API endpoint.

The request body is corrected from the outdated UpdateFileOptions to the current ApplyDiffPatchOptions to match the code implementation.

Closes issue#35602

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 9, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Oct 9, 2025
@surya-purohit surya-purohit changed the base branch from main to release/v1.25 October 9, 2025 08:31
@surya-purohit surya-purohit changed the base branch from release/v1.25 to main October 9, 2025 08:32
@surya-purohit surya-purohit changed the title fix(swagger): Update diffpatch endpoint to use ApplyDiffPatchOptions instead of UpdateFileOptions Fixes [issue#35602](https://github.com/go-gitea/gitea/issues/35602) Oct 9, 2025
@surya-purohit surya-purohit changed the title Fixes [issue#35602](https://github.com/go-gitea/gitea/issues/35602) Fixes issue#35602: Update diffpatch endpoint to use ApplyDiffPatchOptions for body instead of UpdateFileOptions Oct 9, 2025
@wxiaoguang
Copy link
Contributor

Thank you very much!

I think I made a mistake in "Refactor "change file" API (#34855)", the "diffpatch" shouldn't be in "/contents". Will make some new changes.

@wxiaoguang
Copy link
Contributor

It should be right now: fbbb1ba

@wxiaoguang wxiaoguang added this to the 1.26.0 milestone Oct 9, 2025
@wxiaoguang wxiaoguang changed the title Fixes issue#35602: Update diffpatch endpoint to use ApplyDiffPatchOptions for body instead of UpdateFileOptions Fix diffpatch API endpoint Oct 9, 2025
@surya-purohit
Copy link
Contributor Author

surya-purohit commented Oct 9, 2025

It should be right now: fbbb1ba

Thanks for the quick reply! Glad to see this is fixed.
This change will be very helpful for us once released, as we need to apply patches to multiple files 🙂.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 9, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 9, 2025
@wxiaoguang wxiaoguang merged commit b8e5e2a into go-gitea:main Oct 9, 2025
26 checks passed
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Oct 10, 2025
Fix the swagger documentation for the `diffpatch` API endpoint,
and fix the wrong API path caused by a refactoring change.

Closes go-gitea#35602

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Oct 10, 2025
lunny added a commit that referenced this pull request Oct 10, 2025
Backport #35610 by @surya-purohit

Updates the swagger documentation for the `diffpatch` API endpoint.

The request body is corrected from the outdated `UpdateFileOptions` to
the current `ApplyDiffPatchOptions` to match the code implementation.

Closes [issue#35602](#35602)

---------

Co-authored-by: Surya Purohit <suryaprakash.sharma@sourcefuse.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.25 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

diffpatch api doesn't accept patch for multiple files
4 participants