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'
---
docs/swagger.go | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 docs/swagger.go
(limited to 'docs/swagger.go')
diff --git a/docs/swagger.go b/docs/swagger.go
new file mode 100644
index 000000000..cb9c1f863
--- /dev/null
+++ b/docs/swagger.go
@@ -0,0 +1,52 @@
+/*
+ GoToSocial
+ Copyright (C) 2021 GoToSocial Authors admin@gotosocial.org
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+// Package docs GoToSocial
+//
+// GoToSocial Swagger documentation.
+//
+// Schemes: https, http
+// BasePath: /
+// Version: REPLACE_ME
+// Host: example.org
+// License: AGPL3 https://www.gnu.org/licenses/agpl-3.0.en.html
+// Contact: GoToSocial Authors
+// SecurityDefinitions:
+// OAuth2 Bearer:
+// type: oauth2
+// flow: accessCode
+// authorizationUrl: https://example.org/oauth/authorize
+// tokenUrl: https://example.org/oauth/token
+// scopes:
+// read: grants read access to everything
+// read:accounts: grants read access to accounts
+// write: grants write access to everything
+// write:accounts: grants write access to accounts
+// write:blocks: grants write access to blocks
+// write:follows: grants write access to follows
+// admin: grants admin access to everything
+// admin:accounts: grants admin access to accounts
+// OAuth2 Application:
+// type: oauth2
+// flow: application
+// tokenUrl: https://example.org/oauth/token
+// scopes:
+// write:accounts: grants write access to accounts
+//
+// swagger:meta
+package docs
--
cgit v1.2.3