You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/api/v1/repo
qwerty287 3676fafdac
Add API to get/edit wiki (#17278)
* Add API to get/edit wiki

* Add swagger docs, various improvements

* fmt

* Fix lint and rm comment

* Add page parameter

* Add pagination to pages

* Add tests

* fmt

* Update func names

* Update error handling

* Update type name

* Fix lint

* Don't delete Home

* Update func name

* Update routers/api/v1/repo/wiki.go

Co-authored-by: delvh <dev.lh@web.de>

* Remove unnecessary check

* Fix lint

* Use English strings

* Update integrations/api_wiki_test.go

Co-authored-by: delvh <dev.lh@web.de>

* Update func and test names

* Remove unsed check and avoid duplicated error reports

* Improve error handling

* Return after error

* Document 404 error

* Update swagger

* Fix lint

* Apply suggestions from code review

Co-authored-by: delvh <dev.lh@web.de>

* Document file encoding

* fmt

* Apply suggestions

* Use convert

* Fix integration test

* simplify permissions

* unify duplicate key Title/Name

* improve types & return UTC timestamps

* improve types pt.2

- add WikiPageMetaData.LastCommit
- add WikiPageMetaData.HTMLURL
- replace WikiPageMetaData.Updated with .LastCommit.Committer.Created

also delete convert.ToWikiPage(), as it received too many arguments and
only had one callsite anyway. sorry for bad advice earlier 🙃

* WikiPage.Content is base64 encoded

* simplify error handling in wikiContentsByName()

* update swagger

* fix & DRY findWikiRepoCommit() error handling

ListWikiPages() previously wrote error twice when repo wiki didn't exist

* rename Content -> ContentBase64

* Fix test

* Fix tests

* Update var name

* suburl -> sub_url

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
3 years ago
..
blob.go Swagger info corrections (#9441) 5 years ago
branch.go Support unprotected file patterns (#16395) 4 years ago
collaborators.go [API] generalize list header (#16551) 4 years ago
commits.go Add API to get commit diff/patch (#17095) 4 years ago
file.go Add caller to cat-file batch calls (#17082) 4 years ago
fork.go Refactor the fork service slightly to take ForkRepoOptions (#16744) 4 years ago
git_hook.go Move macaron to chi (#14293) 4 years ago
git_ref.go Let branch/tag name be a valid ref to get CI status (#16400) 4 years ago
hook.go [API] generalize list header (#16551) 4 years ago
hook_test.go Move db related basic functions to models/db (#17075) 4 years ago
issue.go API: don't allow merged PRs to be reopened (#17192) 3 years ago
issue_comment.go [API] generalize list header (#16551) 4 years ago
issue_label.go Calculate label URL on API (#16186) 4 years ago
issue_reaction.go [refactor] Unify the export of user data via API (#15144) 4 years ago
issue_stopwatch.go [API] generalize list header (#16551) 4 years ago
issue_subscription.go [refactor] Unify the export of user data via API (#15144) 4 years ago
issue_tracked_time.go [API] generalize list header (#16551) 4 years ago
key.go [API] generalize list header (#16551) 4 years ago
label.go Calculate label URL on API (#16186) 4 years ago
language.go Add language statistics API endpoint (#11737) 5 years ago
main_test.go Move db related basic functions to models/db (#17075) 4 years ago
migrate.go Make mirror feature more configurable (#16957) 4 years ago
milestone.go [API] generalize list header (#16551) 4 years ago
mirror.go Make mirror feature more configurable (#16957) 4 years ago
notes.go Add an api endpoint to fetch git notes (#15373) (#16649) 4 years ago
pull.go Add buttons to allow loading of incomplete diffs (#16829) 3 years ago
pull_review.go [API] generalize list header (#16551) 4 years ago
release.go [API] generalize list header (#16551) 4 years ago
release_attachment.go Add repo_id for attachment (#16958) 4 years ago
release_tags.go [API] Add delete release by tag & fix unreleased inconsistency (#14563) 4 years ago
repo.go [API] generalize list header (#16551) 4 years ago
repo_test.go Move db related basic functions to models/db (#17075) 4 years ago
star.go [API] generalize list header (#16551) 4 years ago
status.go [API] generalize list header (#16551) 4 years ago
subscriber.go [API] generalize list header (#16551) 4 years ago
tag.go [API] generalize list header (#16551) 4 years ago
teams.go [API] List, Check, Add & delete endpoints for repository teams (#13630) 4 years ago
topic.go [API] generalize list header (#16551) 4 years ago
transfer.go Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) 4 years ago
tree.go Rename context.Query to context.Form (#16562) 4 years ago
wiki.go Add API to get/edit wiki (#17278) 3 years ago