mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 05:09:16 +02:00
refactor: ⬆️ Upgrade to Zod v4 and hono-openapi 0.5.0
This commit is contained in:
parent
add2429606
commit
24d4150da4
209 changed files with 1331 additions and 1622 deletions
|
|
@ -1,19 +1,16 @@
|
|||
import { z } from "zod";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
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({
|
||||
updated_at: z.iso.datetime().meta({
|
||||
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().meta({
|
||||
description:
|
||||
"The rendered HTML content of the extended description.",
|
||||
example: "<p>We love casting spells.</p>",
|
||||
|
|
@ -22,11 +19,11 @@ export const ExtendedDescription = z
|
|||
},
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
.meta({
|
||||
description:
|
||||
"Represents an extended description for the instance, to be shown on its about page.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/ExtendedDescription",
|
||||
},
|
||||
ref: "ExtendedDescription",
|
||||
id: "ExtendedDescription",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue