mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 09:30:09 +00:00
A few tweaks
This commit is contained in:
@@ -3,7 +3,11 @@ import { z } from "zod";
|
||||
import { AppConnections } from "@app/lib/api-docs";
|
||||
|
||||
export const BaseSqlUsernameAndPasswordConnectionSchema = z.object({
|
||||
gatewayId: z.string().optional(),
|
||||
gatewayId: z
|
||||
.union([z.string().uuid(), z.literal("")])
|
||||
.transform((value) => value || null)
|
||||
.nullish()
|
||||
.describe(AppConnections.CREDENTIALS.SQL_CONNECTION.gatewayId),
|
||||
host: z.string().trim().min(1, "Host required").describe(AppConnections.CREDENTIALS.SQL_CONNECTION.host),
|
||||
port: z.coerce.number().describe(AppConnections.CREDENTIALS.SQL_CONNECTION.port),
|
||||
database: z.string().trim().min(1, "Database required").describe(AppConnections.CREDENTIALS.SQL_CONNECTION.database),
|
||||
|
||||
Reference in New Issue
Block a user