fern-api 0.31.23 → 0.31.24
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/bundle.cjs +18 -16
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1122319,7 +1122319,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1122319
1122319
|
properties: {
|
|
1122320
1122320
|
...event,
|
|
1122321
1122321
|
...event.properties,
|
|
1122322
|
-
version: "0.31.
|
|
1122322
|
+
version: "0.31.24",
|
|
1122323
1122323
|
usingAccessToken: true
|
|
1122324
1122324
|
}
|
|
1122325
1122325
|
});
|
|
@@ -1122381,7 +1122381,7 @@ var UserPosthogManager = class {
|
|
|
1122381
1122381
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1122382
1122382
|
event: "CLI",
|
|
1122383
1122383
|
properties: {
|
|
1122384
|
-
version: "0.31.
|
|
1122384
|
+
version: "0.31.24",
|
|
1122385
1122385
|
...event,
|
|
1122386
1122386
|
...event.properties
|
|
1122387
1122387
|
}
|
|
@@ -1137523,7 +1137523,8 @@ var FernOpenAPIExtension = {
|
|
|
1137523
1137523
|
FERN_GLOBAL_HEADERS: "x-fern-global-headers",
|
|
1137524
1137524
|
FERN_IDEMPOTENCY_HEADERS: "x-fern-idempotency-headers",
|
|
1137525
1137525
|
IDEMPOTENT: "x-fern-idempotent",
|
|
1137526
|
-
FERN_PROPERTY_NAME: "x-fern-property-name"
|
|
1137526
|
+
FERN_PROPERTY_NAME: "x-fern-property-name",
|
|
1137527
|
+
IS_UNDISCRIMINATED: "x-fern-undiscriminated"
|
|
1137527
1137528
|
};
|
|
1137528
1137529
|
|
|
1137529
1137530
|
// pnp:/home/runner/work/fern/fern/packages/cli/openapi-parser/lib/openapi/v3/extensions/getFernEnum.js
|
|
@@ -1139390,29 +1139391,30 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
|
|
|
1139390
1139391
|
}
|
|
1139391
1139392
|
}
|
|
1139392
1139393
|
if (schema2.oneOf != null && schema2.oneOf.length > 0) {
|
|
1139394
|
+
const isUndiscriminated = getExtension(schema2, FernOpenAPIExtension.IS_UNDISCRIMINATED);
|
|
1139393
1139395
|
if (schema2.discriminator != null && schema2.discriminator.mapping != null && Object.keys(schema2.discriminator.mapping).length > 0) {
|
|
1139394
|
-
if (
|
|
1139395
|
-
return
|
|
1139396
|
+
if (context.options.discriminatedUnionV2 || isUndiscriminated) {
|
|
1139397
|
+
return convertUndiscriminatedOneOfWithDiscriminant({
|
|
1139396
1139398
|
nameOverride,
|
|
1139397
1139399
|
generatedName,
|
|
1139398
|
-
breadcrumbs,
|
|
1139399
1139400
|
description,
|
|
1139400
|
-
discriminator: schema2.discriminator,
|
|
1139401
|
-
properties: schema2.properties ?? {},
|
|
1139402
|
-
required: schema2.required,
|
|
1139403
1139401
|
wrapAsNullable,
|
|
1139404
1139402
|
context,
|
|
1139405
|
-
groupName
|
|
1139403
|
+
groupName,
|
|
1139404
|
+
discriminator: schema2.discriminator
|
|
1139406
1139405
|
});
|
|
1139407
1139406
|
} else {
|
|
1139408
|
-
return
|
|
1139407
|
+
return convertDiscriminatedOneOf({
|
|
1139409
1139408
|
nameOverride,
|
|
1139410
1139409
|
generatedName,
|
|
1139410
|
+
breadcrumbs,
|
|
1139411
1139411
|
description,
|
|
1139412
|
+
discriminator: schema2.discriminator,
|
|
1139413
|
+
properties: schema2.properties ?? {},
|
|
1139414
|
+
required: schema2.required,
|
|
1139412
1139415
|
wrapAsNullable,
|
|
1139413
1139416
|
context,
|
|
1139414
|
-
groupName
|
|
1139415
|
-
discriminator: schema2.discriminator
|
|
1139417
|
+
groupName
|
|
1139416
1139418
|
});
|
|
1139417
1139419
|
}
|
|
1139418
1139420
|
} else if (schema2.oneOf.length === 1 && schema2.oneOf[0] != null) {
|
|
@@ -1139443,7 +1139445,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
|
|
|
1139443
1139445
|
});
|
|
1139444
1139446
|
}
|
|
1139445
1139447
|
const maybeDiscriminant = getDiscriminant({ schemas: schema2.oneOf, context });
|
|
1139446
|
-
if (maybeDiscriminant != null && !context.options.discriminatedUnionV2) {
|
|
1139448
|
+
if (maybeDiscriminant != null && !context.options.discriminatedUnionV2 && !isUndiscriminated) {
|
|
1139447
1139449
|
return convertDiscriminatedOneOfWithVariants({
|
|
1139448
1139450
|
nameOverride,
|
|
1139449
1139451
|
generatedName,
|
|
@@ -1149979,10 +1149981,10 @@ var CliContext = class {
|
|
|
1149979
1149981
|
return "fern-api";
|
|
1149980
1149982
|
}
|
|
1149981
1149983
|
getPackageVersion() {
|
|
1149982
|
-
if ("0.31.
|
|
1149984
|
+
if ("0.31.24" == null) {
|
|
1149983
1149985
|
this.logger.error("CLI_VERSION is not defined");
|
|
1149984
1149986
|
}
|
|
1149985
|
-
return "0.31.
|
|
1149987
|
+
return "0.31.24";
|
|
1149986
1149988
|
}
|
|
1149987
1149989
|
getCliName() {
|
|
1149988
1149990
|
if ("fern" == null) {
|