/api/v1/users/search does not return a UserList #2282

Closed
opened 2025-11-02 04:31:04 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @zeripath on GitHub (Sep 1, 2018).

  • Gitea version (or commit ref): master
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

/api/v1/users/search does not return a UserList but rather an entity similar to the SearchResults that is returned from /api/v1/repos/search

This is broken in the SDK and swagger.v1.json and has been for at least 10 months.

There are two options:

  1. Change the API code to match the Swagger signature - means that the SDK doesn't need to change but will continue to be broken on old gitea installations.
  2. Change the Swagger/SDK signature to match the API code - means that any new SDK will work with old versions of the API.
Originally created by @zeripath on GitHub (Sep 1, 2018). - Gitea version (or commit ref): master - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant ## Description `/api/v1/users/search` does not return a `UserList` but rather an entity similar to the `SearchResults` that is returned from `/api/v1/repos/search` This is broken in the SDK and swagger.v1.json and has been for at least 10 months. There are two options: 1. Change the API code to match the Swagger signature - means that the SDK doesn't need to change but will continue to be broken on old gitea installations. 2. Change the Swagger/SDK signature to match the API code - means that any new SDK will work with old versions of the API.
Author
Owner

@zeripath commented on GitHub (Sep 2, 2018):

I've just created two competing pull requests providing solutions for this. Neither solution is particularly ideal - the SDK/API description has been wrong for 10 months so cannot have been working for this, however, it's possible that other API users have sprung up in the intervening time using the de facto API.

@zeripath commented on GitHub (Sep 2, 2018): I've just created two competing pull requests providing solutions for this. Neither solution is particularly ideal - the SDK/API description has been wrong for 10 months so cannot have been working for this, however, it's possible that other API users have sprung up in the intervening time using the de facto API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2282