From 0386a28b5a3c4212320e8a96ddd14c54b65a2090 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 2 Aug 2021 19:06:44 +0200 Subject: Frodo swaggins (#126) * more swagger fun * document a whole bunch more stuff * more swagger yayyyyyyy * progress + go fmt --- internal/api/client/search/searchget.go | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'internal/api/client/search') diff --git a/internal/api/client/search/searchget.go b/internal/api/client/search/searchget.go index 1e2694673..faa227719 100644 --- a/internal/api/client/search/searchget.go +++ b/internal/api/client/search/searchget.go @@ -29,8 +29,32 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// SearchGETHandler handles searches for local and remote accounts, statuses, and hashtags. -// It corresponds to the mastodon endpoint described here: https://docs.joinmastodon.org/methods/search/ +// SearchGETHandler swagger:operation GET /api/v1/search searchGet +// +// Search for statuses, accounts, or hashtags, on this instance or elsewhere. +// +// If statuses are in the result, they will be returned in descending chronological order (newest first), with sequential IDs (bigger = newer). +// +// --- +// tags: +// - search +// +// security: +// - OAuth2 Bearer: +// - read:search +// +// responses: +// '200': +// name: search results +// description: Results of the search. +// schema: +// type: array +// items: +// "$ref": "#/definitions/searchResult" +// '401': +// description: unauthorized +// '400': +// description: bad request func (m *Module) SearchGETHandler(c *gin.Context) { l := m.log.WithFields(logrus.Fields{ "func": "SearchGETHandler", -- cgit v1.3