[PR #4847] [MERGED] Update Swagger API to match the return of /users/search #17518

Closed
opened 2025-11-02 13:50:33 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4847
Author: @zeripath
Created: 9/2/2018
Status: Merged
Merged: 9/21/2018
Merged by: @lunny

Base: masterHead: Correct-Users-Search-Swagger-API-Description


📝 Commits (2)

  • 3046702 Update Swagger API to match the return of /users/search
  • bddda5a Merge branch 'master' into Correct-Users-Search-Swagger-API-Description

📊 Changes

2 files changed (+25 additions, -2 deletions)

View changed files

📝 routers/api/v1/user/user.go (+10 -1)
📝 templates/swagger/v1_json.tmpl (+15 -1)

📄 Description

As per issue #4841 . The current implementation of the /users/search API does not return a UserList but rather an object similar to the SearchResults object returned by /repos/search. This pull request fixes swagger API so that it actually describes the reality of what is returned.

This pull-request requires https://github.com/go-gitea/go-sdk/pull/119

The issue is that this API has been wrong for at least 10 months - therefore tools may have grown up using the incorrect API even though the SDK is incorrect. I have also created a pull request for the opposite solution #4846 - which if pulled would mean this request was unnecessary.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4847 **Author:** [@zeripath](https://github.com/zeripath) **Created:** 9/2/2018 **Status:** ✅ Merged **Merged:** 9/21/2018 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `Correct-Users-Search-Swagger-API-Description` --- ### 📝 Commits (2) - [`3046702`](https://github.com/go-gitea/gitea/commit/3046702e2f0356919a013b3274e78593e94bcb60) Update Swagger API to match the return of /users/search - [`bddda5a`](https://github.com/go-gitea/gitea/commit/bddda5aa776c300d1caf94d5cb5ed23d97f113bc) Merge branch 'master' into Correct-Users-Search-Swagger-API-Description ### 📊 Changes **2 files changed** (+25 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `routers/api/v1/user/user.go` (+10 -1) 📝 `templates/swagger/v1_json.tmpl` (+15 -1) </details> ### 📄 Description As per issue #4841 . The current implementation of the /users/search API does not return a UserList but rather an object similar to the SearchResults object returned by /repos/search. This pull request fixes swagger API so that it actually describes the reality of what is returned. This pull-request requires https://github.com/go-gitea/go-sdk/pull/119 The issue is that this API has been wrong for at least 10 months - therefore tools may have grown up using the incorrect API even though the SDK is incorrect. I have also created a pull request for the opposite solution #4846 - which if pulled would mean this request was unnecessary. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 13:50:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17518