@fern-api/fern-api-dev 3.47.6 → 3.47.7-2-g4e8a893e65

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/cli.cjs +22 -5
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1429260,7 +1429260,7 @@ var AccessTokenPosthogManager = class {
1429260
1429260
  properties: {
1429261
1429261
  ...event,
1429262
1429262
  ...event.properties,
1429263
- version: "3.47.6",
1429263
+ version: "3.47.7-2-g4e8a893e65",
1429264
1429264
  usingAccessToken: true
1429265
1429265
  }
1429266
1429266
  });
@@ -1429359,7 +1429359,7 @@ var UserPosthogManager = class {
1429359
1429359
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1429360
1429360
  event: "CLI",
1429361
1429361
  properties: {
1429362
- version: "3.47.6",
1429362
+ version: "3.47.7-2-g4e8a893e65",
1429363
1429363
  ...event,
1429364
1429364
  ...event.properties,
1429365
1429365
  usingAccessToken: false,
@@ -1502721,6 +1502721,21 @@ var AbstractMediaTypeObjectConverter = class extends AbstractConverter {
1502721
1502721
  }
1502722
1502722
  return { ...convertedSchema, examples: void 0 };
1502723
1502723
  }
1502724
+ /**
1502725
+ * Determines the unique identifier for an example, handling duplicate summary collisions.
1502726
+ * Uses the summary if available, disambiguating with key if there's a collision.
1502727
+ */
1502728
+ getIdForExample({ key, example, usedExampleNames }) {
1502729
+ if (this.context.isExampleWithSummary(example)) {
1502730
+ const summary = example.summary;
1502731
+ if (!usedExampleNames.has(summary)) {
1502732
+ return summary;
1502733
+ }
1502734
+ const disambiguatedName = `${summary} (${key})`;
1502735
+ return usedExampleNames.has(disambiguatedName) ? key : disambiguatedName;
1502736
+ }
1502737
+ return key;
1502738
+ }
1502724
1502739
  convertMediaTypeObjectExamples({ mediaTypeObject, generateOptionalProperties, exampleGenerationStrategy }) {
1502725
1502740
  const v2Examples = {
1502726
1502741
  userSpecifiedExamples: {},
@@ -1502732,13 +1502747,15 @@ var AbstractMediaTypeObjectConverter = class extends AbstractConverter {
1502732
1502747
  breadcrumbs: this.breadcrumbs,
1502733
1502748
  defaultExampleName: `${[...this.group, this.method].join("_")}_example`
1502734
1502749
  });
1502750
+ const usedExampleNames = /* @__PURE__ */ new Set();
1502735
1502751
  for (const [key, example] of examples) {
1502736
1502752
  const resolvedExample = this.context.resolveExampleWithValue(example);
1502737
1502753
  const resolvedExampleObject = this.context.resolveExampleRecursively({
1502738
1502754
  example,
1502739
1502755
  breadcrumbs: this.breadcrumbs
1502740
1502756
  });
1502741
- const exampleName = this.context.isExampleWithSummary(resolvedExampleObject) ? resolvedExampleObject.summary : key;
1502757
+ const exampleName = this.getIdForExample({ key, example: resolvedExampleObject, usedExampleNames });
1502758
+ usedExampleNames.add(exampleName);
1502742
1502759
  if (resolvedExample != null) {
1502743
1502760
  if (schema2 != null) {
1502744
1502761
  v2Examples.userSpecifiedExamples[exampleName] = this.generateOrValidateExample({
@@ -1508768,7 +1508785,7 @@ var CliContext = class {
1508768
1508785
  if (false) {
1508769
1508786
  this.logger.error("CLI_VERSION is not defined");
1508770
1508787
  }
1508771
- return "3.47.6";
1508788
+ return "3.47.7-2-g4e8a893e65";
1508772
1508789
  }
1508773
1508790
  getCliName() {
1508774
1508791
  if (false) {
@@ -1609924,7 +1609941,7 @@ var import_path40 = __toESM(require("path"), 1);
1609924
1609941
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1609925
1609942
  var LOGS_FOLDER_NAME = "logs";
1609926
1609943
  function getCliSource() {
1609927
- const version7 = "3.47.6";
1609944
+ const version7 = "3.47.7-2-g4e8a893e65";
1609928
1609945
  return `cli@${version7}`;
1609929
1609946
  }
1609930
1609947
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.47.6",
2
+ "version": "3.47.7-2-g4e8a893e65",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",