refactor(api): ♻️ Move all client schema code to new package

This commit is contained in:
Jesse Wierzbinski 2025-03-22 02:34:03 +01:00
parent 52602c3da7
commit 3fe07a79b8
No known key found for this signature in database
128 changed files with 3904 additions and 169 deletions

View file

@ -0,0 +1,31 @@
import { z } from "@hono/zod-openapi";
export const ExtendedDescription = z
.object({
updated_at: z
.string()
.datetime()
.openapi({
description:
"A timestamp of when the extended description was last updated.",
example: "2025-01-12T13:11:00Z",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/ExtendedDescription/#updated_at",
},
}),
content: z.string().openapi({
description:
"The rendered HTML content of the extended description.",
example: "<p>We love casting spells.</p>",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/ExtendedDescription/#content",
},
}),
})
.openapi({
description:
"Represents an extended description for the instance, to be shown on its about page.",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/ExtendedDescription",
},
});