From 58dddd86e0ddbb0c6aa54506dcef162321babfbb Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 31 Jul 2021 17:49:59 +0200 Subject: Swagger (#124) * start experimenting with swagger documentation * further adventures in swagger * do a few more api paths * account paths documented * go fmt * fix up some models * bit o lintin' --- cmd/gotosocial/main.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'cmd/gotosocial') diff --git a/cmd/gotosocial/main.go b/cmd/gotosocial/main.go index c47a4dc9b..a5c6ef56a 100644 --- a/cmd/gotosocial/main.go +++ b/cmd/gotosocial/main.go @@ -16,6 +16,30 @@ along with this program. If not, see . */ +// Package classification awesome. +// +// Documentation of our awesome AaaaaaaaaaPI. +// +// Schemes: http +// BasePath: / +// Version: 1.0.0 +// Host: some-url.com +// +// Consumes: +// - application/json +// +// Produces: +// - application/json +// +// Security: +// - basic +// +// SecurityDefinitions: +// basic: +// type: basic +// +// swagger:meta + package main import ( @@ -23,6 +47,7 @@ import ( "github.com/sirupsen/logrus" + _ "github.com/superseriousbusiness/gotosocial/docs" "github.com/urfave/cli/v2" ) @@ -32,6 +57,7 @@ var Version string // Commit is the git commit of GtS being used var Commit string +//go:generate swagger generate spec func main() { var v string if Commit == "" { -- cgit v1.3