mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 13:19: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,22 +1,22 @@
|
|||
import { z } from "zod";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
export const Appeal = z
|
||||
.object({
|
||||
text: z.string().openapi({
|
||||
text: z.string().meta({
|
||||
description:
|
||||
"Text of the appeal from the moderated account to the moderators.",
|
||||
example: "I believe this action was taken in error.",
|
||||
}),
|
||||
state: z.enum(["approved", "rejected", "pending"]).openapi({
|
||||
state: z.enum(["approved", "rejected", "pending"]).meta({
|
||||
description:
|
||||
"State of the appeal. 'approved' = The appeal has been approved by a moderator, 'rejected' = The appeal has been rejected by a moderator, 'pending' = The appeal has been submitted, but neither approved nor rejected yet.",
|
||||
example: "pending",
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
.meta({
|
||||
description: "Appeal against a moderation action.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Appeal",
|
||||
},
|
||||
ref: "Appeal",
|
||||
id: "Appeal",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue