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,27 +1,27 @@
|
|||
import { z } from "zod";
|
||||
import { z } from "zod/v4";
|
||||
import { Id } from "./common.ts";
|
||||
|
||||
export const Marker = z
|
||||
.object({
|
||||
last_read_id: Id.openapi({
|
||||
last_read_id: Id.meta({
|
||||
description: "The ID of the most recently viewed entity.",
|
||||
example: "ead15c9d-8eda-4b2c-9546-ecbf851f001c",
|
||||
}),
|
||||
version: z.number().openapi({
|
||||
version: z.number().meta({
|
||||
description:
|
||||
"An incrementing counter, used for locking to prevent write conflicts.",
|
||||
example: 462,
|
||||
}),
|
||||
updated_at: z.string().datetime().openapi({
|
||||
updated_at: z.iso.datetime().meta({
|
||||
description: "The timestamp of when the marker was set.",
|
||||
example: "2025-01-12T13:11:00Z",
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
.meta({
|
||||
description:
|
||||
"Represents the last read position within a user's timelines.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Marker",
|
||||
},
|
||||
ref: "Marker",
|
||||
id: "Marker",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue