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/model/application.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/model/application.go')
-rw-r--r-- | internal/api/model/application.go | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/internal/api/model/application.go b/internal/api/model/application.go index 6f949ec3e..2b663f54b 100644 --- a/internal/api/model/application.go +++ b/internal/api/model/application.go @@ -18,8 +18,7 @@ package model -// Application represents an api Application, as defined here. -// Primarily, application is used for allowing apps like Tusky etc to connect to Mastodon on behalf of a user. +// Application models an api application. // // swagger:model application type Application struct { @@ -43,18 +42,30 @@ type Application struct { VapidKey string `json:"vapid_key,omitempty"` } -// ApplicationCreateRequest represents a POST request to https://example.org/api/v1/apps. -// See here: https://docs.joinmastodon.org/methods/apps/ -// And here: https://docs.joinmastodon.org/client/token/ +// ApplicationCreateRequest models app create parameters. +// +// swagger:parameters appCreate type ApplicationCreateRequest struct { - // A name for your application + // The name of the application. + // + // in: formData + // required: true ClientName string `form:"client_name" json:"client_name" xml:"client_name" binding:"required"` // Where the user should be redirected after authorization. - // To display the authorization code to the user instead of redirecting - // to a web page, use urn:ietf:wg:oauth:2.0:oob in this parameter. + // + // To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter. + // + // in: formData + // required: true RedirectURIs string `form:"redirect_uris" json:"redirect_uris" xml:"redirect_uris" binding:"required"` - // Space separated list of scopes. If none is provided, defaults to read. + // Space separated list of scopes. + // + // If no scopes are provided, defaults to `read`. + // + // in: formData Scopes string `form:"scopes" json:"scopes" xml:"scopes"` - // A URL to the homepage of your app + // A URL to the web page of the app (optional). + // + // in: formData Website string `form:"website" json:"website" xml:"website"` } |