From 2d838fb84c0ede758873da2234e5f44836d44b54 Mon Sep 17 00:00:00 2001 From: "Garen J. Torikian" Date: Tue, 19 May 2026 08:40:12 -0400 Subject: [PATCH] fix(config): strip trailing `Json` suffix from generated schema names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Schemas in the spec carry a `Json` suffix (`WebhookEndpointJson`, `AuditLogExportJson`, `AuditLogsRetentionJson`, `AuditLogSchemaJson`, `AuditLogActionJson`) that leaks straight through into SDK type names — no other resource in the SDK uses this convention. Strip the trailing `Json` from schema names so consumers see `WebhookEndpoint` instead of `WebhookEndpointJson` (and derived enum names like `WebhookEndpointStatus` instead of `WebhookEndpointJsonStatus`). Pattern is anchored to end-of-name so a hypothetical `JsonSchema` schema (or anything with `Json` in the middle) is left alone. All existing `Json`-suffixed schemas are surveyed and confirmed to be pure suffixes. Co-Authored-By: Claude Opus 4.7 (1M context) --- oagen.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/oagen.config.ts b/oagen.config.ts index e574fc6..040bc91 100644 --- a/oagen.config.ts +++ b/oagen.config.ts @@ -456,6 +456,7 @@ const config: OagenConfig = { return name .replace(/Dto/g, '') .replace(/DTO/g, '') + .replace(/Json$/, '') .replace(/^Urn(?:IetfParams|Workos)O[Aa]uthGrantType/, ''); }, operationHints,