mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
32 lines
942 B
TypeScript
32 lines
942 B
TypeScript
|
|
import { z } from "@hono/zod-openapi";
|
||
|
|
|
||
|
|
export const Tag = z
|
||
|
|
.object({
|
||
|
|
name: z
|
||
|
|
.string()
|
||
|
|
.min(1)
|
||
|
|
.max(128)
|
||
|
|
.openapi({
|
||
|
|
description: "The value of the hashtag after the # sign.",
|
||
|
|
example: "versia",
|
||
|
|
externalDocs: {
|
||
|
|
url: "https://docs.joinmastodon.org/entities/Status/#Tag-name",
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
url: z
|
||
|
|
.string()
|
||
|
|
.url()
|
||
|
|
.openapi({
|
||
|
|
description: "A link to the hashtag on the instance.",
|
||
|
|
example: "https://beta.versia.social/tags/versia",
|
||
|
|
externalDocs: {
|
||
|
|
url: "https://docs.joinmastodon.org/entities/Status/#Tag-url",
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
})
|
||
|
|
.openapi({
|
||
|
|
externalDocs: {
|
||
|
|
url: "https://docs.joinmastodon.org/entities/Status/#Tag",
|
||
|
|
},
|
||
|
|
});
|