fern-api 0.19.14-rc1 → 0.19.14-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 +48 -7
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -832141,7 +832141,7 @@ var AccessTokenPosthogManager = class {
832141
832141
  properties: {
832142
832142
  ...event,
832143
832143
  ...event.properties,
832144
- version: "0.19.14-rc1",
832144
+ version: "0.19.14-rc2",
832145
832145
  usingAccessToken: true
832146
832146
  }
832147
832147
  });
@@ -832203,7 +832203,7 @@ var UserPosthogManager = class {
832203
832203
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
832204
832204
  event: "CLI",
832205
832205
  properties: {
832206
- version: "0.19.14-rc1",
832206
+ version: "0.19.14-rc2",
832207
832207
  ...event,
832208
832208
  ...event.properties
832209
832209
  }
@@ -845669,6 +845669,46 @@ function convertSchemaWithExampleToSchema(schema2) {
845669
845669
  assertNever(schema2);
845670
845670
  }
845671
845671
  }
845672
+ function convertSchemaWithExampleToOptionalSchema(schema2) {
845673
+ switch (schema2.type) {
845674
+ case "object":
845675
+ case "array":
845676
+ case "enum":
845677
+ case "literal":
845678
+ case "nullable":
845679
+ case "primitive":
845680
+ case "map":
845681
+ case "reference":
845682
+ case "unknown":
845683
+ return Schema2.optional({
845684
+ generatedName: schema2.generatedName,
845685
+ nameOverride: schema2.nameOverride,
845686
+ description: schema2.description,
845687
+ value: convertSchemaWithExampleToSchema(schema2),
845688
+ groupName: schema2.groupName
845689
+ });
845690
+ case "optional":
845691
+ return Schema2.optional({
845692
+ generatedName: schema2.generatedName,
845693
+ nameOverride: schema2.nameOverride,
845694
+ description: schema2.description,
845695
+ value: convertSchemaWithExampleToSchema(schema2.value),
845696
+ groupName: schema2.groupName
845697
+ });
845698
+ case "oneOf": {
845699
+ const oneOfSchema = convertToOneOf(schema2.value);
845700
+ return Schema2.optional({
845701
+ generatedName: oneOfSchema.generatedName,
845702
+ nameOverride: oneOfSchema.nameOverride,
845703
+ description: oneOfSchema.description,
845704
+ value: Schema2.oneOf(convertToOneOf(schema2.value)),
845705
+ groupName: oneOfSchema.groupName
845706
+ });
845707
+ }
845708
+ default:
845709
+ assertNever(schema2);
845710
+ }
845711
+ }
845672
845712
  function convertToOneOf(oneOfSchema) {
845673
845713
  switch (oneOfSchema.type) {
845674
845714
  case "discriminated":
@@ -848215,9 +848255,9 @@ function convertRequest({ requestBody, document: document4, context, requestBrea
848215
848255
  name: isReferenceObject(multipartSchema) && context.getNumberOfOccurrencesForRef(multipartSchema) === 1 ? resolvedMultipartSchema.id : void 0,
848216
848256
  description: void 0,
848217
848257
  properties: Object.entries(resolvedMultipartSchema.schema.properties ?? {}).map(([key2, definition2]) => {
848258
+ const required = resolvedMultipartSchema.schema.required;
848259
+ const isRequired = required !== void 0 && required.includes(key2);
848218
848260
  if (!isReferenceObject(definition2) && (definition2.type === "string" && definition2.format === "binary" || definition2.type === "array" && !isReferenceObject(definition2.items) && definition2.items.type === "string" && definition2.items.format === "binary")) {
848219
- const required = resolvedMultipartSchema.schema.required;
848220
- const isRequired = required !== void 0 && required.includes(key2);
848221
848261
  return {
848222
848262
  key: key2,
848223
848263
  schema: MultipartSchema.file({ isOptional: !isRequired, isArray: definition2.type === "array" }),
@@ -848226,10 +848266,11 @@ function convertRequest({ requestBody, document: document4, context, requestBrea
848226
848266
  }
848227
848267
  const schemaWithExample = convertSchema(definition2, false, context, [...requestBreadcrumbs, key2]);
848228
848268
  const audiences = getExtension(definition2, FernOpenAPIExtension.AUDIENCES) ?? [];
848269
+ const schema2 = isRequired ? convertSchemaWithExampleToSchema(schemaWithExample) : convertSchemaWithExampleToOptionalSchema(schemaWithExample);
848229
848270
  return {
848230
848271
  key: key2,
848231
848272
  audiences,
848232
- schema: MultipartSchema.json(convertSchemaWithExampleToSchema(schemaWithExample)),
848273
+ schema: MultipartSchema.json(schema2),
848233
848274
  description: void 0
848234
848275
  };
848235
848276
  })
@@ -855719,10 +855760,10 @@ var CliContext = class {
855719
855760
  return "fern-api";
855720
855761
  }
855721
855762
  getPackageVersion() {
855722
- if ("0.19.14-rc1" == null) {
855763
+ if ("0.19.14-rc2" == null) {
855723
855764
  this.logger.error("CLI_VERSION is not defined");
855724
855765
  }
855725
- return "0.19.14-rc1";
855766
+ return "0.19.14-rc2";
855726
855767
  }
855727
855768
  getCliName() {
855728
855769
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.19.14-rc1",
3
+ "version": "0.19.14-rc2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",