chore: update @dokploy/trpc-openapi to version 0.0.14 and swagger-ui-react to version 5.31.2; refactor OpenAPI document handling in swagger.tsx and settings.ts for improved compatibility and clarity

This commit is contained in:
Mauricio Siu
2026-02-24 01:07:23 -06:00
parent 7c534d62b6
commit 331b12c7d8
31 changed files with 718 additions and 721 deletions
+39 -32
View File
@@ -172,24 +172,26 @@ const createSchema = createInsertSchema(compose, {
watchPaths: z.array(z.string()).optional(),
});
export const apiCreateCompose = createSchema.pick({
name: true,
description: true,
environmentId: true,
composeType: true,
appName: true,
serverId: true,
composeFile: true,
export const apiCreateCompose = z.object({
name: z.string().min(1),
description: z.string().optional(),
environmentId: z.string().min(1),
composeType: z.enum(["docker-compose", "stack"]).optional(),
appName: z
.string()
.min(1)
.max(63)
.regex(APP_NAME_REGEX, APP_NAME_MESSAGE)
.optional(),
serverId: z.string().optional(),
composeFile: z.string().optional(),
});
export const apiCreateComposeByTemplate = createSchema
.pick({
environmentId: true,
})
.extend({
id: z.string().min(1),
serverId: z.string().optional(),
});
export const apiCreateComposeByTemplate = z.object({
environmentId: z.string().min(1),
id: z.string().min(1),
serverId: z.string().optional(),
});
export const apiFindCompose = z.object({
composeId: z.string().min(1),
@@ -217,20 +219,25 @@ export const apiFetchServices = z.object({
type: z.enum(["fetch", "cache"]).optional().default("cache"),
});
export const apiUpdateCompose = createSchema
.partial()
.extend({
composeId: z.string(),
composeFile: z.string().optional(),
command: z.string().optional(),
})
.omit({ serverId: true });
export const apiUpdateCompose = z.object({
composeId: z.string().min(1),
composeFile: z.string().optional(),
command: z.string().optional(),
name: z.string().min(1).optional(),
description: z.string().optional(),
env: z.string().optional(),
appName: z.string().optional(),
environmentId: z.string().optional(),
composeType: z.enum(["docker-compose", "stack"]).optional(),
sourceType: z
.enum(["git", "github", "gitlab", "bitbucket", "gitea", "raw"])
.optional(),
triggerType: z.enum(["push", "tag"]).optional(),
watchPaths: z.array(z.string()).optional(),
composePath: z.string().min(1).optional(),
});
export const apiRandomizeCompose = createSchema
.pick({
composeId: true,
})
.extend({
suffix: z.string().optional(),
composeId: z.string().min(1),
});
export const apiRandomizeCompose = z.object({
composeId: z.string().min(1),
suffix: z.string().optional(),
});