@fern-api/fdr-sdk 1.2.158-2a3de2b6ef → 1.2.158-3ca6ed3799

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.
@@ -7572,6 +7572,7 @@ __export(api_definition_exports, {
7572
7572
  joiner: () => joiner,
7573
7573
  preprocessQueryParameters: () => preprocessQueryParameters,
7574
7574
  prune: () => prune,
7575
+ pruneEndpointForExampleSnippet: () => pruneEndpointForExampleSnippet,
7575
7576
  pruneEndpointToSchemaSelector: () => pruneEndpointToSchemaSelector,
7576
7577
  replaceMultipartTemplateStrings: () => replaceMultipartTemplateStrings,
7577
7578
  replaceTemplateStrings: () => replaceTemplateStrings,
@@ -10675,6 +10676,34 @@ var ApiDefinitionV1ToLatest = class _ApiDefinitionV1ToLatest {
10675
10676
  );
10676
10677
  };
10677
10678
 
10679
+ // src/api-definition/prune-endpoint-example.ts
10680
+ function pruneEndpointForExampleSnippet(endpoint, exampleName) {
10681
+ const matching = exampleName != null ? endpoint.examples?.filter((example) => example.name === exampleName) : void 0;
10682
+ const examples = matching != null && matching.length > 0 ? matching : endpoint.examples;
10683
+ return {
10684
+ id: endpoint.id,
10685
+ namespace: endpoint.namespace,
10686
+ method: endpoint.method,
10687
+ path: endpoint.path,
10688
+ displayName: endpoint.displayName,
10689
+ operationId: endpoint.operationId,
10690
+ availability: endpoint.availability,
10691
+ auth: endpoint.auth,
10692
+ multiAuth: endpoint.multiAuth,
10693
+ defaultEnvironment: endpoint.defaultEnvironment,
10694
+ environments: endpoint.environments,
10695
+ errors: endpoint.errors?.map((error) => ({
10696
+ name: error.name,
10697
+ statusCode: error.statusCode,
10698
+ isWildcard: error.isWildcard,
10699
+ examples: error.examples
10700
+ })),
10701
+ examples,
10702
+ protocol: endpoint.protocol,
10703
+ includeInApiExplorer: endpoint.includeInApiExplorer
10704
+ };
10705
+ }
10706
+
10678
10707
  // src/api-definition/prune-endpoint-schema.ts
10679
10708
  var ALL_SECTIONS = ["request.path", "request.query", "request.body", "response.body"];
10680
10709
  function getSchemaSectionsForSelector(selector) {