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,24 +1,24 @@
|
|||
import { z } from "zod";
|
||||
import { z } from "zod/v4";
|
||||
import { Account } from "./account.ts";
|
||||
import { Status } from "./status.ts";
|
||||
import { Tag } from "./tag.ts";
|
||||
|
||||
export const Search = z
|
||||
.object({
|
||||
accounts: z.array(Account).openapi({
|
||||
accounts: z.array(Account).meta({
|
||||
description: "Accounts which match the given query",
|
||||
}),
|
||||
statuses: z.array(Status).openapi({
|
||||
statuses: z.array(Status).meta({
|
||||
description: "Statuses which match the given query",
|
||||
}),
|
||||
hashtags: z.array(Tag).openapi({
|
||||
hashtags: z.array(Tag).meta({
|
||||
description: "Hashtags which match the given query",
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
.meta({
|
||||
description: "Represents the results of a search.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Search",
|
||||
},
|
||||
ref: "Search",
|
||||
id: "Search",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue