summaryrefslogtreecommitdiff
path: root/docs/api/swagger.md
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 /docs/api/swagger.md
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 'docs/api/swagger.md')
-rw-r--r--docs/api/swagger.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/api/swagger.md b/docs/api/swagger.md
new file mode 100644
index 000000000..50191f18d
--- /dev/null
+++ b/docs/api/swagger.md
@@ -0,0 +1,9 @@
+# API Documentation
+
+GoToSocial uses [go-swagger](https://github.com/go-swagger/go-swagger) to generate a V2 [OpenAPI specification](https://swagger.io/specification/v2/) document from code annotations.
+
+The resulting API documentation is rendered below, for quick reference.
+
+If you'd like to do more with the spec, you can also view the [swagger.yaml](/api/swagger/swagger.yaml) directly, and then paste it into something like the [Swagger Editor](https://editor.swagger.io/) in order to autogenerate GoToSocial API clients in different languages, convert the doc to JSON or OpenAPI v3 specification, etc. See [here](https://swagger.io/tools/open-source/getting-started/) for more.
+
+!!swagger swagger.yaml!!