fern-api 0.19.10 → 0.19.11
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 +206 -31
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -12480,9 +12480,9 @@ var require_src = __commonJS({
|
|
|
12480
12480
|
}
|
|
12481
12481
|
});
|
|
12482
12482
|
|
|
12483
|
-
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
12483
|
+
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/debug.js
|
|
12484
12484
|
var require_debug = __commonJS({
|
|
12485
|
-
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
12485
|
+
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
12486
12486
|
var debug;
|
|
12487
12487
|
module2.exports = function() {
|
|
12488
12488
|
if (!debug) {
|
|
@@ -12500,9 +12500,9 @@ var require_debug = __commonJS({
|
|
|
12500
12500
|
}
|
|
12501
12501
|
});
|
|
12502
12502
|
|
|
12503
|
-
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
12503
|
+
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/index.js
|
|
12504
12504
|
var require_follow_redirects = __commonJS({
|
|
12505
|
-
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
12505
|
+
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
12506
12506
|
var url = require("url");
|
|
12507
12507
|
var URL2 = url.URL;
|
|
12508
12508
|
var http3 = require("http");
|
|
@@ -12813,7 +12813,7 @@ var require_follow_redirects = __commonJS({
|
|
|
12813
12813
|
this._isRedirect = true;
|
|
12814
12814
|
spreadUrlObject(redirectUrl, this._options);
|
|
12815
12815
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
12816
|
-
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
|
12816
|
+
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
|
|
12817
12817
|
}
|
|
12818
12818
|
if (isFunction2(beforeRedirect)) {
|
|
12819
12819
|
var responseDetails = {
|
|
@@ -106983,16 +106983,16 @@ var require_proxy_from_env = __commonJS({
|
|
|
106983
106983
|
}
|
|
106984
106984
|
});
|
|
106985
106985
|
|
|
106986
|
-
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
106986
|
+
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/http.js
|
|
106987
106987
|
var require_http2 = __commonJS({
|
|
106988
|
-
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
106988
|
+
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/http.js"(exports2, module2) {
|
|
106989
106989
|
module2.exports = require_follow_redirects().http;
|
|
106990
106990
|
}
|
|
106991
106991
|
});
|
|
106992
106992
|
|
|
106993
|
-
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
106993
|
+
// pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/https.js
|
|
106994
106994
|
var require_https = __commonJS({
|
|
106995
|
-
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-
|
|
106995
|
+
"pnp:/home/circleci/project/.yarn/__virtual__/follow-redirects-virtual-daf9138e0d/0/cache/follow-redirects-npm-1.15.6-50635fe51d-a62c378dfc.zip/node_modules/follow-redirects/https.js"(exports2, module2) {
|
|
106996
106996
|
module2.exports = require_follow_redirects().https;
|
|
106997
106997
|
}
|
|
106998
106998
|
});
|
|
@@ -349202,6 +349202,10 @@ var init_types26 = __esm({
|
|
|
349202
349202
|
});
|
|
349203
349203
|
|
|
349204
349204
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/commons/index.js
|
|
349205
|
+
var commons_exports3 = {};
|
|
349206
|
+
__export(commons_exports3, {
|
|
349207
|
+
SecurityScheme: () => SecurityScheme
|
|
349208
|
+
});
|
|
349205
349209
|
var init_commons3 = __esm({
|
|
349206
349210
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/commons/index.js"() {
|
|
349207
349211
|
init_types26();
|
|
@@ -349535,6 +349539,13 @@ var init_types27 = __esm({
|
|
|
349535
349539
|
});
|
|
349536
349540
|
|
|
349537
349541
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/example/index.js
|
|
349542
|
+
var example_exports = {};
|
|
349543
|
+
__export(example_exports, {
|
|
349544
|
+
FullExample: () => FullExample,
|
|
349545
|
+
FullOneOfExample: () => FullOneOfExample,
|
|
349546
|
+
LiteralExample: () => LiteralExample,
|
|
349547
|
+
PrimitiveExample: () => PrimitiveExample
|
|
349548
|
+
});
|
|
349538
349549
|
var init_example = __esm({
|
|
349539
349550
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/example/index.js"() {
|
|
349540
349551
|
init_types27();
|
|
@@ -349596,8 +349607,23 @@ var init_WebsocketMessageExample = __esm({
|
|
|
349596
349607
|
});
|
|
349597
349608
|
|
|
349598
349609
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/WebhookHttpMethod.js
|
|
349610
|
+
var WebhookHttpMethod3;
|
|
349599
349611
|
var init_WebhookHttpMethod3 = __esm({
|
|
349600
349612
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/WebhookHttpMethod.js"() {
|
|
349613
|
+
WebhookHttpMethod3 = {
|
|
349614
|
+
Get: "GET",
|
|
349615
|
+
Post: "POST",
|
|
349616
|
+
_visit: (value, visitor) => {
|
|
349617
|
+
switch (value) {
|
|
349618
|
+
case WebhookHttpMethod3.Get:
|
|
349619
|
+
return visitor.get();
|
|
349620
|
+
case WebhookHttpMethod3.Post:
|
|
349621
|
+
return visitor.post();
|
|
349622
|
+
default:
|
|
349623
|
+
return visitor._other();
|
|
349624
|
+
}
|
|
349625
|
+
}
|
|
349626
|
+
};
|
|
349601
349627
|
}
|
|
349602
349628
|
});
|
|
349603
349629
|
|
|
@@ -349682,8 +349708,62 @@ var init_CustomCodeSampleSdk = __esm({
|
|
|
349682
349708
|
});
|
|
349683
349709
|
|
|
349684
349710
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/SupportedSdkLanguage.js
|
|
349711
|
+
var SupportedSdkLanguage3;
|
|
349685
349712
|
var init_SupportedSdkLanguage3 = __esm({
|
|
349686
349713
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/SupportedSdkLanguage.js"() {
|
|
349714
|
+
SupportedSdkLanguage3 = {
|
|
349715
|
+
Curl: "curl",
|
|
349716
|
+
Python: "python",
|
|
349717
|
+
Javascript: "javascript",
|
|
349718
|
+
Typescript: "typescript",
|
|
349719
|
+
Go: "go",
|
|
349720
|
+
Ruby: "ruby",
|
|
349721
|
+
Csharp: "csharp",
|
|
349722
|
+
Java: "java",
|
|
349723
|
+
Js: "js",
|
|
349724
|
+
Node: "node",
|
|
349725
|
+
Ts: "ts",
|
|
349726
|
+
Nodets: "nodets",
|
|
349727
|
+
Golang: "golang",
|
|
349728
|
+
Dotnet: "dotnet",
|
|
349729
|
+
Jvm: "jvm",
|
|
349730
|
+
_visit: (value, visitor) => {
|
|
349731
|
+
switch (value) {
|
|
349732
|
+
case SupportedSdkLanguage3.Curl:
|
|
349733
|
+
return visitor.curl();
|
|
349734
|
+
case SupportedSdkLanguage3.Python:
|
|
349735
|
+
return visitor.python();
|
|
349736
|
+
case SupportedSdkLanguage3.Javascript:
|
|
349737
|
+
return visitor.javascript();
|
|
349738
|
+
case SupportedSdkLanguage3.Typescript:
|
|
349739
|
+
return visitor.typescript();
|
|
349740
|
+
case SupportedSdkLanguage3.Go:
|
|
349741
|
+
return visitor.go();
|
|
349742
|
+
case SupportedSdkLanguage3.Ruby:
|
|
349743
|
+
return visitor.ruby();
|
|
349744
|
+
case SupportedSdkLanguage3.Csharp:
|
|
349745
|
+
return visitor.csharp();
|
|
349746
|
+
case SupportedSdkLanguage3.Java:
|
|
349747
|
+
return visitor.java();
|
|
349748
|
+
case SupportedSdkLanguage3.Js:
|
|
349749
|
+
return visitor.js();
|
|
349750
|
+
case SupportedSdkLanguage3.Node:
|
|
349751
|
+
return visitor.node();
|
|
349752
|
+
case SupportedSdkLanguage3.Ts:
|
|
349753
|
+
return visitor.ts();
|
|
349754
|
+
case SupportedSdkLanguage3.Nodets:
|
|
349755
|
+
return visitor.nodets();
|
|
349756
|
+
case SupportedSdkLanguage3.Golang:
|
|
349757
|
+
return visitor.golang();
|
|
349758
|
+
case SupportedSdkLanguage3.Dotnet:
|
|
349759
|
+
return visitor.dotnet();
|
|
349760
|
+
case SupportedSdkLanguage3.Jvm:
|
|
349761
|
+
return visitor.jvm();
|
|
349762
|
+
default:
|
|
349763
|
+
return visitor._other();
|
|
349764
|
+
}
|
|
349765
|
+
}
|
|
349766
|
+
};
|
|
349687
349767
|
}
|
|
349688
349768
|
});
|
|
349689
349769
|
|
|
@@ -350473,6 +350553,21 @@ var init_types28 = __esm({
|
|
|
350473
350553
|
});
|
|
350474
350554
|
|
|
350475
350555
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/index.js
|
|
350556
|
+
var finalIr_exports = {};
|
|
350557
|
+
__export(finalIr_exports, {
|
|
350558
|
+
CustomCodeSample: () => CustomCodeSample,
|
|
350559
|
+
EndpointAvailability: () => EndpointAvailability,
|
|
350560
|
+
HttpMethod: () => HttpMethod3,
|
|
350561
|
+
LiteralSchemaValue: () => LiteralSchemaValue,
|
|
350562
|
+
MultipartSchema: () => MultipartSchema,
|
|
350563
|
+
OneOfSchema: () => OneOfSchema,
|
|
350564
|
+
PrimitiveSchemaValue: () => PrimitiveSchemaValue,
|
|
350565
|
+
Request: () => Request2,
|
|
350566
|
+
Response: () => Response2,
|
|
350567
|
+
Schema: () => Schema2,
|
|
350568
|
+
SupportedSdkLanguage: () => SupportedSdkLanguage3,
|
|
350569
|
+
WebhookHttpMethod: () => WebhookHttpMethod3
|
|
350570
|
+
});
|
|
350476
350571
|
var init_finalIr = __esm({
|
|
350477
350572
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/index.js"() {
|
|
350478
350573
|
init_types28();
|
|
@@ -351104,6 +351199,14 @@ var init_types29 = __esm({
|
|
|
351104
351199
|
});
|
|
351105
351200
|
|
|
351106
351201
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/parseIr/index.js
|
|
351202
|
+
var parseIr_exports = {};
|
|
351203
|
+
__export(parseIr_exports, {
|
|
351204
|
+
OneOfSchemaWithExample: () => OneOfSchemaWithExample,
|
|
351205
|
+
PrimitiveSchemaValueWithExample: () => PrimitiveSchemaValueWithExample,
|
|
351206
|
+
RequestWithExample: () => RequestWithExample,
|
|
351207
|
+
ResponseWithExample: () => ResponseWithExample,
|
|
351208
|
+
SchemaWithExample: () => SchemaWithExample
|
|
351209
|
+
});
|
|
351107
351210
|
var init_parseIr = __esm({
|
|
351108
351211
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/parseIr/index.js"() {
|
|
351109
351212
|
init_types29();
|
|
@@ -351125,6 +351228,35 @@ var init_resources4 = __esm({
|
|
|
351125
351228
|
});
|
|
351126
351229
|
|
|
351127
351230
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/index.js
|
|
351231
|
+
var api_exports3 = {};
|
|
351232
|
+
__export(api_exports3, {
|
|
351233
|
+
CustomCodeSample: () => CustomCodeSample,
|
|
351234
|
+
EndpointAvailability: () => EndpointAvailability,
|
|
351235
|
+
FullExample: () => FullExample,
|
|
351236
|
+
FullOneOfExample: () => FullOneOfExample,
|
|
351237
|
+
HttpMethod: () => HttpMethod3,
|
|
351238
|
+
LiteralExample: () => LiteralExample,
|
|
351239
|
+
LiteralSchemaValue: () => LiteralSchemaValue,
|
|
351240
|
+
MultipartSchema: () => MultipartSchema,
|
|
351241
|
+
OneOfSchema: () => OneOfSchema,
|
|
351242
|
+
OneOfSchemaWithExample: () => OneOfSchemaWithExample,
|
|
351243
|
+
PrimitiveExample: () => PrimitiveExample,
|
|
351244
|
+
PrimitiveSchemaValue: () => PrimitiveSchemaValue,
|
|
351245
|
+
PrimitiveSchemaValueWithExample: () => PrimitiveSchemaValueWithExample,
|
|
351246
|
+
Request: () => Request2,
|
|
351247
|
+
RequestWithExample: () => RequestWithExample,
|
|
351248
|
+
Response: () => Response2,
|
|
351249
|
+
ResponseWithExample: () => ResponseWithExample,
|
|
351250
|
+
Schema: () => Schema2,
|
|
351251
|
+
SchemaWithExample: () => SchemaWithExample,
|
|
351252
|
+
SecurityScheme: () => SecurityScheme,
|
|
351253
|
+
SupportedSdkLanguage: () => SupportedSdkLanguage3,
|
|
351254
|
+
WebhookHttpMethod: () => WebhookHttpMethod3,
|
|
351255
|
+
commons: () => commons_exports3,
|
|
351256
|
+
example: () => example_exports,
|
|
351257
|
+
finalIr: () => finalIr_exports,
|
|
351258
|
+
parseIr: () => parseIr_exports
|
|
351259
|
+
});
|
|
351128
351260
|
var init_api2 = __esm({
|
|
351129
351261
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/index.js"() {
|
|
351130
351262
|
init_resources4();
|
|
@@ -353251,11 +353383,11 @@ var init_WebsocketMessageExample2 = __esm({
|
|
|
353251
353383
|
});
|
|
353252
353384
|
|
|
353253
353385
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/WebhookHttpMethod.js
|
|
353254
|
-
var
|
|
353386
|
+
var WebhookHttpMethod4;
|
|
353255
353387
|
var init_WebhookHttpMethod4 = __esm({
|
|
353256
353388
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/WebhookHttpMethod.js"() {
|
|
353257
353389
|
init_core3();
|
|
353258
|
-
|
|
353390
|
+
WebhookHttpMethod4 = schemas_exports5.enum_(["GET", "POST"]);
|
|
353259
353391
|
}
|
|
353260
353392
|
});
|
|
353261
353393
|
|
|
@@ -353351,11 +353483,11 @@ var init_CustomCodeSampleSdk2 = __esm({
|
|
|
353351
353483
|
});
|
|
353352
353484
|
|
|
353353
353485
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/SupportedSdkLanguage.js
|
|
353354
|
-
var
|
|
353486
|
+
var SupportedSdkLanguage4;
|
|
353355
353487
|
var init_SupportedSdkLanguage4 = __esm({
|
|
353356
353488
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/SupportedSdkLanguage.js"() {
|
|
353357
353489
|
init_core3();
|
|
353358
|
-
|
|
353490
|
+
SupportedSdkLanguage4 = schemas_exports5.enum_([
|
|
353359
353491
|
"curl",
|
|
353360
353492
|
"python",
|
|
353361
353493
|
"javascript",
|
|
@@ -354151,12 +354283,12 @@ __export(finalIr_exports2, {
|
|
|
354151
354283
|
Response: () => Response3,
|
|
354152
354284
|
Schema: () => Schema3,
|
|
354153
354285
|
StringSchema: () => StringSchema,
|
|
354154
|
-
SupportedSdkLanguage: () =>
|
|
354286
|
+
SupportedSdkLanguage: () => SupportedSdkLanguage4,
|
|
354155
354287
|
Tags: () => Tags,
|
|
354156
354288
|
TextResponse: () => TextResponse2,
|
|
354157
354289
|
UnDiscriminatedOneOfSchema: () => UnDiscriminatedOneOfSchema,
|
|
354158
354290
|
Webhook: () => Webhook2,
|
|
354159
|
-
WebhookHttpMethod: () =>
|
|
354291
|
+
WebhookHttpMethod: () => WebhookHttpMethod4,
|
|
354160
354292
|
WebsocketChannel: () => WebsocketChannel,
|
|
354161
354293
|
WebsocketHandshake: () => WebsocketHandshake,
|
|
354162
354294
|
WebsocketMessageExample: () => WebsocketMessageExample,
|
|
@@ -354918,7 +355050,7 @@ __export(serialization_exports3, {
|
|
|
354918
355050
|
StatusCode: () => StatusCode,
|
|
354919
355051
|
StringSchema: () => StringSchema,
|
|
354920
355052
|
StringSchemaWithExample: () => StringSchemaWithExample,
|
|
354921
|
-
SupportedSdkLanguage: () =>
|
|
355053
|
+
SupportedSdkLanguage: () => SupportedSdkLanguage4,
|
|
354922
355054
|
Tag: () => Tag,
|
|
354923
355055
|
TagId: () => TagId,
|
|
354924
355056
|
Tags: () => Tags,
|
|
@@ -354927,7 +355059,7 @@ __export(serialization_exports3, {
|
|
|
354927
355059
|
UnDiscriminatedOneOfSchemaWithExample: () => UnDiscriminatedOneOfSchemaWithExample,
|
|
354928
355060
|
UnknownSchemaWithExample: () => UnknownSchemaWithExample,
|
|
354929
355061
|
Webhook: () => Webhook2,
|
|
354930
|
-
WebhookHttpMethod: () =>
|
|
355062
|
+
WebhookHttpMethod: () => WebhookHttpMethod4,
|
|
354931
355063
|
WebsocketChannel: () => WebsocketChannel,
|
|
354932
355064
|
WebsocketHandshake: () => WebsocketHandshake,
|
|
354933
355065
|
WebsocketHandshakeWithExample: () => WebsocketHandshakeWithExample,
|
|
@@ -831746,7 +831878,7 @@ var AccessTokenPosthogManager = class {
|
|
|
831746
831878
|
properties: {
|
|
831747
831879
|
...event,
|
|
831748
831880
|
...event.properties,
|
|
831749
|
-
version: "0.19.
|
|
831881
|
+
version: "0.19.11",
|
|
831750
831882
|
usingAccessToken: true
|
|
831751
831883
|
}
|
|
831752
831884
|
});
|
|
@@ -831808,7 +831940,7 @@ var UserPosthogManager = class {
|
|
|
831808
831940
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
831809
831941
|
event: "CLI",
|
|
831810
831942
|
properties: {
|
|
831811
|
-
version: "0.19.
|
|
831943
|
+
version: "0.19.11",
|
|
831812
831944
|
...event,
|
|
831813
831945
|
...event.properties
|
|
831814
831946
|
}
|
|
@@ -847022,6 +847154,11 @@ function isSchemaRequired4(schema2) {
|
|
|
847022
847154
|
return schema2.type !== "optional" && schema2.type !== "nullable";
|
|
847023
847155
|
}
|
|
847024
847156
|
|
|
847157
|
+
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/hasIncompleteExample.js
|
|
847158
|
+
function hasIncompleteExample(example) {
|
|
847159
|
+
return example.request == null && example.response == null && example.queryParameters == null && example.pathParameters == null && example.headers == null;
|
|
847160
|
+
}
|
|
847161
|
+
|
|
847025
847162
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/converters/ExampleEndpointFactory.js
|
|
847026
847163
|
var ExampleEndpointFactory = class {
|
|
847027
847164
|
exampleTypeFactory;
|
|
@@ -847147,6 +847284,7 @@ var ExampleEndpointFactory = class {
|
|
|
847147
847284
|
if (exampleName == null && (requestSchemaIdResponse == null ? void 0 : requestSchemaIdResponse.schema) != null) {
|
|
847148
847285
|
exampleName = getNameFromSchemaWithExample(requestSchemaIdResponse.schema);
|
|
847149
847286
|
}
|
|
847287
|
+
const codeSamples = endpoint.examples.filter(hasIncompleteExample).flatMap((example) => example.codeSamples);
|
|
847150
847288
|
return {
|
|
847151
847289
|
name: exampleName,
|
|
847152
847290
|
description: void 0,
|
|
@@ -847155,7 +847293,7 @@ var ExampleEndpointFactory = class {
|
|
|
847155
847293
|
headers,
|
|
847156
847294
|
request: requestExample,
|
|
847157
847295
|
response: responseExample,
|
|
847158
|
-
codeSamples
|
|
847296
|
+
codeSamples
|
|
847159
847297
|
};
|
|
847160
847298
|
}
|
|
847161
847299
|
isSchemaRequired(schema2) {
|
|
@@ -848083,7 +848221,38 @@ function getFernAvailability(operationObject) {
|
|
|
848083
848221
|
|
|
848084
848222
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/extensions/getFernExamples.js
|
|
848085
848223
|
function getFernExamples2(operationObject) {
|
|
848086
|
-
|
|
848224
|
+
const raw = getExtension(operationObject, FernOpenAPIExtension.EXAMPLES) ?? [];
|
|
848225
|
+
const validated = raw.map((value) => schemas_exports3.ExampleEndpointCallSchema.parse(value));
|
|
848226
|
+
return validated.map((value) => ({
|
|
848227
|
+
name: value.name,
|
|
848228
|
+
pathParameters: value["path-parameters"] ? Object.entries(value["path-parameters"]).map(([name2, value2]) => ({
|
|
848229
|
+
name: name2,
|
|
848230
|
+
value: value2
|
|
848231
|
+
})) : void 0,
|
|
848232
|
+
queryParameters: value["query-parameters"] ? Object.entries(value["query-parameters"]).map(([name2, value2]) => ({
|
|
848233
|
+
name: name2,
|
|
848234
|
+
value: value2
|
|
848235
|
+
})) : void 0,
|
|
848236
|
+
headers: value.headers ? Object.entries(value.headers).map(([name2, value2]) => ({
|
|
848237
|
+
name: name2,
|
|
848238
|
+
value: value2
|
|
848239
|
+
})) : void 0,
|
|
848240
|
+
request: value.request,
|
|
848241
|
+
response: value.response,
|
|
848242
|
+
codeSamples: (value["code-samples"] ?? []).map((value2) => "language" in value2 ? api_exports3.CustomCodeSample.language({
|
|
848243
|
+
name: value2.name,
|
|
848244
|
+
language: value2.language,
|
|
848245
|
+
code: value2.code,
|
|
848246
|
+
install: value2.install,
|
|
848247
|
+
description: value2.docs
|
|
848248
|
+
}) : api_exports3.CustomCodeSample.sdk({
|
|
848249
|
+
name: value2.name,
|
|
848250
|
+
sdk: value2.sdk === "c#" ? "csharp" : value2.sdk,
|
|
848251
|
+
code: value2.code,
|
|
848252
|
+
description: value2.docs
|
|
848253
|
+
})),
|
|
848254
|
+
description: void 0
|
|
848255
|
+
}));
|
|
848087
848256
|
}
|
|
848088
848257
|
|
|
848089
848258
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v3/converters/convertServer.js
|
|
@@ -849264,7 +849433,10 @@ function generateIr({ openApi, taskContext, disableExamples }) {
|
|
|
849264
849433
|
if (!disableExamples && (examples.length === 0 || examples.every(hasIncompleteExample))) {
|
|
849265
849434
|
const endpointExample = exampleEndpointFactory.buildEndpointExample(endpointWithExample);
|
|
849266
849435
|
if (endpointExample != null) {
|
|
849267
|
-
examples = [
|
|
849436
|
+
examples = [
|
|
849437
|
+
endpointExample,
|
|
849438
|
+
...endpointWithExample.examples.filter((example) => !hasIncompleteExample(example))
|
|
849439
|
+
];
|
|
849268
849440
|
}
|
|
849269
849441
|
}
|
|
849270
849442
|
const request = endpointWithExample.request;
|
|
@@ -849396,9 +849568,6 @@ function getAllParentSchemaIds({ schema: schema2, schemas }) {
|
|
|
849396
849568
|
}
|
|
849397
849569
|
return result2;
|
|
849398
849570
|
}
|
|
849399
|
-
function hasIncompleteExample(example) {
|
|
849400
|
-
return example.request == null && example.response == null && example.queryParameters == null && example.pathParameters == null && example.headers == null;
|
|
849401
|
-
}
|
|
849402
849571
|
|
|
849403
849572
|
// pnp:/home/circleci/project/packages/cli/openapi-parser/lib/openapi/v2/generateIr.js
|
|
849404
849573
|
async function generateIr2({ openApi, taskContext, disableExamples }) {
|
|
@@ -850124,7 +850293,7 @@ function buildEndpointExample({ endpointExample, context }) {
|
|
|
850124
850293
|
if (endpointExample.response != null) {
|
|
850125
850294
|
example.response = { body: convertFullExample2(endpointExample.response) };
|
|
850126
850295
|
}
|
|
850127
|
-
if (endpointExample.codeSamples.length > 0) {
|
|
850296
|
+
if (endpointExample.codeSamples != null && endpointExample.codeSamples.length > 0) {
|
|
850128
850297
|
example["code-samples"] = endpointExample.codeSamples.map((codeSample) => {
|
|
850129
850298
|
if (codeSample.type === "language") {
|
|
850130
850299
|
return {
|
|
@@ -855272,10 +855441,10 @@ var CliContext = class {
|
|
|
855272
855441
|
return "fern-api";
|
|
855273
855442
|
}
|
|
855274
855443
|
getPackageVersion() {
|
|
855275
|
-
if ("0.19.
|
|
855444
|
+
if ("0.19.11" == null) {
|
|
855276
855445
|
this.logger.error("CLI_VERSION is not defined");
|
|
855277
855446
|
}
|
|
855278
|
-
return "0.19.
|
|
855447
|
+
return "0.19.11";
|
|
855279
855448
|
}
|
|
855280
855449
|
getCliName() {
|
|
855281
855450
|
if ("fern" == null) {
|
|
@@ -858301,7 +858470,7 @@ function convertPrimitiveExample({ example, typeBeingExemplified }) {
|
|
|
858301
858470
|
}
|
|
858302
858471
|
function convertObject4({ typeName, rawObject, example, fileContainingType, fileContainingExample, typeResolver, exampleResolver, workspace }) {
|
|
858303
858472
|
if (!isPlainObject(example)) {
|
|
858304
|
-
throw new Error(
|
|
858473
|
+
throw new Error(`Example is not an object. Got: ${JSON.stringify(example)}`);
|
|
858305
858474
|
}
|
|
858306
858475
|
return ExampleTypeShape.object({
|
|
858307
858476
|
properties: rawObject.properties != null ? Object.entries(example).reduce((exampleProperties, [wireKey, propertyExample]) => {
|
|
@@ -858673,8 +858842,11 @@ function convertExampleRequestBody({ endpoint, example, typeResolver, exampleRes
|
|
|
858673
858842
|
workspace
|
|
858674
858843
|
}));
|
|
858675
858844
|
}
|
|
858845
|
+
if (!example.request) {
|
|
858846
|
+
return void 0;
|
|
858847
|
+
}
|
|
858676
858848
|
if (!isPlainObject(example.request)) {
|
|
858677
|
-
throw new Error(
|
|
858849
|
+
throw new Error(`Example is not an object. Got: ${JSON.stringify(example.request)}`);
|
|
858678
858850
|
}
|
|
858679
858851
|
const exampleProperties = [];
|
|
858680
858852
|
for (const [wireKey, propertyExample] of Object.entries(example.request)) {
|
|
@@ -858759,8 +858931,11 @@ function convertExampleResponseBody({ endpoint, example, typeResolver, exampleRe
|
|
|
858759
858931
|
if (responseBodyType == null) {
|
|
858760
858932
|
return void 0;
|
|
858761
858933
|
}
|
|
858934
|
+
if (((_b2 = example.response) == null ? void 0 : _b2.body) == null) {
|
|
858935
|
+
return void 0;
|
|
858936
|
+
}
|
|
858762
858937
|
return convertTypeReferenceExample({
|
|
858763
|
-
example:
|
|
858938
|
+
example: example.response.body,
|
|
858764
858939
|
rawTypeBeingExemplified: responseBodyType,
|
|
858765
858940
|
typeResolver,
|
|
858766
858941
|
exampleResolver,
|