diff options
author | 2021-08-02 19:06:44 +0200 | |
---|---|---|
committer | 2021-08-02 19:06:44 +0200 | |
commit | 0386a28b5a3c4212320e8a96ddd14c54b65a2090 (patch) | |
tree | 3bfdf198934215ac64acac9d66d952baf65c2752 /internal/api/client/app/appcreate.go | |
parent | fix breaky linky (diff) | |
download | gotosocial-0386a28b5a3c4212320e8a96ddd14c54b65a2090.tar.xz |
Frodo swaggins (#126)
* more swagger fun
* document a whole bunch more stuff
* more swagger yayyyyyyy
* progress + go fmt
Diffstat (limited to 'internal/api/client/app/appcreate.go')
-rw-r--r-- | internal/api/client/app/appcreate.go | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/internal/api/client/app/appcreate.go b/internal/api/client/app/appcreate.go index fd42482d4..31072f9c8 100644 --- a/internal/api/client/app/appcreate.go +++ b/internal/api/client/app/appcreate.go @@ -27,8 +27,41 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/oauth" ) -// AppsPOSTHandler should be served at https://example.org/api/v1/apps -// It is equivalent to: https://docs.joinmastodon.org/methods/apps/ +// AppsPOSTHandler swagger:operation POST /api/v1/apps appCreate +// +// Register a new application on this instance. +// +// The registered application can be used to obtain an application token. +// This can then be used to register a new account, or (through user auth) obtain an access token. +// +// The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. +// The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. +// +// --- +// tags: +// - apps +// +// consumes: +// - application/json +// - application/xml +// - application/x-www-form-urlencoded +// +// produces: +// - application/json +// +// responses: +// '200': +// description: "The newly-created application." +// schema: +// "$ref": "#/definitions/application" +// '401': +// description: unauthorized +// '400': +// description: bad request +// '422': +// description: unprocessable +// '500': +// description: internal error func (m *Module) AppsPOSTHandler(c *gin.Context) { l := m.log.WithField("func", "AppsPOSTHandler") l.Trace("entering AppsPOSTHandler") |