summaryrefslogtreecommitdiff
path: root/internal/api/model/field.go
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 /internal/api/model/field.go
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 'internal/api/model/field.go')
-rw-r--r--internal/api/model/field.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/internal/api/model/field.go b/internal/api/model/field.go
index 2e7662b2b..ae6b65272 100644
--- a/internal/api/model/field.go
+++ b/internal/api/model/field.go
@@ -18,16 +18,17 @@
package model
-// Field represents a profile field as a name-value pair with optional verification. See https://docs.joinmastodon.org/entities/field/
+// Field represents a name/value pair to display on an account's profile.
+//
+// swagger:model field
type Field struct {
- // REQUIRED
-
- // The key of a given field's key-value pair.
+ // The key/name of this field.
+ // example: pronouns
Name string `json:"name"`
- // The value associated with the name key.
+ // The value of this field.
+ // example: they/them
Value string `json:"value"`
-
- // OPTIONAL
- // Timestamp of when the server verified a URL value for a rel="me” link. String (ISO 8601 Datetime) if value is a verified URL
+ // If this field has been verified, when did this occur? (ISO 8601 Datetime).
+ // example: 2021-07-30T09:20:25+00:00
VerifiedAt string `json:"verified_at,omitempty"`
}