mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 05:39:39 +00:00
fix(api): align Swagger schemas for UserSettings and TopicListResponse (#38590)
Corrects the Swagger/OpenAPI schemas for `/user/settings` and `/topics/search` to match the actual JSON objects returned by the API. Signed-off-by: Sudhanshu Singh <sudhanshuwriterblc@gmail.com>
This commit is contained in:
@@ -300,7 +300,7 @@ func TopicSearch(ctx *context.APIContext) {
|
||||
}
|
||||
|
||||
ctx.SetTotalCountHeader(total)
|
||||
ctx.JSON(http.StatusOK, map[string]any{
|
||||
"topics": topicResponses,
|
||||
ctx.JSON(http.StatusOK, api.TopicListResponse{
|
||||
Topics: topicResponses,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ type swaggerFileDeleteResponse struct {
|
||||
// swagger:response TopicListResponse
|
||||
type swaggerTopicListResponse struct {
|
||||
// in: body
|
||||
Body []api.TopicResponse `json:"body"`
|
||||
Body api.TopicListResponse `json:"body"`
|
||||
}
|
||||
|
||||
// TopicNames
|
||||
|
||||
@@ -46,7 +46,7 @@ type swaggerResponseUserHeatmapData struct {
|
||||
// swagger:response UserSettings
|
||||
type swaggerResponseUserSettings struct {
|
||||
// in:body
|
||||
Body []api.UserSettings `json:"body"`
|
||||
Body api.UserSettings `json:"body"`
|
||||
}
|
||||
|
||||
// BadgeList
|
||||
|
||||
Reference in New Issue
Block a user