* 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'
This commit is contained in:
Tobi Smethurst 2021-07-31 17:49:59 +02:00 committed by GitHub
commit 58dddd86e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 2355 additions and 169 deletions

View file

@ -18,12 +18,15 @@
package model
// Poll represents the mastodon-api poll type, as described here: https://docs.joinmastodon.org/entities/poll/
// Poll represents a poll attached to a status.
//
// swagger:model poll
type Poll struct {
// The ID of the poll in the database.
// example: 01FBYKMD1KBMJ0W6JF1YZ3VY5D
ID string `json:"id"`
// When the poll ends. (ISO 8601 Datetime), or null if the poll does not end
ExpiresAt string `json:"expires_at"`
ExpiresAt string `json:"expires_at,omitempty"`
// Is the poll currently expired?
Expired bool `json:"expired"`
// Does the poll allow multiple-choice answers?
@ -42,7 +45,9 @@ type Poll struct {
Emojis []Emoji `json:"emojis"`
}
// PollOptions represents the current vote counts for different poll options
// PollOptions represents the current vote counts for different poll options.
//
// swagger:model pollOptions
type PollOptions struct {
// The text value of the poll option. String.
Title string `json:"title"`