summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-31 17:49:59 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-31 17:49:59 +0200
commit58dddd86e0ddbb0c6aa54506dcef162321babfbb (patch)
treeee83cec11f05dfe1e397b9303fe5cd7c2273d4f3 /cmd
parentPassword change (#123) (diff)
downloadgotosocial-58dddd86e0ddbb0c6aa54506dcef162321babfbb.tar.xz
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'
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/main.go26
1 files changed, 26 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
*/
+// 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 == "" {