From 8eeede9c3534fa465a6b63a33922f881508aaa34 Mon Sep 17 00:00:00 2001 From: ewin Date: Mon, 3 Mar 2025 16:18:07 -0500 Subject: [PATCH] Update API docs go run github.com/go-swagger/go-swagger/cmd/swagger generate spec --scan-models --exclude-deps --output docs/api/swagger.yaml --- docs/api/swagger.yaml | 26 ++++++++++++++++++++++++++ internal/api/model/status.go | 3 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index c8b263afe..eb4309e90 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -2993,6 +2993,19 @@ definitions: example:

Hey this is a status!

type: string x-go-name: Content + content_type: + description: |- + Content type that was used to parse this revision's text. + text/plain StatusContentTypePlain + text/markdown StatusContentTypeMarkdown + enum: + - text/plain + - text/markdown + type: string + x-go-enum-desc: |- + text/plain StatusContentTypePlain + text/markdown StatusContentTypeMarkdown + x-go-name: ContentType created_at: description: The date when this revision was created (ISO 8601 Datetime). example: "2021-07-30T09:20:25+00:00" @@ -3186,6 +3199,19 @@ definitions: StatusSource represents the source text of a status as submitted to the API when it was created. properties: + content_type: + description: |- + Content type that was used to parse the text. + text/plain StatusContentTypePlain + text/markdown StatusContentTypeMarkdown + enum: + - text/plain + - text/markdown + type: string + x-go-enum-desc: |- + text/plain StatusContentTypePlain + text/markdown StatusContentTypeMarkdown + x-go-name: ContentType id: description: ID of the status. example: 01FBVD42CQ3ZEEVMW180SBX03B diff --git a/internal/api/model/status.go b/internal/api/model/status.go index 09a3605f1..b4b68a002 100644 --- a/internal/api/model/status.go +++ b/internal/api/model/status.go @@ -293,8 +293,7 @@ const ( // StatusContentType is the content type with which to parse the submitted status. // Can be either text/plain or text/markdown. Empty will default to text/plain. // -// swagger:enum statusContentType -// swagger:type string +// swagger:enum StatusContentType type StatusContentType string // Content type to use when parsing submitted