diff options
author | 2021-07-31 17:49:59 +0200 | |
---|---|---|
committer | 2021-07-31 17:49:59 +0200 | |
commit | 58dddd86e0ddbb0c6aa54506dcef162321babfbb (patch) | |
tree | ee83cec11f05dfe1e397b9303fe5cd7c2273d4f3 /internal/api/model/emoji.go | |
parent | Password change (#123) (diff) | |
download | gotosocial-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 'internal/api/model/emoji.go')
-rw-r--r-- | internal/api/model/emoji.go | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/internal/api/model/emoji.go b/internal/api/model/emoji.go index c2834718f..c1f81bf17 100644 --- a/internal/api/model/emoji.go +++ b/internal/api/model/emoji.go @@ -20,28 +20,32 @@ package model import "mime/multipart" -// Emoji represents a custom emoji. See https://docs.joinmastodon.org/entities/emoji/ +// Emoji represents a custom emoji. +// +// swagger:model emoji type Emoji struct { - // REQUIRED - // The name of the custom emoji. + // example: blobcat_uwu Shortcode string `json:"shortcode"` - // A link to the custom emoji. + // Web URL of the custom emoji. + // example: https://example.org/fileserver/emojis/blogcat_uwu.gif URL string `json:"url"` // A link to a static copy of the custom emoji. + // example: https://example.org/fileserver/emojis/blogcat_uwu.png StaticURL string `json:"static_url"` - // Whether this Emoji should be visible in the picker or unlisted. + // Emoji is visible in the emoji picker of the instance. + // example: true VisibleInPicker bool `json:"visible_in_picker"` - - // OPTIONAL - // Used for sorting custom emoji in the picker. + // example: blobcats Category string `json:"category,omitempty"` } // EmojiCreateRequest represents a request to create a custom emoji made through the admin API. +// swagger:model emojiCreateRequest type EmojiCreateRequest struct { // Desired shortcode for the emoji, without surrounding colons. This must be unique for the domain. + // example: blobcat_uwu Shortcode string `form:"shortcode" validation:"required"` // Image file to use for the emoji. Must be png or gif and no larger than 50kb. Image *multipart.FileHeader `form:"image" validation:"required"` |