refactor: ⬆️ Upgrade to Zod v4 and hono-openapi 0.5.0

This commit is contained in:
Jesse Wierzbinski 2025-07-07 03:42:35 +02:00
parent add2429606
commit 24d4150da4
No known key found for this signature in database
209 changed files with 1331 additions and 1622 deletions

View file

@ -1,19 +1,16 @@
import { z } from "zod";
import { z } from "zod/v4";
export const PrivacyPolicy = z
.object({
updated_at: z
.string()
.datetime()
.openapi({
description:
"A timestamp of when the privacy policy was last updated.",
example: "2025-01-12T13:11:00Z",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/PrivacyPolicy/#updated_at",
},
}),
content: z.string().openapi({
updated_at: z.iso.datetime().meta({
description:
"A timestamp of when the privacy policy was last updated.",
example: "2025-01-12T13:11:00Z",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/PrivacyPolicy/#updated_at",
},
}),
content: z.string().meta({
description: "The rendered HTML content of the privacy policy.",
example: "<p><h1>Privacy Policy</h1><p>None, good luck.</p></p>",
externalDocs: {
@ -21,10 +18,10 @@ export const PrivacyPolicy = z
},
}),
})
.openapi({
.meta({
description: "Represents the privacy policy of the instance.",
externalDocs: {
url: "https://docs.joinmastodon.org/entities/PrivacyPolicy",
},
ref: "PrivacyPolicy",
id: "PrivacyPolicy",
});