fern-api 0.19.3 → 0.19.4

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 +37 -14
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -797931,7 +797931,7 @@ var AccessTokenPosthogManager = class {
797931
797931
  properties: {
797932
797932
  ...event,
797933
797933
  ...event.properties,
797934
- version: "0.19.3",
797934
+ version: "0.19.4",
797935
797935
  usingAccessToken: true
797936
797936
  }
797937
797937
  });
@@ -797993,7 +797993,7 @@ var UserPosthogManager = class {
797993
797993
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
797994
797994
  event: "CLI",
797995
797995
  properties: {
797996
- version: "0.19.3",
797996
+ version: "0.19.4",
797997
797997
  ...event,
797998
797998
  ...event.properties
797999
797999
  }
@@ -814391,6 +814391,11 @@ var DummyOpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
814391
814391
  getErrors() {
814392
814392
  return {};
814393
814393
  }
814394
+ excludeSchema(_schemaId) {
814395
+ }
814396
+ isSchemaExcluded(_schemaId) {
814397
+ return false;
814398
+ }
814394
814399
  };
814395
814400
 
814396
814401
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/getFernAvailability.js
@@ -814836,6 +814841,9 @@ function convertStreamingOperation({ operationContext, context, streamingExtensi
814836
814841
  streamingExtension,
814837
814842
  isStreaming: true
814838
814843
  });
814844
+ if ((streamingRequestBody == null ? void 0 : streamingRequestBody.schemaReference) != null) {
814845
+ context.excludeSchema(getSchemaIdFromReference(streamingRequestBody.schemaReference));
814846
+ }
814839
814847
  const streamingResponses = getResponses({
814840
814848
  operation: operationContext.operation,
814841
814849
  response: streamingExtension.responseStream
@@ -814849,7 +814857,7 @@ function convertStreamingOperation({ operationContext, context, streamingExtensi
814849
814857
  } : void 0,
814850
814858
  operation: {
814851
814859
  ...operationContext.operation,
814852
- requestBody: streamingRequestBody,
814860
+ requestBody: streamingRequestBody == null ? void 0 : streamingRequestBody.requestBody,
814853
814861
  responses: streamingResponses
814854
814862
  },
814855
814863
  baseBreadcrumbs: [...operationContext.baseBreadcrumbs, STREAM_SUFFIX]
@@ -814873,7 +814881,7 @@ function convertStreamingOperation({ operationContext, context, streamingExtensi
814873
814881
  ...operationContext,
814874
814882
  operation: {
814875
814883
  ...operationContext.operation,
814876
- requestBody: nonStreamingRequestBody,
814884
+ requestBody: nonStreamingRequestBody == null ? void 0 : nonStreamingRequestBody.requestBody,
814877
814885
  responses: nonStreamingResponses
814878
814886
  }
814879
814887
  },
@@ -814916,14 +814924,18 @@ function getRequestBody2({ context, operation, streamingExtension, isStreaming }
814916
814924
  ...streamingProperty ?? {}
814917
814925
  }
814918
814926
  },
814927
+ title: void 0,
814919
814928
  required: [...resolvedRequstBodySchema.required ?? [], streamingExtension.streamConditionProperty]
814920
814929
  };
814921
814930
  return {
814922
- content: {
814923
- "application/json": {
814924
- schema: requestBodySchemaWithLiteralProperty
814931
+ requestBody: {
814932
+ content: {
814933
+ "application/json": {
814934
+ schema: requestBodySchemaWithLiteralProperty
814935
+ }
814925
814936
  }
814926
- }
814937
+ },
814938
+ schemaReference: isReferenceObject(jsonMediaObject.schema) ? jsonMediaObject.schema : void 0
814927
814939
  };
814928
814940
  }
814929
814941
  function getResponses({ operation, response }) {
@@ -815355,6 +815367,7 @@ var OpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
815355
815367
  singleRequestReferencedSchemas = /* @__PURE__ */ new Set();
815356
815368
  discrminatedUnionReferences = {};
815357
815369
  errorBodies = {};
815370
+ schemasToExclude = /* @__PURE__ */ new Set();
815358
815371
  constructor({ document: document4, taskContext, authHeaders }) {
815359
815372
  super({ document: document4, taskContext, authHeaders });
815360
815373
  }
@@ -815414,6 +815427,12 @@ var OpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
815414
815427
  });
815415
815428
  return errors;
815416
815429
  }
815430
+ excludeSchema(schemaId) {
815431
+ this.schemasToExclude.add(schemaId);
815432
+ }
815433
+ isSchemaExcluded(schemaId) {
815434
+ return this.schemasToExclude.has(schemaId);
815435
+ }
815417
815436
  };
815418
815437
 
815419
815438
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/getFernResolutions.js
@@ -815621,11 +815640,15 @@ function generateIr({ openApi, taskContext, disableExamples }) {
815621
815640
  examples
815622
815641
  };
815623
815642
  });
815624
- const schemas = Object.fromEntries(Object.entries(schemasWithExample).map(([key2, schemaWithExample]) => {
815625
- taskContext.logger.debug(`Converting schema ${key2}`);
815643
+ const schemas = {};
815644
+ for (const [key2, schemaWithExample] of Object.entries(schemasWithExample)) {
815626
815645
  const schema2 = convertSchemaWithExampleToSchema(schemaWithExample);
815627
- return [key2, schema2];
815628
- }));
815646
+ if (context.isSchemaExcluded(key2)) {
815647
+ continue;
815648
+ }
815649
+ schemas[key2] = schema2;
815650
+ taskContext.logger.debug(`Converted schema ${key2}`);
815651
+ }
815629
815652
  const ir = {
815630
815653
  title: openApi.info.title,
815631
815654
  description: openApi.info.description,
@@ -824771,10 +824794,10 @@ var CliContext = class {
824771
824794
  return "fern-api";
824772
824795
  }
824773
824796
  getPackageVersion() {
824774
- if ("0.19.3" == null) {
824797
+ if ("0.19.4" == null) {
824775
824798
  this.logger.error("CLI_VERSION is not defined");
824776
824799
  }
824777
- return "0.19.3";
824800
+ return "0.19.4";
824778
824801
  }
824779
824802
  getCliName() {
824780
824803
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.19.3",
3
+ "version": "0.19.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",