mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(api): 🏷️ Port Account OpenAPI schemas from Mastodon API docs
This commit is contained in:
parent
76d1ccc859
commit
2aeada4904
95 changed files with 610 additions and 388 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { z } from "@hono/zod-openapi";
|
||||
import {
|
||||
ADMIN_ROLES,
|
||||
DEFAULT_ROLES,
|
||||
RolePermissions,
|
||||
} from "@versia/kit/tables";
|
||||
import { types as mimeTypes } from "mime-types";
|
||||
import { z } from "zod";
|
||||
|
||||
export enum MediaBackendType {
|
||||
Local = "local",
|
||||
|
|
@ -26,6 +26,11 @@ const zUrl = z
|
|||
.transform((arg) => arg.replace(/\/$/, ""))
|
||||
.transform((arg) => new URL(arg));
|
||||
|
||||
export const zBoolean = z
|
||||
.string()
|
||||
.transform((v) => ["true", "1", "on"].includes(v.toLowerCase()))
|
||||
.or(z.boolean());
|
||||
|
||||
export const configValidator = z
|
||||
.object({
|
||||
database: z
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue