@workos/oagen 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.mjs +4 -3
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{diff-BQn8Nv2c.mjs → diff-B9wlNAVX.mjs} +2 -2
- package/dist/{diff-BQn8Nv2c.mjs.map → diff-B9wlNAVX.mjs.map} +1 -1
- package/dist/index.d.mts +19 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/dist/scripts/smoke/baseline.mjs +4 -3
- package/dist/scripts/smoke/baseline.mjs.map +1 -1
- package/dist/smoke.mjs +4 -3
- package/dist/smoke.mjs.map +1 -1
- package/dist/verify/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -2461,13 +2461,14 @@ function flattenDiscriminatedUnionBody(schema) {
|
|
|
2461
2461
|
/** Derive a unique variant name for a oneOf inline model. */
|
|
2462
2462
|
function deriveOneOfVariantName(variant, baseName, existingModels) {
|
|
2463
2463
|
if (variant.properties) {
|
|
2464
|
-
for (const [, propSchema] of Object.entries(variant.properties)) if (propSchema?.const && typeof propSchema.const === "string") return toPascalCase(propSchema.const) + baseName.replace(/Request$/, "") + "Request";
|
|
2464
|
+
for (const [, propSchema] of Object.entries(variant.properties)) if (propSchema?.const && typeof propSchema.const === "string") return resolveSchemaName(toPascalCase(propSchema.const) + baseName.replace(/Request$/, "") + "Request");
|
|
2465
2465
|
}
|
|
2466
2466
|
const existingNames = new Set(existingModels.map((m) => m.name));
|
|
2467
|
-
|
|
2467
|
+
const transformedBaseName = resolveSchemaName(baseName);
|
|
2468
|
+
let name = transformedBaseName;
|
|
2468
2469
|
let suffix = 2;
|
|
2469
2470
|
while (existingNames.has(name)) {
|
|
2470
|
-
name = `${
|
|
2471
|
+
name = `${transformedBaseName}${suffix}`;
|
|
2471
2472
|
suffix++;
|
|
2472
2473
|
}
|
|
2473
2474
|
return name;
|