From f3bee70c23824f2e572a7018b13e740499935825 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 21:28:39 +0000 Subject: [PATCH] Reformat generated OpenAPI response schemas for readability Agent-Logs-Url: https://github.com/fosrl/pangolin/sessions/7b395a8e-7fae-4f4d-952e-4030fea08262 Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com> --- .../routers/alertRule/updateAlertRule.ts | 4 +++- .../createEventStreamingDestination.ts | 4 +++- .../updateEventStreamingDestination.ts | 4 +++- .../routers/healthChecks/createHealthCheck.ts | 4 +++- .../routers/healthChecks/updateHealthCheck.ts | 23 ++++++++++++++++++- .../routers/orgIdp/updateOrgOidcIdp.ts | 4 +++- server/routers/apiKeys/createOrgApiKey.ts | 8 ++++++- server/routers/client/pickClientDefaults.ts | 6 ++++- server/routers/domain/updateDomain.ts | 6 ++++- server/routers/idp/createOidcIdp.ts | 5 +++- server/routers/idp/updateOidcIdp.ts | 4 +++- server/routers/org/getOrg.ts | 4 +++- server/routers/site/pickSiteDefaults.ts | 13 ++++++++++- server/routers/user/adminUpdateUser2FA.ts | 5 +++- server/routers/user/inviteUser.ts | 5 +++- 15 files changed, 84 insertions(+), 15 deletions(-) diff --git a/server/private/routers/alertRule/updateAlertRule.ts b/server/private/routers/alertRule/updateAlertRule.ts index d4fdaf87b..690a97d29 100644 --- a/server/private/routers/alertRule/updateAlertRule.ts +++ b/server/private/routers/alertRule/updateAlertRule.ts @@ -149,7 +149,9 @@ const bodySchema = z export type UpdateAlertRuleResponse = { alertRuleId: number; }; -const UpdateAlertRuleResponseDataSchema = z.object({alertRuleId: z.number()}); +const UpdateAlertRuleResponseDataSchema = z.object({ + alertRuleId: z.number() +}); registry.registerPath({ diff --git a/server/private/routers/eventStreamingDestination/createEventStreamingDestination.ts b/server/private/routers/eventStreamingDestination/createEventStreamingDestination.ts index 444e187f4..5050c55e8 100644 --- a/server/private/routers/eventStreamingDestination/createEventStreamingDestination.ts +++ b/server/private/routers/eventStreamingDestination/createEventStreamingDestination.ts @@ -43,7 +43,9 @@ const bodySchema = z.strictObject({ export type CreateEventStreamingDestinationResponse = { destinationId: number; }; -const CreateEventStreamingDestinationResponseDataSchema = z.object({destinationId: z.number()}); +const CreateEventStreamingDestinationResponseDataSchema = z.object({ + destinationId: z.number() +}); registry.registerPath({ diff --git a/server/private/routers/eventStreamingDestination/updateEventStreamingDestination.ts b/server/private/routers/eventStreamingDestination/updateEventStreamingDestination.ts index 0eae09537..adbac2cca 100644 --- a/server/private/routers/eventStreamingDestination/updateEventStreamingDestination.ts +++ b/server/private/routers/eventStreamingDestination/updateEventStreamingDestination.ts @@ -46,7 +46,9 @@ const bodySchema = z.strictObject({ export type UpdateEventStreamingDestinationResponse = { destinationId: number; }; -const UpdateEventStreamingDestinationResponseDataSchema = z.object({destinationId: z.number()}); +const UpdateEventStreamingDestinationResponseDataSchema = z.object({ + destinationId: z.number() +}); registry.registerPath({ diff --git a/server/private/routers/healthChecks/createHealthCheck.ts b/server/private/routers/healthChecks/createHealthCheck.ts index 86ad8a042..aa3706833 100644 --- a/server/private/routers/healthChecks/createHealthCheck.ts +++ b/server/private/routers/healthChecks/createHealthCheck.ts @@ -53,7 +53,9 @@ const bodySchema = z.strictObject({ export type CreateHealthCheckResponse = { targetHealthCheckId: number; }; -const CreateHealthCheckResponseDataSchema = z.object({targetHealthCheckId: z.number()}); +const CreateHealthCheckResponseDataSchema = z.object({ + targetHealthCheckId: z.number() +}); registry.registerPath({ diff --git a/server/private/routers/healthChecks/updateHealthCheck.ts b/server/private/routers/healthChecks/updateHealthCheck.ts index cb99b48f5..f08324f9b 100644 --- a/server/private/routers/healthChecks/updateHealthCheck.ts +++ b/server/private/routers/healthChecks/updateHealthCheck.ts @@ -82,7 +82,28 @@ export type UpdateHealthCheckResponse = { hcHealthyThreshold: number | null; hcUnhealthyThreshold: number | null; }; -const UpdateHealthCheckResponseDataSchema = z.object({targetHealthCheckId: z.number(), name: z.string().nullable(), siteId: z.number().nullable(), hcEnabled: z.boolean(), hcHealth: z.string().nullable(), hcMode: z.string().nullable(), hcHostname: z.string().nullable(), hcPort: z.number().nullable(), hcPath: z.string().nullable(), hcScheme: z.string().nullable(), hcMethod: z.string().nullable(), hcInterval: z.number().nullable(), hcUnhealthyInterval: z.number().nullable(), hcTimeout: z.number().nullable(), hcHeaders: z.string().nullable(), hcFollowRedirects: z.boolean().nullable(), hcStatus: z.number().nullable(), hcTlsServerName: z.string().nullable(), hcHealthyThreshold: z.number().nullable(), hcUnhealthyThreshold: z.number().nullable()}); +const UpdateHealthCheckResponseDataSchema = z.object({ + targetHealthCheckId: z.number(), + name: z.string().nullable(), + siteId: z.number().nullable(), + hcEnabled: z.boolean(), + hcHealth: z.string().nullable(), + hcMode: z.string().nullable(), + hcHostname: z.string().nullable(), + hcPort: z.number().nullable(), + hcPath: z.string().nullable(), + hcScheme: z.string().nullable(), + hcMethod: z.string().nullable(), + hcInterval: z.number().nullable(), + hcUnhealthyInterval: z.number().nullable(), + hcTimeout: z.number().nullable(), + hcHeaders: z.string().nullable(), + hcFollowRedirects: z.boolean().nullable(), + hcStatus: z.number().nullable(), + hcTlsServerName: z.string().nullable(), + hcHealthyThreshold: z.number().nullable(), + hcUnhealthyThreshold: z.number().nullable() +}); registry.registerPath({ diff --git a/server/private/routers/orgIdp/updateOrgOidcIdp.ts b/server/private/routers/orgIdp/updateOrgOidcIdp.ts index bb5d35b7f..9d4698e3c 100644 --- a/server/private/routers/orgIdp/updateOrgOidcIdp.ts +++ b/server/private/routers/orgIdp/updateOrgOidcIdp.ts @@ -55,7 +55,9 @@ const bodySchema = z.strictObject({ export type UpdateOrgIdpResponse = { idpId: number; }; -const UpdateOrgIdpResponseDataSchema = z.object({idpId: z.number()}); +const UpdateOrgIdpResponseDataSchema = z.object({ + idpId: z.number() +}); registry.registerPath({ diff --git a/server/routers/apiKeys/createOrgApiKey.ts b/server/routers/apiKeys/createOrgApiKey.ts index 7a2995523..de3fb32b7 100644 --- a/server/routers/apiKeys/createOrgApiKey.ts +++ b/server/routers/apiKeys/createOrgApiKey.ts @@ -33,7 +33,13 @@ export type CreateOrgApiKeyResponse = { lastChars: string; createdAt: string; }; -const CreateOrgApiKeyResponseDataSchema = z.object({apiKeyId: z.string(), name: z.string(), apiKey: z.string(), lastChars: z.string(), createdAt: z.string()}); +const CreateOrgApiKeyResponseDataSchema = z.object({ + apiKeyId: z.string(), + name: z.string(), + apiKey: z.string(), + lastChars: z.string(), + createdAt: z.string() +}); registry.registerPath({ diff --git a/server/routers/client/pickClientDefaults.ts b/server/routers/client/pickClientDefaults.ts index ab38a46a9..2ed7ddbce 100644 --- a/server/routers/client/pickClientDefaults.ts +++ b/server/routers/client/pickClientDefaults.ts @@ -15,7 +15,11 @@ export type PickClientDefaultsResponse = { olmSecret: string; subnet: string; }; -const PickClientDefaultsResponseDataSchema = z.object({olmId: z.string(), olmSecret: z.string(), subnet: z.string()}); +const PickClientDefaultsResponseDataSchema = z.object({ + olmId: z.string(), + olmSecret: z.string(), + subnet: z.string() +}); const pickClientDefaultsSchema = z.strictObject({ diff --git a/server/routers/domain/updateDomain.ts b/server/routers/domain/updateDomain.ts index a03312916..61b99f542 100644 --- a/server/routers/domain/updateDomain.ts +++ b/server/routers/domain/updateDomain.ts @@ -25,7 +25,11 @@ export type UpdateDomainResponse = { certResolver: string | null; preferWildcardCert: boolean | null; }; -const UpdateDomainResponseDataSchema = z.object({domainId: z.string(), certResolver: z.string().nullable(), preferWildcardCert: z.boolean().nullable()}); +const UpdateDomainResponseDataSchema = z.object({ + domainId: z.string(), + certResolver: z.string().nullable(), + preferWildcardCert: z.boolean().nullable() +}); registry.registerPath({ diff --git a/server/routers/idp/createOidcIdp.ts b/server/routers/idp/createOidcIdp.ts index 48e4b75b4..813ab0ea5 100644 --- a/server/routers/idp/createOidcIdp.ts +++ b/server/routers/idp/createOidcIdp.ts @@ -34,7 +34,10 @@ export type CreateIdpResponse = { idpId: number; redirectUrl: string; }; -const CreateIdpResponseDataSchema = z.object({idpId: z.number(), redirectUrl: z.string()}); +const CreateIdpResponseDataSchema = z.object({ + idpId: z.number(), + redirectUrl: z.string() +}); registry.registerPath({ diff --git a/server/routers/idp/updateOidcIdp.ts b/server/routers/idp/updateOidcIdp.ts index 8f54c8e72..69b77770f 100644 --- a/server/routers/idp/updateOidcIdp.ts +++ b/server/routers/idp/updateOidcIdp.ts @@ -39,7 +39,9 @@ const bodySchema = z.strictObject({ export type UpdateIdpResponse = { idpId: number; }; -const UpdateIdpResponseDataSchema = z.object({idpId: z.number()}); +const UpdateIdpResponseDataSchema = z.object({ + idpId: z.number() +}); registry.registerPath({ diff --git a/server/routers/org/getOrg.ts b/server/routers/org/getOrg.ts index ad5af2379..642efb5b9 100644 --- a/server/routers/org/getOrg.ts +++ b/server/routers/org/getOrg.ts @@ -18,7 +18,9 @@ const getOrgSchema = z.strictObject({ export type GetOrgResponse = { org: Org; }; -const GetOrgResponseDataSchema = z.object({org: z.object({}).passthrough()}); +const GetOrgResponseDataSchema = z.object({ + org: z.object({}).passthrough() +}); registry.registerPath({ diff --git a/server/routers/site/pickSiteDefaults.ts b/server/routers/site/pickSiteDefaults.ts index ec29b9a31..39d1e459d 100644 --- a/server/routers/site/pickSiteDefaults.ts +++ b/server/routers/site/pickSiteDefaults.ts @@ -30,7 +30,18 @@ export type PickSiteDefaultsResponse = { newtSecret: string; clientAddress?: string; }; -const PickSiteDefaultsResponseDataSchema = z.object({exitNodeId: z.number(), address: z.string(), publicKey: z.string(), name: z.string(), listenPort: z.number(), endpoint: z.string(), subnet: z.string(), newtId: z.string(), newtSecret: z.string(), clientAddress: z.string().optional()}); +const PickSiteDefaultsResponseDataSchema = z.object({ + exitNodeId: z.number(), + address: z.string(), + publicKey: z.string(), + name: z.string(), + listenPort: z.number(), + endpoint: z.string(), + subnet: z.string(), + newtId: z.string(), + newtSecret: z.string(), + clientAddress: z.string().optional() +}); registry.registerPath({ diff --git a/server/routers/user/adminUpdateUser2FA.ts b/server/routers/user/adminUpdateUser2FA.ts index 8760dec83..effc17aa2 100644 --- a/server/routers/user/adminUpdateUser2FA.ts +++ b/server/routers/user/adminUpdateUser2FA.ts @@ -23,7 +23,10 @@ export type UpdateUser2FAResponse = { userId: string; twoFactorRequested: boolean; }; -const UpdateUser2FAResponseDataSchema = z.object({userId: z.string(), twoFactorRequested: z.boolean()}); +const UpdateUser2FAResponseDataSchema = z.object({ + userId: z.string(), + twoFactorRequested: z.boolean() +}); registry.registerPath({ diff --git a/server/routers/user/inviteUser.ts b/server/routers/user/inviteUser.ts index d1baff12d..c4feb820f 100644 --- a/server/routers/user/inviteUser.ts +++ b/server/routers/user/inviteUser.ts @@ -68,7 +68,10 @@ export type InviteUserResponse = { inviteLink: string; expiresAt: number; }; -const InviteUserResponseDataSchema = z.object({inviteLink: z.string(), expiresAt: z.number()}); +const InviteUserResponseDataSchema = z.object({ + inviteLink: z.string(), + expiresAt: z.number() +}); registry.registerPath({