From feab5485d2a9602f3497570c1aef82a35b737c6a Mon Sep 17 00:00:00 2001 From: dcb6 Date: Tue, 6 Aug 2024 19:44:30 -0400 Subject: [PATCH 1/6] update schema --- .../fern/apis/ir-types-latest/definition/http.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml index 148c422033d..320249913b3 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml @@ -399,6 +399,20 @@ types: properties: name: commons.NameAndWireValue value: types.ExampleTypeReference + shape: optional + + ExampleQueryParameterShape: + union: + single: SingleExampleQueryParameter + exploded: ExplodedExampleQueryParameter + commaSeparated: CommaSeparatedExampleQueryParameter + + SingleExampleQueryParameter: + properties: {} + ExplodedExampleQueryParameter: + properties: {} + CommaSeparatedExampleQueryParameter: + properties: {} ExampleHeader: properties: From 14e58dc3c99ece61d0ef3f9e1bfcb9ef27fe3a8b Mon Sep 17 00:00:00 2001 From: dcb6 Date: Wed, 7 Aug 2024 10:36:57 -0400 Subject: [PATCH 2/6] implementation and tests --- .../code-samples-open-api.json | 5 +- .../test-definitions-openapi/names.json | 5 +- .../__test__/test-definitions/audiences.json | 5 +- .../src/__test__/test-definitions/enum.json | 34 +++++++++++- .../__test__/test-definitions/examples.json | 14 ++++- .../__test__/test-definitions/exhaustive.json | 21 ++++++-- .../test-definitions/file-upload.json | 17 +++++- .../src/__test__/test-definitions/grpc.json | 11 +++- .../__test__/test-definitions/literal.json | 20 ++++++- .../__test__/test-definitions/mixed-case.json | 14 ++++- .../__test__/test-definitions/pagination.json | 54 ++++++++++++++++--- .../test-definitions/query-parameters.json | 44 ++++++++++++++- .../test-definitions/reserved-keywords.json | 5 +- .../src/__test__/test-definitions/trace.json | 25 ++++++++- .../__test__/test-definitions/validation.json | 11 +++- .../src/converters/convertChannel.ts | 12 ++++- .../services/convertExampleEndpointCall.ts | 15 ++++-- .../src/examples/ExampleGenerator.ts | 10 ++-- .../ir-generator/src/filterExamples.ts | 43 ++++++++++----- 19 files changed, 321 insertions(+), 44 deletions(-) diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/code-samples-open-api.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/code-samples-open-api.json index 102edf55e17..4052ae4a0ea 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/code-samples-open-api.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/code-samples-open-api.json @@ -1289,6 +1289,9 @@ } }, "jsonExample": true + }, + "shape": { + "type": "single" } } ], @@ -1873,7 +1876,7 @@ } } }, - "id": "e3b2fb4112907027d3b290ac22a16838d6ccd505", + "id": "6246e9c8abf149a4f2208e6f97e7428c73304304", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/names.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/names.json index 5c28db0f33a..75c2cb41f14 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/names.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions-openapi/names.json @@ -2072,6 +2072,9 @@ } }, "jsonExample": true + }, + "shape": { + "type": "single" } } ], @@ -3193,7 +3196,7 @@ } } }, - "id": "17cb06f42ef3e907791491949be10e9ad2512b7a", + "id": "09320c04848180ad850ecc354591b55b1b2e07fe", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json index bbcb3958f09..c43e73d6cc8 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json @@ -2605,6 +2605,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -2989,7 +2992,7 @@ } } }, - "id": "862b080e4f18a8df48db67db50d4c9c7333e0544", + "id": "408256cccc9a7f51770d626cd71dda08093fd1ab", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json index 4c9761604c5..9ad8d042a20 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json @@ -3573,6 +3573,9 @@ } }, "jsonExample": ">" + }, + "shape": { + "type": "single" } }, { @@ -3692,6 +3695,9 @@ } }, "jsonExample": "red" + }, + "shape": { + "type": "single" } } ], @@ -3798,6 +3804,9 @@ } }, "jsonExample": ">" + }, + "shape": { + "type": "single" } }, { @@ -3919,6 +3928,9 @@ } }, "jsonExample": ">" + }, + "shape": { + "type": "single" } }, { @@ -4038,6 +4050,9 @@ } }, "jsonExample": "red" + }, + "shape": { + "type": "single" } }, { @@ -4196,6 +4211,9 @@ } }, "jsonExample": "red" + }, + "shape": { + "type": "single" } } ], @@ -4208,7 +4226,7 @@ "value": null } }, - "id": "70f3b852799eaab5aa81ca7d5e2990af9e9d526f", + "id": "d7cbff79c8a429333241d9b63b678e1e068509d9", "docs": null } } @@ -4656,6 +4674,9 @@ } }, "jsonExample": ">" + }, + "shape": { + "type": "exploded" } }, { @@ -4777,6 +4798,9 @@ } }, "jsonExample": ">" + }, + "shape": { + "type": "exploded" } }, { @@ -4896,6 +4920,9 @@ } }, "jsonExample": "red" + }, + "shape": { + "type": "exploded" } }, { @@ -5054,6 +5081,9 @@ } }, "jsonExample": "red" + }, + "shape": { + "type": "exploded" } } ], @@ -5066,7 +5096,7 @@ "value": null } }, - "id": "ac70095f16bc982cdde9b15553cdc440aae37411", + "id": "88ea4e8d196a4db2803c99039b1feca6ea630ae7", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json index d5e56904cc9..0fd66520c01 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json @@ -30245,6 +30245,9 @@ } }, "jsonExample": false + }, + "shape": { + "type": "single" } }, { @@ -30301,6 +30304,9 @@ } }, "jsonExample": "development" + }, + "shape": { + "type": "exploded" } } ], @@ -30555,6 +30561,9 @@ } }, "jsonExample": true + }, + "shape": { + "type": "single" } }, { @@ -30611,6 +30620,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -30766,7 +30778,7 @@ } } }, - "id": "7739f21c045a60042520aab5abf9e457dc9b314b", + "id": "7b2e7d2caca49f8a8316b80a3b4507343acd2506", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json index f057fd778aa..8c604816e35 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json @@ -49152,6 +49152,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -49186,6 +49189,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } } ], @@ -49198,7 +49204,7 @@ "value": null } }, - "id": "f5931ae8f96a427c9d8af9ef0e0739a39345c968", + "id": "9c6443c500884410e6d84fa25946c4019c7acc01", "docs": null } } @@ -49436,6 +49442,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } }, { @@ -49470,6 +49479,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "exploded" } } ], @@ -49482,7 +49494,7 @@ "value": null } }, - "id": "65d06651b6297bbaad6b0839321b73130e7933d1", + "id": "272d3919784e7615436e665003c98b141640401d", "docs": null } } @@ -49798,6 +49810,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -49810,7 +49825,7 @@ "value": null } }, - "id": "4a4b187fc9a32caf229af485f4b70dac8bee6bb8", + "id": "fe3a4eea696c0d4276c9f8ed2bcc5e604a478dba", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/file-upload.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/file-upload.json index 300ed530d2e..6c4925f66f7 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/file-upload.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/file-upload.json @@ -1377,6 +1377,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -1411,6 +1414,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -1465,6 +1471,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -1501,6 +1510,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } }, { @@ -1557,6 +1569,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -1569,7 +1584,7 @@ "value": null } }, - "id": "ac2c611c62bae6ad5db764e1395a18321d2d0fc5", + "id": "db2b26cb694191dbc725ec586875406b33c3dc0d", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json index f7919bc49f5..27a18485c25 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json @@ -3344,6 +3344,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -3394,6 +3397,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -3444,6 +3450,9 @@ } }, "jsonExample": 1.1 + }, + "shape": { + "type": "single" } } ], @@ -4547,7 +4556,7 @@ } } }, - "id": "e1ebad3f3c40049093aacc8613a1fe41a68173cf", + "id": "aabed8d2dafbcc66adcb980cb74f95755d89096b", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json index f4fb6d86a68..3bce75f6654 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json @@ -5318,6 +5318,9 @@ } }, "jsonExample": "You are a helpful assistant" + }, + "shape": { + "type": "single" } }, { @@ -5355,6 +5358,9 @@ } }, "jsonExample": false + }, + "shape": { + "type": "single" } }, { @@ -5391,6 +5397,9 @@ } }, "jsonExample": "What is the weather today" + }, + "shape": { + "type": "single" } } ], @@ -5683,6 +5692,9 @@ } }, "jsonExample": "You are a helpful assistant" + }, + "shape": { + "type": "single" } }, { @@ -5719,6 +5731,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -5756,6 +5771,9 @@ } }, "jsonExample": false + }, + "shape": { + "type": "single" } } ], @@ -5997,7 +6015,7 @@ } } }, - "id": "ef23d2acacf6c08b34180cc35134549400a33ccc", + "id": "675f7384ebc046f5e97ee9e6613b1e8bff24201b", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json index cb66c121c39..1d1eb6911e8 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json @@ -4718,6 +4718,9 @@ } }, "jsonExample": 10 + }, + "shape": { + "type": "single" } }, { @@ -4752,6 +4755,9 @@ } }, "jsonExample": "2023-01-01" + }, + "shape": { + "type": "single" } } ], @@ -5456,6 +5462,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -5490,6 +5499,9 @@ } }, "jsonExample": "2023-01-15" + }, + "shape": { + "type": "single" } } ], @@ -6148,7 +6160,7 @@ } } }, - "id": "ad9ec15d2c892c241c8dc3aad0b27896920b1ac8", + "id": "767c764c168cd0a6ff9119e32c1e1be32b110240", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json index 21663ecbb26..cfbbe6f3ebe 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json @@ -2987,6 +2987,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -3041,6 +3044,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -3238,6 +3244,9 @@ } }, "jsonExample": "asc" + }, + "shape": { + "type": "single" } }, { @@ -3294,6 +3303,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -3972,7 +3984,7 @@ } } }, - "id": "e13336d38667ea3ed61a79b7c0a8de118c7a2f7e", + "id": "ed06a1738a44aa17192fefeb230c77af711a195e", "docs": null } } @@ -6256,6 +6268,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -6310,6 +6325,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -6507,6 +6525,9 @@ } }, "jsonExample": "asc" + }, + "shape": { + "type": "single" } }, { @@ -6563,6 +6584,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -7241,7 +7265,7 @@ } } }, - "id": "e13336d38667ea3ed61a79b7c0a8de118c7a2f7e", + "id": "ed06a1738a44aa17192fefeb230c77af711a195e", "docs": null } } @@ -9323,6 +9347,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -9377,6 +9404,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -9574,6 +9604,9 @@ } }, "jsonExample": "asc" + }, + "shape": { + "type": "single" } } ], @@ -10252,7 +10285,7 @@ } } }, - "id": "1481b8fe907c7915b5f6c441d234fb3bd1c809c0", + "id": "922dba6719893b2abb0f05015a039c817d4b26da", "docs": null } } @@ -10743,6 +10776,9 @@ } }, "jsonExample": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + }, + "shape": { + "type": "single" } } ], @@ -11466,7 +11502,7 @@ } } }, - "id": "081f40460a6c04a8761d8d84c643c110334884e6", + "id": "44e09948bc29e03a1f81509ec0ab1d8de3523460", "docs": null } } @@ -11939,6 +11975,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -12078,7 +12117,7 @@ } } }, - "id": "a9df0c1f71f9916f5b8c23c2926bfb306cccbaaf", + "id": "5a5d019284cf5e00940aaaf8b6be5911291eea64", "docs": null } } @@ -12558,6 +12597,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } } ], @@ -12774,7 +12816,7 @@ } } }, - "id": "f97f68192d4af5fa738d4f87d238b0c2d51b0b7d", + "id": "0660466bfd665e6c6b382f7f875fc2cbae7139e6", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json index ce20eb35f3e..ca9795d3d2a 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json @@ -1530,6 +1530,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -1564,6 +1567,9 @@ } }, "jsonExample": "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + }, + "shape": { + "type": "single" } }, { @@ -1598,6 +1604,9 @@ } }, "jsonExample": "2023-01-15" + }, + "shape": { + "type": "single" } }, { @@ -1632,6 +1641,9 @@ } }, "jsonExample": "2024-01-15T09:30:00Z" + }, + "shape": { + "type": "single" } }, { @@ -1668,6 +1680,9 @@ } }, "jsonExample": "SGVsbG8gd29ybGQh" + }, + "shape": { + "type": "single" } }, { @@ -1999,6 +2014,9 @@ "string" ] } + }, + "shape": { + "type": "single" } }, { @@ -2416,6 +2434,9 @@ ] } ] + }, + "shape": { + "type": "single" } }, { @@ -2466,6 +2487,9 @@ } }, "jsonExample": "2024-01-15T09:30:00Z" + }, + "shape": { + "type": "single" } }, { @@ -2551,6 +2575,9 @@ "jsonExample": { "string": "string" } + }, + "shape": { + "type": "single" } }, { @@ -2607,6 +2634,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -3212,6 +3242,9 @@ ] } } + }, + "shape": { + "type": "single" } }, { @@ -3625,6 +3658,9 @@ "string" ] } + }, + "shape": { + "type": "single" } }, { @@ -3956,6 +3992,9 @@ "string" ] } + }, + "shape": { + "type": "exploded" } }, { @@ -3992,6 +4031,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -4310,7 +4352,7 @@ } } }, - "id": "f18d9c279504853c33fb9cfa107a6ab8600e3c35", + "id": "3953d34c734bf8597ba3791f18c3efe36bafdba4", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/reserved-keywords.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/reserved-keywords.json index 20998978eba..0e5e7bef1dd 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/reserved-keywords.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/reserved-keywords.json @@ -573,6 +573,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -585,7 +588,7 @@ "value": null } }, - "id": "d24c9070cbf405f9519af580507e5f44ee6125fc", + "id": "6e5ab08e71b1246d4f73ec22242d868b7ad3f93c", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json index 53a4876dfc2..5bad49f4ff1 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json @@ -90690,6 +90690,9 @@ } }, "jsonExample": "2024-01-15T09:30:00Z" + }, + "shape": { + "type": "single" } }, { @@ -90740,6 +90743,9 @@ } }, "jsonExample": "2024-01-15T09:30:00Z" + }, + "shape": { + "type": "single" } } ], @@ -91979,7 +91985,7 @@ } } }, - "id": "9a043f260b22419308d64c71d4d39de9ab223ae2", + "id": "59a5fe6fc47488bba9207b430d55565529c4436b", "docs": null } } @@ -92514,6 +92520,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -92550,6 +92559,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -92586,6 +92598,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } }, { @@ -92642,6 +92657,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } }, { @@ -92678,6 +92696,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -93567,7 +93588,7 @@ } } }, - "id": "62c5306ac205f9423540efe83c756ec512dd8482", + "id": "ad545e6fa6df1b5bb4d66405b8748fbd74e265fc", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/validation.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/validation.json index 3df9e792961..f26538c05b0 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/validation.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/validation.json @@ -2321,6 +2321,9 @@ } }, "jsonExample": 1.1 + }, + "shape": { + "type": "single" } }, { @@ -2355,6 +2358,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -2391,6 +2397,9 @@ } }, "jsonExample": "string" + }, + "shape": { + "type": "single" } } ], @@ -2739,7 +2748,7 @@ } } }, - "id": "079037cc77a3807e86ea63698c2df4d8b23c0a7f", + "id": "73be0de9adb5bb80f170b317d7db24b2058d53f8", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/converters/convertChannel.ts b/packages/cli/generation/ir-generator/src/converters/convertChannel.ts index 06a930ca883..0d539c81f3b 100644 --- a/packages/cli/generation/ir-generator/src/converters/convertChannel.ts +++ b/packages/cli/generation/ir-generator/src/converters/convertChannel.ts @@ -3,6 +3,7 @@ import { ExampleHeader, ExampleInlinedRequestBodyProperty, ExamplePathParameter, + ExampleQueryParameterShape, ExampleWebSocketMessage, ExampleWebSocketMessageBody, ExampleWebSocketSession, @@ -145,7 +146,8 @@ export async function convertChannel({ fileContainingRawTypeReference: file, fileContainingExample: file, workspace - }) + }), + shape: getQueryParamaterDeclationShape({ queryParameter: queryParameterDeclaration }) }; }) : [], @@ -171,6 +173,14 @@ export async function convertChannel({ }; } +function getQueryParamaterDeclationShape({ queryParameter }: { queryParameter: RawSchemas.HttpQueryParameterSchema }) { + const isAllowMultiple = + typeof queryParameter !== "string" && queryParameter["allow-multiple"] != null + ? queryParameter["allow-multiple"] + : false; + return isAllowMultiple ? ExampleQueryParameterShape.exploded() : ExampleQueryParameterShape.single(); +} + function convertExampleWebSocketMessageBody({ message, example, diff --git a/packages/cli/generation/ir-generator/src/converters/services/convertExampleEndpointCall.ts b/packages/cli/generation/ir-generator/src/converters/services/convertExampleEndpointCall.ts index ffaa4c4046d..6b3a359f3dc 100644 --- a/packages/cli/generation/ir-generator/src/converters/services/convertExampleEndpointCall.ts +++ b/packages/cli/generation/ir-generator/src/converters/services/convertExampleEndpointCall.ts @@ -5,10 +5,10 @@ import { ExampleHeader, ExampleInlinedRequestBodyProperty, ExamplePathParameter, + ExampleQueryParameterShape, ExampleRequestBody, ExampleResponse, - Name, - SupportedSdkLanguage + Name } from "@fern-api/ir-sdk"; import { FernWorkspace } from "@fern-api/workspace-loader"; import { @@ -99,7 +99,8 @@ export function convertExampleEndpointCall({ fileContainingRawTypeReference: file, fileContainingExample: file, workspace - }) + }), + shape: getQueryParamaterDeclationShape({ queryParameter: queryParameterDeclaration }) }; }) : [], @@ -116,6 +117,14 @@ export function convertExampleEndpointCall({ }; } +function getQueryParamaterDeclationShape({ queryParameter }: { queryParameter: RawSchemas.HttpQueryParameterSchema }) { + const isAllowMultiple = + typeof queryParameter !== "string" && queryParameter["allow-multiple"] != null + ? queryParameter["allow-multiple"] + : false; + return isAllowMultiple ? ExampleQueryParameterShape.exploded() : ExampleQueryParameterShape.single(); +} + function convertPathParameters({ service, endpoint, diff --git a/packages/cli/generation/ir-generator/src/examples/ExampleGenerator.ts b/packages/cli/generation/ir-generator/src/examples/ExampleGenerator.ts index 0ff0cd04048..86a624e3c90 100644 --- a/packages/cli/generation/ir-generator/src/examples/ExampleGenerator.ts +++ b/packages/cli/generation/ir-generator/src/examples/ExampleGenerator.ts @@ -11,6 +11,7 @@ import { ExampleObjectTypeWithTypeId, ExamplePathParameter, ExamplePrimitive, + ExampleQueryParameterShape, ExampleRequestBody, ExampleResponse, ExampleSingleUnionType, @@ -245,14 +246,15 @@ export class ExampleGenerator { .find((sh) => sh.name === h.name) }) ), - queryParameters: endpoint.queryParameters.map((q) => - this.generateHttpParameterExample({ + queryParameters: endpoint.queryParameters.map((q) => ({ + ...this.generateHttpParameterExample({ parameter: q, maybeParameterExample: examples .flatMap((example) => example.queryParameters) .find((qp) => qp.name === q.name) - }) - ), + }), + shape: q.allowMultiple ? ExampleQueryParameterShape.exploded() : ExampleQueryParameterShape.single() + })), request: endpoint.requestBody !== undefined ? this.generateRequestBodyExample({ diff --git a/packages/cli/generation/ir-generator/src/filterExamples.ts b/packages/cli/generation/ir-generator/src/filterExamples.ts index a145dcce49b..d5d6b9ede3c 100644 --- a/packages/cli/generation/ir-generator/src/filterExamples.ts +++ b/packages/cli/generation/ir-generator/src/filterExamples.ts @@ -3,19 +3,20 @@ import { ExampleContainer, ExampleEndpointCall, ExampleEndpointSuccessResponse, + ExampleHeader, ExampleInlinedRequestBodyProperty, ExampleKeyValuePair, ExampleNamedType, ExampleObjectProperty, ExamplePathParameter, + ExampleQueryParameter, ExampleRequestBody, ExampleResponse, ExampleSingleUnionTypeProperties, ExampleType, ExampleTypeReference, ExampleTypeReferenceShape, - ExampleTypeShape, - NameAndWireValue + ExampleTypeShape } from "@fern-api/ir-sdk"; import { FilteredIr } from "./filtered-ir/FilteredIr"; @@ -249,18 +250,36 @@ function filterExamplePathParameters({ .filter((param): param is ExamplePathParameter => param !== undefined); } -interface ExampleHeaderOrQuery { - name: NameAndWireValue; - value: ExampleTypeReference; +function filterExampleQueryParameters({ + filteredIr, + queryParameters +}: { + filteredIr: FilteredIr; + queryParameters: ExampleQueryParameter[]; +}): ExampleQueryParameter[] { + return queryParameters + .map((queryParameter) => { + const filteredQueryParameter = filterExampleTypeReference({ + filteredIr, + exampleTypeReference: queryParameter.value + }); + return filteredQueryParameter !== undefined + ? { + ...queryParameter, + value: filteredQueryParameter + } + : undefined; + }) + .filter((queryParameter): queryParameter is ExampleQueryParameter => queryParameter !== undefined); } -function filterExampleHeaderOrQuery({ +function filterExampleHeader({ filteredIr, headers }: { filteredIr: FilteredIr; - headers: ExampleHeaderOrQuery[]; -}): ExampleHeaderOrQuery[] { + headers: ExampleHeader[]; +}): ExampleHeader[] { return headers .map((header) => { const filteredHeader = filterExampleTypeReference({ filteredIr, exampleTypeReference: header.value }); @@ -271,7 +290,7 @@ function filterExampleHeaderOrQuery({ } : undefined; }) - .filter((header): header is ExampleHeaderOrQuery => header !== undefined); + .filter((header): header is ExampleHeader => header !== undefined); } function filterExampleRequestBody({ @@ -391,9 +410,9 @@ export function filterEndpointExample({ filteredIr, pathParameters: example.endpointPathParameters }), - serviceHeaders: filterExampleHeaderOrQuery({ filteredIr, headers: example.serviceHeaders }), - endpointHeaders: filterExampleHeaderOrQuery({ filteredIr, headers: example.endpointHeaders }), - queryParameters: filterExampleHeaderOrQuery({ filteredIr, headers: example.queryParameters }), + serviceHeaders: filterExampleHeader({ filteredIr, headers: example.serviceHeaders }), + endpointHeaders: filterExampleHeader({ filteredIr, headers: example.endpointHeaders }), + queryParameters: filterExampleQueryParameters({ filteredIr, queryParameters: example.queryParameters }), request: example.request !== undefined ? filterExampleRequestBody({ filteredIr, requestBody: example.request }) From d6ae2c1c797b108b0c89d0e52a574fbb0120ffb0 Mon Sep 17 00:00:00 2001 From: dcb6 Date: Wed, 7 Aug 2024 13:15:19 -0400 Subject: [PATCH 3/6] update --- .../__snapshots__/dependencies.test.ts.snap | 2 +- .../tests/ir/__snapshots__/ir.test.ts.snap | 26 +++++- .../apis/ir-types-latest/definition/http.yml | 13 +-- .../http/types/ExampleQueryParameter.ts | 1 + .../http/types/ExampleQueryParameterShape.ts | 89 +++++++++++++++++++ .../src/sdk/api/resources/http/types/index.ts | 1 + .../http/types/ExampleQueryParameter.ts | 2 + .../http/types/ExampleQueryParameterShape.ts | 51 +++++++++++ .../resources/http/types/index.ts | 1 + 9 files changed, 171 insertions(+), 15 deletions(-) create mode 100644 packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameterShape.ts create mode 100644 packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameterShape.ts diff --git a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap index d61732aaaff..825beecec01 100644 --- a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap @@ -856,4 +856,4 @@ exports[`dependencies correctly incorporates dependencies 1`] = ` }" `; -exports[`dependencies file dependencies 1`] = `3033661`; +exports[`dependencies file dependencies 1`] = `3044676`; diff --git a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap index bc1ab095154..3ab3b730ec6 100644 --- a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap @@ -30827,6 +30827,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "hello" + }, + "shape": { + "type": "exploded" } } ], @@ -31483,6 +31486,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "hello" + }, + "shape": { + "type": "exploded" } } ], @@ -31758,6 +31764,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -32224,7 +32233,7 @@ exports[`ir {"name":"simple"} 1`] = ` } } }, - "id": "c31d0a00f664df9938064fde5ab39352e548bd05", + "id": "47d60c6da5ad4b21704aaf5f4211a39e93d5f522", "docs": null } }, @@ -32413,6 +32422,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -32879,7 +32891,7 @@ exports[`ir {"name":"simple"} 1`] = ` } } }, - "id": "1be4f34f8b77401ebd38f067fb5e87c0c4053a6e", + "id": "30f2e3407ed91d03972d4afb1f1c4dc7905e9434", "docs": null } }, @@ -33068,6 +33080,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -33142,7 +33157,7 @@ exports[`ir {"name":"simple"} 1`] = ` }, "body": null }, - "id": "b1abc4b36c6b66836558d64000446b6bb9f3a8bd", + "id": "48a3358d8e645e4e51885065f3ebca5b73af892f", "docs": null } }, @@ -33331,6 +33346,9 @@ exports[`ir {"name":"simple"} 1`] = ` } }, "jsonExample": "string" + }, + "shape": { + "type": "exploded" } } ], @@ -33405,7 +33423,7 @@ exports[`ir {"name":"simple"} 1`] = ` }, "body": null }, - "id": "0a1b7d4c2ef7232675d53dd288caf70cdd8fbb23", + "id": "30eb305f582686eded95ae215d9551bdb1f53351", "docs": null } } diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml index 320249913b3..5ad8a7bd8d8 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/http.yml @@ -403,16 +403,9 @@ types: ExampleQueryParameterShape: union: - single: SingleExampleQueryParameter - exploded: ExplodedExampleQueryParameter - commaSeparated: CommaSeparatedExampleQueryParameter - - SingleExampleQueryParameter: - properties: {} - ExplodedExampleQueryParameter: - properties: {} - CommaSeparatedExampleQueryParameter: - properties: {} + single: {} + exploded: {} + commaSeparated: {} ExampleHeader: properties: diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameter.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameter.ts index 2ace09761aa..a63ac9545a0 100644 --- a/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameter.ts +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameter.ts @@ -7,4 +7,5 @@ import * as FernIr from "../../.."; export interface ExampleQueryParameter { name: FernIr.NameAndWireValue; value: FernIr.ExampleTypeReference; + shape: FernIr.ExampleQueryParameterShape | undefined; } diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameterShape.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameterShape.ts new file mode 100644 index 00000000000..2cce7ae239d --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/ExampleQueryParameterShape.ts @@ -0,0 +1,89 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../.."; + +export type ExampleQueryParameterShape = + | FernIr.ExampleQueryParameterShape.Single + | FernIr.ExampleQueryParameterShape.Exploded + | FernIr.ExampleQueryParameterShape.CommaSeparated; + +export declare namespace ExampleQueryParameterShape { + interface Single extends _Utils { + type: "single"; + } + + interface Exploded extends _Utils { + type: "exploded"; + } + + interface CommaSeparated extends _Utils { + type: "commaSeparated"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.ExampleQueryParameterShape._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + single: () => _Result; + exploded: () => _Result; + commaSeparated: () => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const ExampleQueryParameterShape = { + single: (): FernIr.ExampleQueryParameterShape.Single => { + return { + type: "single", + _visit: function <_Result>( + this: FernIr.ExampleQueryParameterShape.Single, + visitor: FernIr.ExampleQueryParameterShape._Visitor<_Result> + ) { + return FernIr.ExampleQueryParameterShape._visit(this, visitor); + }, + }; + }, + + exploded: (): FernIr.ExampleQueryParameterShape.Exploded => { + return { + type: "exploded", + _visit: function <_Result>( + this: FernIr.ExampleQueryParameterShape.Exploded, + visitor: FernIr.ExampleQueryParameterShape._Visitor<_Result> + ) { + return FernIr.ExampleQueryParameterShape._visit(this, visitor); + }, + }; + }, + + commaSeparated: (): FernIr.ExampleQueryParameterShape.CommaSeparated => { + return { + type: "commaSeparated", + _visit: function <_Result>( + this: FernIr.ExampleQueryParameterShape.CommaSeparated, + visitor: FernIr.ExampleQueryParameterShape._Visitor<_Result> + ) { + return FernIr.ExampleQueryParameterShape._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.ExampleQueryParameterShape, + visitor: FernIr.ExampleQueryParameterShape._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "single": + return visitor.single(); + case "exploded": + return visitor.exploded(); + case "commaSeparated": + return visitor.commaSeparated(); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts b/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts index da94e6505ec..ab7637a21e9 100644 --- a/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts +++ b/packages/ir-sdk/src/sdk/api/resources/http/types/index.ts @@ -55,6 +55,7 @@ export * from "./ExampleCodeSampleSdk"; export * from "./SupportedSdkLanguage"; export * from "./ExamplePathParameter"; export * from "./ExampleQueryParameter"; +export * from "./ExampleQueryParameterShape"; export * from "./ExampleHeader"; export * from "./ExampleRequestBody"; export * from "./ExampleInlinedRequestBody"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameter.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameter.ts index eeac86110d8..3c668f9fb65 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameter.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameter.ts @@ -12,11 +12,13 @@ export const ExampleQueryParameter: core.serialization.ObjectSchema< > = core.serialization.objectWithoutOptionalProperties({ name: core.serialization.lazyObject(async () => (await import("../../..")).NameAndWireValue), value: core.serialization.lazyObject(async () => (await import("../../..")).ExampleTypeReference), + shape: core.serialization.lazy(async () => (await import("../../..")).ExampleQueryParameterShape).optional(), }); export declare namespace ExampleQueryParameter { interface Raw { name: serializers.NameAndWireValue.Raw; value: serializers.ExampleTypeReference.Raw; + shape?: serializers.ExampleQueryParameterShape.Raw | null; } } diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameterShape.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameterShape.ts new file mode 100644 index 00000000000..9bae1a6f3bc --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/ExampleQueryParameterShape.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../.."; +import * as FernIr from "../../../../api"; +import * as core from "../../../../core"; + +export const ExampleQueryParameterShape: core.serialization.Schema< + serializers.ExampleQueryParameterShape.Raw, + FernIr.ExampleQueryParameterShape +> = core.serialization + .union("type", { + single: core.serialization.object({}), + exploded: core.serialization.object({}), + commaSeparated: core.serialization.object({}), + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "single": + return FernIr.ExampleQueryParameterShape.single(); + case "exploded": + return FernIr.ExampleQueryParameterShape.exploded(); + case "commaSeparated": + return FernIr.ExampleQueryParameterShape.commaSeparated(); + default: + return value as FernIr.ExampleQueryParameterShape; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace ExampleQueryParameterShape { + type Raw = + | ExampleQueryParameterShape.Single + | ExampleQueryParameterShape.Exploded + | ExampleQueryParameterShape.CommaSeparated; + + interface Single { + type: "single"; + } + + interface Exploded { + type: "exploded"; + } + + interface CommaSeparated { + type: "commaSeparated"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts index da94e6505ec..ab7637a21e9 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/http/types/index.ts @@ -55,6 +55,7 @@ export * from "./ExampleCodeSampleSdk"; export * from "./SupportedSdkLanguage"; export * from "./ExamplePathParameter"; export * from "./ExampleQueryParameter"; +export * from "./ExampleQueryParameterShape"; export * from "./ExampleHeader"; export * from "./ExampleRequestBody"; export * from "./ExampleInlinedRequestBody"; From 699ec2572d79e280ef54ea81ab08044cc95ffd51 Mon Sep 17 00:00:00 2001 From: dcb6 Date: Mon, 12 Aug 2024 14:31:17 -0400 Subject: [PATCH 4/6] test diff --- .../__test__/test-definitions/audiences.json | 6 +-- .../src/__test__/test-definitions/enum.json | 12 +---- .../__test__/test-definitions/examples.json | 6 +-- .../__test__/test-definitions/exhaustive.json | 18 ++----- .../src/__test__/test-definitions/grpc.json | 6 +-- .../__test__/test-definitions/literal.json | 6 +-- .../__test__/test-definitions/mixed-case.json | 6 +-- .../__test__/test-definitions/pagination.json | 47 +++++++------------ .../test-definitions/query-parameters.json | 6 +-- .../src/__test__/test-definitions/trace.json | 12 +---- 10 files changed, 29 insertions(+), 96 deletions(-) diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json index 5d5a8d69ab9..6b4994638ff 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/audiences.json @@ -3023,11 +3023,7 @@ } } }, -<<<<<<< HEAD - "id": "408256cccc9a7f51770d626cd71dda08093fd1ab", -======= - "id": "b9e628d816c7ef24dbdb994cda6432e6fb1e45e9", ->>>>>>> main + "id": "7b87c786ba2352af3e217c9322a8a6992133d30f", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json index 3f85242239b..81fbb2b27cd 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/enum.json @@ -4250,11 +4250,7 @@ "value": null } }, -<<<<<<< HEAD - "id": "d7cbff79c8a429333241d9b63b678e1e068509d9", -======= - "id": "4f2b30d5732adefe0bc9a57b508f5bd5087b68f0", ->>>>>>> main + "id": "ac1d63cb9117225daaa9ec548a288467537d1541", "docs": null } } @@ -5124,11 +5120,7 @@ "value": null } }, -<<<<<<< HEAD - "id": "88ea4e8d196a4db2803c99039b1feca6ea630ae7", -======= - "id": "b4f5c6af49b084fac62b9adb7494437d70f94757", ->>>>>>> main + "id": "266c5d301f2b32377e7157ba8eb04c582188686e", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json index 881a87655a4..d059107a69b 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/examples.json @@ -30896,11 +30896,7 @@ } } }, -<<<<<<< HEAD - "id": "7b2e7d2caca49f8a8316b80a3b4507343acd2506", -======= - "id": "fd9b690d002357d8c4bc82a17515623f15b64ac2", ->>>>>>> main + "id": "433b6a5115d162b754cf027ddae0b2ddc98aa057", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json index 74bbf9235ea..d9821c7d1ff 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/exhaustive.json @@ -49265,11 +49265,7 @@ "value": null } }, -<<<<<<< HEAD - "id": "9c6443c500884410e6d84fa25946c4019c7acc01", -======= - "id": "31b2c583808e2cf180228664ce80115acaa75564", ->>>>>>> main + "id": "6526ef0ccb7ba40d9a2c3da67f0708f894dbad7f", "docs": null } } @@ -49559,11 +49555,7 @@ "value": null } }, -<<<<<<< HEAD - "id": "272d3919784e7615436e665003c98b141640401d", -======= - "id": "11b6c0e0d85f59fda4e9dea68de0be49692c038d", ->>>>>>> main + "id": "7b770f67a61e098891f83a6766c7cb36b3992f07", "docs": null } } @@ -49894,11 +49886,7 @@ "value": null } }, -<<<<<<< HEAD - "id": "fe3a4eea696c0d4276c9f8ed2bcc5e604a478dba", -======= - "id": "2e6d41b844b55ad16a9d2296c09c3e87ab43a033", ->>>>>>> main + "id": "9e6c8c50e4982faf3ee883fd593e9482276bad9a", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json index e7a5cbdd10e..2cf8e42bc2f 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/grpc.json @@ -4589,11 +4589,7 @@ } } }, -<<<<<<< HEAD - "id": "aabed8d2dafbcc66adcb980cb74f95755d89096b", -======= - "id": "74185cff40862ab2636a39e7f6a829524d296cb9", ->>>>>>> main + "id": "d18e2718b72454fbf6ceb78d70208da93c0f2b09", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json index 0531294d9ff..fe787e9b931 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/literal.json @@ -6047,11 +6047,7 @@ } } }, -<<<<<<< HEAD - "id": "675f7384ebc046f5e97ee9e6613b1e8bff24201b", -======= - "id": "6e82e9406c170062638ae18e9ecc61af60047249", ->>>>>>> main + "id": "cfdabcd8ad8a805d71102459c8670d238b09324a", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json index b25f8b75d50..5eba2845979 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/mixed-case.json @@ -6181,11 +6181,7 @@ } } }, -<<<<<<< HEAD - "id": "767c764c168cd0a6ff9119e32c1e1be32b110240", -======= - "id": "2ad8e2e5737c50fb8ec3f429587db195b69dd3ca", ->>>>>>> main + "id": "49bdd315d3187f56322bb06f45a5ad607801690b", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json index f369e41d518..e0adc7603a0 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/pagination.json @@ -4183,11 +4183,7 @@ } } }, -<<<<<<< HEAD - "id": "ed06a1738a44aa17192fefeb230c77af711a195e", -======= - "id": "4ea089f34823871a5139f5c20ed1c768c85300ed", ->>>>>>> main + "id": "c1ee45b68dcbeaac49bd0631fac443c344c339a8", "docs": null } } @@ -7700,11 +7696,7 @@ } } }, -<<<<<<< HEAD - "id": "ed06a1738a44aa17192fefeb230c77af711a195e", -======= - "id": "4ea089f34823871a5139f5c20ed1c768c85300ed", ->>>>>>> main + "id": "c1ee45b68dcbeaac49bd0631fac443c344c339a8", "docs": null } } @@ -10958,11 +10950,7 @@ } } }, -<<<<<<< HEAD - "id": "922dba6719893b2abb0f05015a039c817d4b26da", -======= - "id": "1dc91d3f0fcb5b5669c17061bab8757b01a4b722", ->>>>>>> main + "id": "4a136f7454631af3dc2e4998f0c8984319280de7", "docs": null } } @@ -11652,6 +11640,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -11706,6 +11697,9 @@ } }, "jsonExample": 1 + }, + "shape": { + "type": "single" } }, { @@ -11903,6 +11897,9 @@ } }, "jsonExample": "asc" + }, + "shape": { + "type": "single" } } ], @@ -12697,7 +12694,7 @@ } } }, - "id": "1dc91d3f0fcb5b5669c17061bab8757b01a4b722", + "id": "4a136f7454631af3dc2e4998f0c8984319280de7", "docs": null } } @@ -13960,11 +13957,7 @@ } } }, -<<<<<<< HEAD - "id": "44e09948bc29e03a1f81509ec0ab1d8de3523460", -======= - "id": "41ee9b536c5cc3337e65e1057f07dec678c6185f", ->>>>>>> main + "id": "3a9598c36296f95cae97b633fbb72b13ae796752", "docs": null } } @@ -14579,11 +14572,7 @@ } } }, -<<<<<<< HEAD - "id": "5a5d019284cf5e00940aaaf8b6be5911291eea64", -======= - "id": "a26b6922f6b8c4abf752370b2c64f8509c652cc2", ->>>>>>> main + "id": "7976aa0c67abf77dd060bfb4b64dd3eea15c0151", "docs": null } } @@ -15282,11 +15271,7 @@ } } }, -<<<<<<< HEAD - "id": "0660466bfd665e6c6b382f7f875fc2cbae7139e6", -======= - "id": "d46e553e2c2d122619b8123a0e80158d0ae66782", ->>>>>>> main + "id": "9c34520cf167549286b39d9553bad39f82e535e1", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json index c9eeaa3aca0..fb1eeccbd91 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/query-parameters.json @@ -4363,11 +4363,7 @@ } } }, -<<<<<<< HEAD - "id": "3953d34c734bf8597ba3791f18c3efe36bafdba4", -======= - "id": "96bf2fdd4526d9acbd82a709bee381764b4f4ad8", ->>>>>>> main + "id": "c4be9a325df719e21dbfba536e8881635fef52de", "docs": null } } diff --git a/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json b/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json index 260b943f7be..f85d66b3213 100644 --- a/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json +++ b/packages/cli/generation/ir-generator/src/__test__/test-definitions/trace.json @@ -92640,11 +92640,7 @@ } } }, -<<<<<<< HEAD - "id": "59a5fe6fc47488bba9207b430d55565529c4436b", -======= - "id": "672abd2b0b69eef9009d0d4baf768d0b27f525de", ->>>>>>> main + "id": "60b08d8215202cf3420c19cac4c4eda835e015b3", "docs": null } } @@ -94247,11 +94243,7 @@ } } }, -<<<<<<< HEAD - "id": "ad545e6fa6df1b5bb4d66405b8748fbd74e265fc", -======= - "id": "adf70dd79292aaa077199f7fd17ae2963f81d6e6", ->>>>>>> main + "id": "8f5ba8cbacaafa6b538af8fe991f4037b899613f", "docs": null } } From 45fdb1a1d265e91a6f49760e6e04b114c70e4b60 Mon Sep 17 00:00:00 2001 From: dcb6 Date: Mon, 12 Aug 2024 14:35:09 -0400 Subject: [PATCH 5/6] fix straggler diff --- .../dependencies/__snapshots__/dependencies.test.ts.snap | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap index 0b13ac8a0c4..2c5773a7f5a 100644 --- a/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/dependencies/__snapshots__/dependencies.test.ts.snap @@ -871,9 +871,6 @@ exports[`dependencies > correctly incorporates dependencies 1`] = ` }" `; -<<<<<<< HEAD -exports[`dependencies file dependencies 1`] = `3044676`; -======= exports[`dependencies > file dependencies 1`] = `3037640`; exports[`dependencies correctly incorporates dependencies 1`] = ` @@ -1748,4 +1745,3 @@ exports[`dependencies correctly incorporates dependencies 1`] = ` `; exports[`dependencies file dependencies 1`] = `3037640`; ->>>>>>> main From 3eed3111c4d60eeb8e9c30f2601ce316a5412c9e Mon Sep 17 00:00:00 2001 From: dcb6 Date: Mon, 12 Aug 2024 14:49:24 -0400 Subject: [PATCH 6/6] changelog --- packages/ir-sdk/fern/apis/ir-types-latest/VERSION | 2 +- .../ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION index 10ea0b05819..73e7b35be7d 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION +++ b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION @@ -1 +1 @@ -53.6.0 +53.7.0 diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md b/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md index 4dcf34e2f09..0feb67b27f2 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md +++ b/packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v53.7.0] - 2024-08-12 + +- Improvement: The IR now contains a `shape` field on the `ExampleQueryParameter` type that denotes whether the parameter + allows multiple values, and if so, whether they should be comma-separated or exploded. + ## [v53.6.0] - 2024-08-05 - Internal: Bump to the latest typescript SDK generator.