fern-api 0.25.0-rc0 → 0.25.0-rc2

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.
Files changed (2) hide show
  1. package/bundle.cjs +26 -8
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -912228,7 +912228,7 @@ var AccessTokenPosthogManager = class {
912228
912228
  properties: {
912229
912229
  ...event,
912230
912230
  ...event.properties,
912231
- version: "0.25.0-rc0",
912231
+ version: "0.25.0-rc2",
912232
912232
  usingAccessToken: true
912233
912233
  }
912234
912234
  });
@@ -912290,7 +912290,7 @@ var UserPosthogManager = class {
912290
912290
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
912291
912291
  event: "CLI",
912292
912292
  properties: {
912293
- version: "0.25.0-rc0",
912293
+ version: "0.25.0-rc2",
912294
912294
  ...event,
912295
912295
  ...event.properties
912296
912296
  }
@@ -926906,7 +926906,10 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
926906
926906
  }
926907
926907
  }
926908
926908
  }
926909
- const maybeDiscriminant = getDiscriminant({ schemas: schema2.anyOf, context });
926909
+ const maybeDiscriminant = getDiscriminant({
926910
+ schemas: schema2.anyOf,
926911
+ context
926912
+ });
926910
926913
  if (maybeDiscriminant != null) {
926911
926914
  return convertDiscriminatedOneOfWithVariants({
926912
926915
  nameOverride,
@@ -927137,8 +927140,7 @@ function getMaybeAllEnumValues({ schemas }) {
927137
927140
  function getDiscriminant({ schemas, context }) {
927138
927141
  const discriminantToVariants = {};
927139
927142
  for (const schema2 of schemas) {
927140
- const resolvedSchema = isReferenceObject(schema2) ? context.resolveSchemaReference(schema2) : schema2;
927141
- const possibleDiscriminants = getPossibleDiscriminants({ schema: resolvedSchema, context });
927143
+ const possibleDiscriminants = getPossibleDiscriminants({ schema: schema2, context });
927142
927144
  for (const [property5, value] of Object.entries(possibleDiscriminants)) {
927143
927145
  const variants = discriminantToVariants[property5];
927144
927146
  if (variants != null) {
@@ -927161,7 +927163,23 @@ function getDiscriminant({ schemas, context }) {
927161
927163
  return void 0;
927162
927164
  }
927163
927165
  function getPossibleDiscriminants({ schema: schema2, context }) {
927166
+ const resolvedSchema = isReferenceObject(schema2) ? context.resolveSchemaReference(schema2) : schema2;
927167
+ return getPossibleDiscriminantsForSchemaObject({ schema: resolvedSchema, context });
927168
+ }
927169
+ function getPossibleDiscriminantsForSchemaObject({ schema: schema2, context }) {
927164
927170
  const possibleDiscrimimants = {};
927171
+ if (schema2.anyOf != null) {
927172
+ for (const elem of schema2.anyOf) {
927173
+ const possibleDiscriminantsForVariant = getPossibleDiscriminants({
927174
+ schema: elem,
927175
+ context
927176
+ });
927177
+ for (const [key2, value] of Object.entries(possibleDiscriminantsForVariant ?? {})) {
927178
+ possibleDiscrimimants[key2] = value;
927179
+ }
927180
+ }
927181
+ return possibleDiscrimimants;
927182
+ }
927165
927183
  for (const [propertyName, propertySchema] of Object.entries(schema2.properties ?? {})) {
927166
927184
  const resolvedPropertySchema = isReferenceObject(propertySchema) ? context.resolveSchemaReference(propertySchema) : propertySchema;
927167
927185
  if (resolvedPropertySchema.type === "string" && resolvedPropertySchema.enum != null && isListOfStrings(resolvedPropertySchema.enum) && resolvedPropertySchema.enum.length === 1 && resolvedPropertySchema.enum[0] != null) {
@@ -936878,10 +936896,10 @@ var CliContext = class {
936878
936896
  return "fern-api";
936879
936897
  }
936880
936898
  getPackageVersion() {
936881
- if ("0.25.0-rc0" == null) {
936899
+ if ("0.25.0-rc2" == null) {
936882
936900
  this.logger.error("CLI_VERSION is not defined");
936883
936901
  }
936884
- return "0.25.0-rc0";
936902
+ return "0.25.0-rc2";
936885
936903
  }
936886
936904
  getCliName() {
936887
936905
  if ("fern" == null) {
@@ -941795,7 +941813,7 @@ function convertErrorDeclaration({ errorName, errorDeclaration, file, typeResolv
941795
941813
  file
941796
941814
  }).resolvedExample,
941797
941815
  shape: convertTypeReferenceExample({
941798
- example,
941816
+ example: example.value,
941799
941817
  rawTypeBeingExemplified: errorDeclaration.type,
941800
941818
  fileContainingRawTypeReference: file,
941801
941819
  fileContainingExample: file,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.25.0-rc0",
3
+ "version": "0.25.0-rc2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",