diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml deleted file mode 100644 index 0f826140ae69..000000000000 --- a/.github/workflows/cli-release.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Release CLI - -on: - push: - branches: - - main - paths: - - "packages/cli/cli/versions.yml" - -# Add this permissions block -permissions: - contents: write - pull-requests: write - -env: - DO_NOT_TRACK: "1" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - run: - if: github.repository == 'fern-api/fern' - runs-on: ubuntu-latest - outputs: - version: ${{ steps.get_version.outputs.VERSION }} - steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - ref: main - fetch-depth: 2 - - - name: Install - uses: ./.github/actions/install - - - name: Get version from file - id: get_version - run: | - previous_commit=$(git log -n 2 --pretty=format:"%h" -- packages/cli/cli/versions.yml | tail -n 1) - current_commit=$(git log -n 1 --pretty=format:"%h" -- packages/cli/cli/versions.yml) - - # Get the previous version of the file using the specific commit that last changed it - git show ${previous_commit}:packages/cli/cli/versions.yml > tmp_cli_previous_versions.yml - - echo "Preview of the previous file (${previous_commit})" - head tmp_cli_previous_versions.yml - - echo "Preview of the current file (${current_commit})" - head packages/cli/cli/versions.yml - - pnpm seed:local latest cli -o "version.txt" --changelog packages/cli/cli/versions.yml --previous-changelog tmp_cli_previous_versions.yml - - if [ ! -f version.txt ]; then - echo "File not found! Skipping release." - echo "HAS_NEW_VERSION=false" >> $GITHUB_OUTPUT - else - echo "HAS_NEW_VERSION=true" >> $GITHUB_OUTPUT - echo "VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT - fi - - - name: Determine if prerelease - id: check_prerelease - if: steps.get_version.outputs.HAS_NEW_VERSION == 'true' - run: | - if [[ "${{ steps.get_version.outputs.VERSION }}" == *"rc"* ]]; then - echo "IS_PRERELEASE=true" >> $GITHUB_OUTPUT - else - echo "IS_PRERELEASE=false" >> $GITHUB_OUTPUT - fi - - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v3 - if: steps.get_version.outputs.HAS_NEW_VERSION == 'true' - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag_name: ${{ steps.get_version.outputs.VERSION }} - name: ${{ steps.get_version.outputs.VERSION }} - draft: false - prerelease: ${{ steps.check_prerelease.outputs.IS_PRERELEASE }} - - - name: Display Release URL - if: steps.get_version.outputs.HAS_NEW_VERSION == 'true' - run: echo "Release created at ${{ steps.create_release.outputs.url }}" diff --git a/generators/java/generator-utils/src/main/java/com/fern/java/generators/UndiscriminatedUnionGenerator.java b/generators/java/generator-utils/src/main/java/com/fern/java/generators/UndiscriminatedUnionGenerator.java index 392b97ff6da9..cbb0eb249f46 100644 --- a/generators/java/generator-utils/src/main/java/com/fern/java/generators/UndiscriminatedUnionGenerator.java +++ b/generators/java/generator-utils/src/main/java/com/fern/java/generators/UndiscriminatedUnionGenerator.java @@ -601,12 +601,24 @@ private TypeSpec getDeserializer() { .endControlFlow(); } } - for (int i = 0; i < membersWithoutLiterals.size(); ++i) { - UndiscriminatedUnionMember member = membersWithoutLiterals.get(i); + // Sort: members with required key guards first, then unguarded (all-optional) members last. + // This prevents all-optional object types from greedily matching payloads intended for + // more specific members — e.g. PayMethodCloud (0 required keys) consuming {"achHolder":"x"} + // before Check (1 required key) gets a chance. + List nonPrimitiveMembers = membersWithoutLiterals.stream() + .filter(m -> { + TypeName tn = memberTypeNames.get(m); + return !tn.isPrimitive() && !tn.isBoxedPrimitive(); + }) + .collect(Collectors.toList()); + nonPrimitiveMembers.sort((a, b) -> { + boolean aHasGuard = !getRequiredWireKeys(a).isEmpty(); + boolean bHasGuard = !getRequiredWireKeys(b).isEmpty(); + if (aHasGuard == bHasGuard) return 0; + return aHasGuard ? -1 : 1; + }); + for (UndiscriminatedUnionMember member : nonPrimitiveMembers) { TypeName typeName = memberTypeNames.get(member); - if (typeName.isPrimitive() || typeName.isBoxedPrimitive()) { - continue; - } List requiredKeys = getRequiredWireKeys(member); boolean hasRequiredKeyGuard = !requiredKeys.isEmpty(); if (hasRequiredKeyGuard) { diff --git a/generators/java/sdk/changes/4.8.7/fix-undiscriminated-union-all-optional-ordering.yml b/generators/java/sdk/changes/4.8.7/fix-undiscriminated-union-all-optional-ordering.yml new file mode 100644 index 000000000000..65d82707517a --- /dev/null +++ b/generators/java/sdk/changes/4.8.7/fix-undiscriminated-union-all-optional-ordering.yml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=../../../../../fern-changes-yml.schema.json + +- summary: | + Fix undiscriminated union deserialization when one member has all-optional fields. + Previously, an all-optional object variant (e.g. `PayMethodCloud`) could greedily + consume a payload intended for a more specific variant with required fields (e.g. + `Check` requiring `achHolder`), because Jackson's `@JsonIgnoreProperties(ignoreUnknown=true)` + silently accepts any JSON object when all fields are optional. The deserializer now + emits guarded members (those with at least one required field) before unguarded + (all-optional) members, ensuring the more specific match wins. + type: fix diff --git a/generators/java/sdk/versions.yml b/generators/java/sdk/versions.yml index 0c2a7f0a4f70..3650dbc75b69 100644 --- a/generators/java/sdk/versions.yml +++ b/generators/java/sdk/versions.yml @@ -1,4 +1,17 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 4.8.7 + changelogEntry: + - summary: | + Fix undiscriminated union deserialization when one member has all-optional fields. + Previously, an all-optional object variant (e.g. `PayMethodCloud`) could greedily + consume a payload intended for a more specific variant with required fields (e.g. + `Check` requiring `achHolder`), because Jackson's `@JsonIgnoreProperties(ignoreUnknown=true)` + silently accepts any JSON object when all fields are optional. The deserializer now + emits guarded members (those with at least one required field) before unguarded + (all-optional) members, ensuring the more specific match wins. + type: fix + createdAt: "2026-05-12" + irVersion: 66 - version: 4.8.6 changelogEntry: - summary: | diff --git a/generators/ruby-v2/ast/src/ast/Comment.ts b/generators/ruby-v2/ast/src/ast/Comment.ts index eecac0548695..3a8cd13d1630 100644 --- a/generators/ruby-v2/ast/src/ast/Comment.ts +++ b/generators/ruby-v2/ast/src/ast/Comment.ts @@ -21,7 +21,7 @@ export class Comment extends AstNode { } public write(writer: Writer): void { - if (this.docs != null) { + if (this.docs?.trim()) { this.docs.split("\n").forEach((line) => { const wrappedLines = this.wrapLine(line, writer); wrappedLines.forEach((wrappedLine) => { diff --git a/generators/ruby-v2/sdk/changes/1.12.7/fix-empty-comment-rubocop.yml b/generators/ruby-v2/sdk/changes/1.12.7/fix-empty-comment-rubocop.yml new file mode 100644 index 000000000000..99a39c40412e --- /dev/null +++ b/generators/ruby-v2/sdk/changes/1.12.7/fix-empty-comment-rubocop.yml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../../../../fern-changes-yml.schema.json + +- summary: | + Fix `Layout/EmptyComment` RuboCop offense emitted for types with no + description. The AST `Comment` node now skips writing when `docs` is + empty or whitespace-only, so undocumented model classes no longer + produce a bare `#` line above their class definition. + type: fix diff --git a/generators/ruby-v2/sdk/changes/1.12.8/fix-empty-comment-rubocop.yml b/generators/ruby-v2/sdk/changes/1.12.8/fix-empty-comment-rubocop.yml new file mode 100644 index 000000000000..99a39c40412e --- /dev/null +++ b/generators/ruby-v2/sdk/changes/1.12.8/fix-empty-comment-rubocop.yml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=../../../../../fern-changes-yml.schema.json + +- summary: | + Fix `Layout/EmptyComment` RuboCop offense emitted for types with no + description. The AST `Comment` node now skips writing when `docs` is + empty or whitespace-only, so undocumented model classes no longer + produce a bare `#` line above their class definition. + type: fix diff --git a/generators/ruby-v2/sdk/versions.yml b/generators/ruby-v2/sdk/versions.yml index 820e38bd9052..ddd34339174e 100644 --- a/generators/ruby-v2/sdk/versions.yml +++ b/generators/ruby-v2/sdk/versions.yml @@ -1,4 +1,24 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 1.12.8 + changelogEntry: + - summary: | + Fix `Layout/EmptyComment` RuboCop offense emitted for types with no + description. The AST `Comment` node now skips writing when `docs` is + empty or whitespace-only, so undocumented model classes no longer + produce a bare `#` line above their class definition. + type: fix + createdAt: "2026-05-12" + irVersion: 66 +- version: 1.12.7 + changelogEntry: + - summary: | + Fix `Layout/EmptyComment` RuboCop offense emitted for types with no + description. The AST `Comment` node now skips writing when `docs` is + empty or whitespace-only, so undocumented model classes no longer + produce a bare `#` line above their class definition. + type: fix + createdAt: "2026-05-12" + irVersion: 66 - version: 1.12.6 changelogEntry: - summary: | diff --git a/generators/rust/base/src/asIs/pagination.rs b/generators/rust/base/src/asIs/pagination.rs index 3853d2856ec1..6170b0299215 100644 --- a/generators/rust/base/src/asIs/pagination.rs +++ b/generators/rust/base/src/asIs/pagination.rs @@ -526,7 +526,7 @@ mod tests { fn test_sync_paginator_error_propagation() { let client = make_http_client(); let mut paginator = SyncPaginator::::new(client, |_client, _cursor| { - Err(ApiError::Serialization("test error".to_string())) + Err(ApiError::Configuration("test error".to_string())) }, None).unwrap(); let result = paginator.next_page(); @@ -537,7 +537,7 @@ mod tests { fn test_sync_paginator_iterator_error() { let client = make_http_client(); let mut paginator = SyncPaginator::::new(client, |_client, _cursor| { - Err(ApiError::Serialization("test error".to_string())) + Err(ApiError::Configuration("test error".to_string())) }, None).unwrap(); let item = paginator.next(); diff --git a/generators/rust/sdk/changes/0.36.6/fix-wire-test-environment-and-pagination-error.yml b/generators/rust/sdk/changes/0.36.6/fix-wire-test-environment-and-pagination-error.yml new file mode 100644 index 000000000000..ec2f064d30dc --- /dev/null +++ b/generators/rust/sdk/changes/0.36.6/fix-wire-test-environment-and-pagination-error.yml @@ -0,0 +1,12 @@ +# yaml-language-server: $schema=../../../../../fern-changes-yml.schema.json + +- summary: | + Fix generated Rust wire tests for single-URL SDKs and pagination error + tests. The wire test generator no longer emits `config.environment = None;` + when the SDK was generated against a single base URL (since the + `environment` field does not exist on `ClientConfig` in that case). + The synchronous-paginator error-propagation tests now use + `ApiError::Configuration` instead of the non-existent + `ApiError::Serialization` variant, so the generated `pagination.rs` test + module compiles. + type: fix diff --git a/generators/rust/sdk/src/wire-tests/WireTestGenerator.ts b/generators/rust/sdk/src/wire-tests/WireTestGenerator.ts index 7fab42b3b9cd..9da40ba89aa9 100644 --- a/generators/rust/sdk/src/wire-tests/WireTestGenerator.ts +++ b/generators/rust/sdk/src/wire-tests/WireTestGenerator.ts @@ -251,7 +251,9 @@ export class WireTestGenerator { lines.push(` };`); // Override base_url and clear environment so requests go to WireMock lines.push(` config.base_url = wiremock_base_url.to_string();`); - lines.push(` config.environment = None;`); + if (this.context.hasMultipleBaseUrls()) { + lines.push(` config.environment = None;`); + } inConfigStruct = false; } else { lines.push(` ${trimmedLine}`); diff --git a/generators/rust/sdk/versions.yml b/generators/rust/sdk/versions.yml index 62f7db61bf19..0f36c917129e 100644 --- a/generators/rust/sdk/versions.yml +++ b/generators/rust/sdk/versions.yml @@ -1,4 +1,18 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 0.36.6 + changelogEntry: + - summary: | + Fix generated Rust wire tests for single-URL SDKs and pagination error + tests. The wire test generator no longer emits `config.environment = None;` + when the SDK was generated against a single base URL (since the + `environment` field does not exist on `ClientConfig` in that case). + The synchronous-paginator error-propagation tests now use + `ApiError::Configuration` instead of the non-existent + `ApiError::Serialization` variant, so the generated `pagination.rs` test + module compiles. + type: fix + createdAt: "2026-05-12" + irVersion: 66 - version: 0.36.5 changelogEntry: - summary: | diff --git a/packages/cli/api-importers/openapi-to-ir/src/3.1/OpenAPIConverter.ts b/packages/cli/api-importers/openapi-to-ir/src/3.1/OpenAPIConverter.ts index 7007d4a03b1a..e9599e2925d9 100644 --- a/packages/cli/api-importers/openapi-to-ir/src/3.1/OpenAPIConverter.ts +++ b/packages/cli/api-importers/openapi-to-ir/src/3.1/OpenAPIConverter.ts @@ -262,7 +262,8 @@ export class OpenAPIConverter extends AbstractSpecConverter>; } } @@ -180,7 +187,8 @@ export class RequestBodyConverter extends Converters.AbstractConverters.Abstract inlinedTypes: this.context.removeSchemaFromInlinedTypes({ id: this.schemaId, inlinedTypes: convertedSchema.inlinedTypes - }) + }), + inlinedPropertiesByAudience: convertedSchema.schema?.propertiesByAudience }; } else { return { diff --git a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/AbstractOperationConverter.ts b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/AbstractOperationConverter.ts index 0d0f298a9074..16bc3c04d8e0 100644 --- a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/AbstractOperationConverter.ts +++ b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/AbstractOperationConverter.ts @@ -41,6 +41,7 @@ interface ConvertedRequestBody { requestBody: HttpRequestBody; streamRequestBody: HttpRequestBody | undefined; examples?: Record; + inlinedPropertiesByAudience?: Record>; } export abstract class AbstractOperationConverter extends AbstractConverter< @@ -238,7 +239,8 @@ export abstract class AbstractOperationConverter extends AbstractConverter< convertedRequestBodies.push({ requestBody: convertedRequestBody.requestBody, streamRequestBody: convertedRequestBody.streamRequestBody, - examples: convertedRequestBody.examples + examples: convertedRequestBody.examples, + inlinedPropertiesByAudience: convertedRequestBody.inlinedPropertiesByAudience }); } } diff --git a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/OperationConverter.ts b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/OperationConverter.ts index 1637cc3df4fa..a7e73d4d0baf 100644 --- a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/OperationConverter.ts +++ b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/OperationConverter.ts @@ -39,6 +39,8 @@ export declare namespace OperationConverter { audiences: string[]; errors: Record; servers?: OpenAPIV3_1.ServerObject[]; + inlinedRequestPropertiesByAudience?: Record>; + queryParametersByAudience?: Record>; } export interface ConvertedResponseBody { @@ -99,6 +101,10 @@ export class OperationConverter extends AbstractOperationConverter { breadcrumbs: [...this.breadcrumbs, "parameters"] }); + const queryParametersByAudience = this.collectQueryParameterAudiences({ + breadcrumbs: [...this.breadcrumbs, "parameters"] + }); + const convertedRequestBodies = this.convertRequestBody({ breadcrumbs: [...this.breadcrumbs, "requestBody"], group, @@ -109,6 +115,8 @@ export class OperationConverter extends AbstractOperationConverter { const requestBody = convertedRequestBodies != null ? convertedRequestBodies[0]?.requestBody : undefined; const streamRequestBody = convertedRequestBodies != null ? convertedRequestBodies[0]?.streamRequestBody : undefined; + const inlinedRequestPropertiesByAudience = + convertedRequestBodies != null ? convertedRequestBodies[0]?.inlinedPropertiesByAudience : undefined; const v2RequestBodies: V2HttpRequestBodies = { requestBodies: convertedRequestBodies?.map((body) => body.requestBody) @@ -298,10 +306,53 @@ export class OperationConverter extends AbstractOperationConverter { } : undefined, inlinedTypes: this.inlinedTypes, - servers: this.filterOutTopLevelServers(this.operation.servers ?? this.pathLevelServers ?? []) + servers: this.filterOutTopLevelServers(this.operation.servers ?? this.pathLevelServers ?? []), + inlinedRequestPropertiesByAudience, + queryParametersByAudience }; } + /** + * Walks the operation's parameters and groups query parameter wire names by + * `x-fern-audiences`. Parameters without an audience tag are omitted (they + * are universal — see `computeExcludedKeys` in `IrGraph.build()`). Returns + * `undefined` when no query parameter declares any audience to avoid + * populating the IR filter graph with empty maps. + */ + private collectQueryParameterAudiences({ + breadcrumbs + }: { + breadcrumbs: string[]; + }): Record> | undefined { + if (this.operation.parameters == null) { + return undefined; + } + const audiencesByQueryParameter: Record> = {}; + let foundAny = false; + for (const parameter of this.operation.parameters) { + const resolved = this.context.resolveMaybeReference({ + schemaOrReference: parameter, + breadcrumbs, + skipErrorCollector: true + }); + if (resolved == null || resolved.in !== "query") { + continue; + } + const paramAudiences = this.context.getAudiences({ operation: resolved, breadcrumbs }) ?? []; + if (paramAudiences.length === 0) { + continue; + } + foundAny = true; + for (const audience of paramAudiences) { + if (audiencesByQueryParameter[audience] == null) { + audiencesByQueryParameter[audience] = new Set(); + } + audiencesByQueryParameter[audience].add(resolved.name); + } + } + return foundAny ? audiencesByQueryParameter : undefined; + } + protected convertResponseBody({ breadcrumbs, group, diff --git a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/WebhookConverter.ts b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/WebhookConverter.ts index 70dda04ea840..06fb2e82cad8 100644 --- a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/WebhookConverter.ts +++ b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/operations/WebhookConverter.ts @@ -6,6 +6,7 @@ export declare namespace WebhookConverter { export interface Output extends AbstractOperationConverter.Output { webhook: Webhook; audiences: string[]; + inlinedPayloadPropertiesByAudience?: Record>; } } @@ -58,6 +59,10 @@ export class WebhookConverter extends AbstractOperationConverter { if (requestBody == null) { return undefined; } + const inlinedPayloadPropertiesByAudience = + requestBody.type === "inlinedRequestBody" + ? convertedRequestBody[0]?.inlinedPropertiesByAudience + : undefined; let payload: WebhookPayload; let fileUploadPayload: FileUploadRequest | undefined; @@ -100,6 +105,7 @@ export class WebhookConverter extends AbstractOperationConverter { breadcrumbs: this.breadcrumbs }) ?? [], group, + inlinedPayloadPropertiesByAudience, webhook: { id: `${group?.join(".") ?? ""}.${method}`, name: this.context.casingsGenerator.generateName(method), diff --git a/packages/cli/api-importers/v3-importer-commons/src/AbstractSpecConverter.ts b/packages/cli/api-importers/v3-importer-commons/src/AbstractSpecConverter.ts index 1e7946b829f2..905ef18e820b 100644 --- a/packages/cli/api-importers/v3-importer-commons/src/AbstractSpecConverter.ts +++ b/packages/cli/api-importers/v3-importer-commons/src/AbstractSpecConverter.ts @@ -2,6 +2,7 @@ import { Audiences } from "@fern-api/configuration"; import { FernIr, IntermediateRepresentation, Package } from "@fern-api/ir-sdk"; import { constructHttpPath, + filterIntermediateRepresentationForAudiences, IrGraph, injectAutogeneratedExamples, injectAutogeneratedV2Examples @@ -192,33 +193,15 @@ export abstract class AbstractSpecConverter< }; } + /** Delegates to the shared IR audience filter so V3 importers share Fern Definition semantics. */ private filterIrForAudiences(ir: IntermediateRepresentation): IntermediateRepresentation { - // TODO: Use IrGraph.build() in the long run to filter the IR - const filteredEndpoints = this.irGraph.getFilteredEndpoints(); - const filteredChannels = this.irGraph.getFilteredChannels(); - const filteredWebhooks = this.irGraph.getFilteredWebhooks(); - - for (const service of Object.values(ir.services)) { - const updatedEndpoints: FernIr.HttpEndpoint[] = []; - for (const endpoint of service.endpoints) { - if (filteredEndpoints.has(endpoint.id)) { - updatedEndpoints.push(endpoint); - } - } - service.endpoints = updatedEndpoints; - } - ir.websocketChannels = Object.fromEntries( - Object.entries(ir.websocketChannels ?? {}).filter(([channelId]) => filteredChannels.has(channelId)) - ); - ir.webhookGroups = Object.fromEntries( - Object.entries(ir.webhookGroups).map(([webhookGroupId, webhookGroup]) => { - const filteredWebhookGroup = webhookGroup.filter( - (webhook) => webhook.id != null && filteredWebhooks.has(webhook.id) - ); - return [webhookGroupId, filteredWebhookGroup]; - }) - ); - return ir; + const filtered = filterIntermediateRepresentationForAudiences(ir, this.irGraph.build()); + return { + ...filtered, + sdkConfig: ir.sdkConfig, + subpackages: ir.subpackages, + rootPackage: ir.rootPackage + }; } protected async resolveAllExternalRefs({ spec }: { spec: unknown }): Promise { @@ -302,13 +285,17 @@ export abstract class AbstractSpecConverter< audiences, endpointGroup, endpointGroupDisplayName, - serviceName + serviceName, + inlinedRequestPropertiesByAudience, + queryParametersByAudience }: { endpoint: FernIr.HttpEndpoint; audiences: string[]; endpointGroup?: string[]; endpointGroupDisplayName?: string; serviceName?: string; + inlinedRequestPropertiesByAudience?: Record>; + queryParametersByAudience?: Record>; }): void { const group = this.context.getGroup({ groupParts: endpointGroup, @@ -333,6 +320,15 @@ export abstract class AbstractSpecConverter< this.irGraph.addEndpoint(service, endpoint); // TODO: This method should be "markEndpointsForAudience" this.irGraph.markEndpointForAudience(service.name, [endpoint], audiences); + if ( + inlinedRequestPropertiesByAudience != null && + Object.keys(inlinedRequestPropertiesByAudience).length > 0 + ) { + this.irGraph.markInlinedRequestPropertiesForAudiences(endpoint.id, inlinedRequestPropertiesByAudience); + } + if (queryParametersByAudience != null && Object.keys(queryParametersByAudience).length > 0) { + this.irGraph.markQueryParametersForAudiences(endpoint.id, queryParametersByAudience); + } } } @@ -340,12 +336,14 @@ export abstract class AbstractSpecConverter< webhook, operationId, audiences, - group + group, + inlinedPayloadPropertiesByAudience }: { webhook: FernIr.Webhook; operationId: string; audiences: string[]; group?: string[]; + inlinedPayloadPropertiesByAudience?: Record>; }): void { const groupName = group?.join(".") ?? operationId; const pkg = this.getOrCreatePackage({ @@ -362,6 +360,16 @@ export abstract class AbstractSpecConverter< if (audiences != null) { this.irGraph.markWebhookForAudiences(emptyFile, webhook, audiences); } + if ( + webhook.id != null && + inlinedPayloadPropertiesByAudience != null && + Object.keys(inlinedPayloadPropertiesByAudience).length > 0 + ) { + this.irGraph.markInlinedWebhookPayloadPropertiesForAudiences( + webhook.id, + inlinedPayloadPropertiesByAudience + ); + } } protected addWebsocketChannelToIr({ @@ -426,12 +434,15 @@ export abstract class AbstractSpecConverter< audiences?: Record; }): void { this.ir.environments = environmentConfig; - if (audiences == null) { + if (environmentConfig == null) { return; } - for (const [environmentId, environment] of Object.entries(environmentConfig ?? {})) { - if (audiences[environmentId] != null) { - this.irGraph.markEnvironmentForAudiences(environment, audiences[environmentId]); + for (const environment of environmentConfig.environments.environments) { + const envAudiences = audiences?.[environment.id]; + if (envAudiences != null) { + this.irGraph.markEnvironmentForAudiences(environment, envAudiences); + } else { + this.irGraph.markEnvironmentForAudiences(environment, [], true); } } } diff --git a/packages/cli/api-importers/v3-importer-tests/package.json b/packages/cli/api-importers/v3-importer-tests/package.json index e3f07cd7c57a..a367fafb3e41 100644 --- a/packages/cli/api-importers/v3-importer-tests/package.json +++ b/packages/cli/api-importers/v3-importer-tests/package.json @@ -47,7 +47,10 @@ "devDependencies": { "@fern-api/cli-source-resolver": "workspace:*", "@fern-api/configs": "workspace:*", + "@fern-api/configuration": "workspace:*", "@fern-api/ir-generator": "workspace:*", + "@fern-api/ir-sdk": "workspace:*", + "@fern-api/ir-utils": "workspace:*", "@types/node": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/v3-property-level-audiences.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/v3-property-level-audiences.json new file mode 100644 index 000000000000..64b87789b115 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/baseline-sdks/v3-property-level-audiences.json @@ -0,0 +1,1494 @@ +{ + "selfHosted": false, + "apiName": "api", + "apiDisplayName": "Property-level audience filtering regression fixture", + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "headers": [], + "idempotencyHeaders": [], + "types": { + "type_:UserCreatedPayload": { + "name": { + "name": "UserCreatedPayload", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:UserCreatedPayload" + }, + "shape": { + "extends": [], + "properties": [ + { + "name": "user_id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "internal_reason", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "extraProperties": false, + "extendedProperties": [], + "type": "object" + }, + "referencedTypes": {}, + "encoding": { + "json": {} + }, + "userProvidedExamples": [], + "autogeneratedExamples": [] + }, + "type_:User": { + "name": { + "name": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:User" + }, + "shape": { + "extends": [], + "properties": [ + { + "name": "id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "username", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "password_hash", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "extraProperties": false, + "extendedProperties": [], + "type": "object" + }, + "referencedTypes": {}, + "encoding": { + "json": {} + }, + "userProvidedExamples": [], + "autogeneratedExamples": [] + } + }, + "errors": {}, + "services": { + "service_": { + "name": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "encoding": { + "json": {} + }, + "transport": { + "type": "http" + }, + "endpoints": [ + { + "id": "endpoint_.listUsers", + "name": "listUsers", + "auth": false, + "idempotent": false, + "method": "GET", + "path": { + "head": "/users", + "parts": [] + }, + "fullPath": { + "head": "users", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "response": {}, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [], + "audiences": [ + "internal" + ], + "responseHeaders": [] + }, + { + "id": "endpoint_.createUser", + "name": "createUser", + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/users", + "parts": [] + }, + "fullPath": { + "head": "users", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [ + { + "name": "page", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "INTEGER", + "v2": { + "type": "integer" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "internal_ref", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "dual_audience_param", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "headers": [], + "requestBody": { + "name": "CreateUserRequest", + "extends": [], + "contentType": "application/json", + "properties": [ + { + "name": "name", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "email", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "ip_address", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "force_verify", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "BOOLEAN", + "v2": { + "type": "boolean" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "custom_id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + }, + { + "name": "dual_audience_field", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "extraProperties": false, + "extendedProperties": [], + "type": "inlinedRequestBody" + }, + "sdkRequest": { + "shape": { + "wrapperName": "CreateUserRequest", + "bodyKey": "body", + "includePathParameters": false, + "onlyPathParameters": false, + "type": "wrapper" + }, + "requestParameterName": "request" + }, + "response": {}, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [], + "audiences": [ + "public" + ], + "responseHeaders": [] + }, + { + "id": "endpoint_.listAdmins", + "name": "listAdmins", + "auth": false, + "idempotent": false, + "method": "GET", + "path": { + "head": "/admins", + "parts": [] + }, + "fullPath": { + "head": "admins", + "parts": [] + }, + "pathParameters": [], + "allPathParameters": [], + "queryParameters": [], + "headers": [], + "response": {}, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [], + "responseHeaders": [] + }, + { + "id": "endpoint_.getUser", + "name": "getUser", + "auth": false, + "idempotent": false, + "method": "GET", + "path": { + "head": "/users/", + "parts": [ + { + "pathParameter": "id", + "tail": "" + } + ] + }, + "fullPath": { + "head": "users/", + "parts": [ + { + "pathParameter": "id", + "tail": "" + } + ] + }, + "pathParameters": [ + { + "name": "id", + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "location": "ENDPOINT", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "allPathParameters": [ + { + "name": "id", + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "type": "string" + } + }, + "type": "primitive" + }, + "location": "ENDPOINT", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + } + } + ], + "queryParameters": [], + "headers": [], + "sdkRequest": { + "shape": { + "wrapperName": "GetUserRequest", + "bodyKey": "body", + "includePathParameters": true, + "onlyPathParameters": true, + "type": "wrapper" + }, + "requestParameterName": "request" + }, + "response": { + "body": { + "value": { + "docs": "ok", + "responseBodyType": { + "name": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:User", + "type": "named" + }, + "type": "response" + }, + "type": "json" + }, + "statusCode": 200, + "docs": "ok" + }, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [], + "audiences": [ + "public" + ], + "responseHeaders": [] + } + ] + } + }, + "constants": { + "errorInstanceIdKey": "errorInstanceId" + }, + "environments": { + "defaultEnvironment": "Default", + "environments": { + "environments": [ + { + "id": "Default", + "name": "Default", + "url": "https://api.example.com" + } + ], + "type": "singleBaseUrl" + } + }, + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "pathParameters": [], + "variables": [], + "serviceTypeReferenceInfo": { + "typesReferencedOnlyByService": { + "service_": [ + "type_:User" + ] + }, + "sharedTypes": [ + "type_:UserCreatedPayload" + ] + }, + "webhookGroups": { + "webhooks_": [ + { + "id": "webhooks_.userCreated", + "method": "POST", + "name": "userCreated", + "headers": [], + "payload": { + "payloadType": { + "name": "UserCreatedPayload", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:UserCreatedPayload", + "type": "named" + }, + "type": "reference" + }, + "examples": [ + { + "payload": { + "shape": { + "typeName": { + "typeId": "type_:UserCreatedPayload", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "UserCreatedPayload" + }, + "shape": { + "properties": [], + "type": "object" + }, + "type": "named" + }, + "jsonExample": {} + } + } + ] + } + ] + }, + "websocketChannels": {}, + "dynamic": { + "version": "1.0.0", + "types": { + "type_:UserCreatedPayload": { + "declaration": { + "name": { + "originalName": "UserCreatedPayload", + "camelCase": { + "unsafeName": "userCreatedPayload", + "safeName": "userCreatedPayload" + }, + "snakeCase": { + "unsafeName": "user_created_payload", + "safeName": "user_created_payload" + }, + "screamingSnakeCase": { + "unsafeName": "USER_CREATED_PAYLOAD", + "safeName": "USER_CREATED_PAYLOAD" + }, + "pascalCase": { + "unsafeName": "UserCreatedPayload", + "safeName": "UserCreatedPayload" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "properties": [ + { + "name": { + "wireValue": "user_id", + "name": { + "originalName": "user_id", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "internal_reason", + "name": { + "originalName": "internal_reason", + "camelCase": { + "unsafeName": "internalReason", + "safeName": "internalReason" + }, + "snakeCase": { + "unsafeName": "internal_reason", + "safeName": "internal_reason" + }, + "screamingSnakeCase": { + "unsafeName": "INTERNAL_REASON", + "safeName": "INTERNAL_REASON" + }, + "pascalCase": { + "unsafeName": "InternalReason", + "safeName": "InternalReason" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "additionalProperties": false, + "type": "object" + }, + "type_:User": { + "declaration": { + "name": { + "originalName": "User", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "properties": [ + { + "name": { + "wireValue": "id", + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "username", + "name": { + "originalName": "username", + "camelCase": { + "unsafeName": "username", + "safeName": "username" + }, + "snakeCase": { + "unsafeName": "username", + "safeName": "username" + }, + "screamingSnakeCase": { + "unsafeName": "USERNAME", + "safeName": "USERNAME" + }, + "pascalCase": { + "unsafeName": "Username", + "safeName": "Username" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "password_hash", + "name": { + "originalName": "password_hash", + "camelCase": { + "unsafeName": "passwordHash", + "safeName": "passwordHash" + }, + "snakeCase": { + "unsafeName": "password_hash", + "safeName": "password_hash" + }, + "screamingSnakeCase": { + "unsafeName": "PASSWORD_HASH", + "safeName": "PASSWORD_HASH" + }, + "pascalCase": { + "unsafeName": "PasswordHash", + "safeName": "PasswordHash" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "additionalProperties": false, + "type": "object" + } + }, + "headers": [], + "endpoints": { + "endpoint_.listUsers": { + "declaration": { + "name": { + "originalName": "listUsers", + "camelCase": { + "unsafeName": "listUsers", + "safeName": "listUsers" + }, + "snakeCase": { + "unsafeName": "list_users", + "safeName": "list_users" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_USERS", + "safeName": "LIST_USERS" + }, + "pascalCase": { + "unsafeName": "ListUsers", + "safeName": "ListUsers" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "location": { + "method": "GET", + "path": "/users" + }, + "request": { + "pathParameters": [], + "type": "body" + }, + "response": { + "type": "json" + }, + "examples": [] + }, + "endpoint_.createUser": { + "declaration": { + "name": { + "originalName": "createUser", + "camelCase": { + "unsafeName": "createUser", + "safeName": "createUser" + }, + "snakeCase": { + "unsafeName": "create_user", + "safeName": "create_user" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_USER", + "safeName": "CREATE_USER" + }, + "pascalCase": { + "unsafeName": "CreateUser", + "safeName": "CreateUser" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "location": { + "method": "POST", + "path": "/users" + }, + "request": { + "declaration": { + "name": { + "originalName": "CreateUserRequest", + "camelCase": { + "unsafeName": "createUserRequest", + "safeName": "createUserRequest" + }, + "snakeCase": { + "unsafeName": "create_user_request", + "safeName": "create_user_request" + }, + "screamingSnakeCase": { + "unsafeName": "CREATE_USER_REQUEST", + "safeName": "CREATE_USER_REQUEST" + }, + "pascalCase": { + "unsafeName": "CreateUserRequest", + "safeName": "CreateUserRequest" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "pathParameters": [], + "queryParameters": [ + { + "name": { + "wireValue": "page", + "name": { + "originalName": "page", + "camelCase": { + "unsafeName": "page", + "safeName": "page" + }, + "snakeCase": { + "unsafeName": "page", + "safeName": "page" + }, + "screamingSnakeCase": { + "unsafeName": "PAGE", + "safeName": "PAGE" + }, + "pascalCase": { + "unsafeName": "Page", + "safeName": "Page" + } + } + }, + "typeReference": { + "value": { + "value": "INTEGER", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "internal_ref", + "name": { + "originalName": "internal_ref", + "camelCase": { + "unsafeName": "internalRef", + "safeName": "internalRef" + }, + "snakeCase": { + "unsafeName": "internal_ref", + "safeName": "internal_ref" + }, + "screamingSnakeCase": { + "unsafeName": "INTERNAL_REF", + "safeName": "INTERNAL_REF" + }, + "pascalCase": { + "unsafeName": "InternalRef", + "safeName": "InternalRef" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "dual_audience_param", + "name": { + "originalName": "dual_audience_param", + "camelCase": { + "unsafeName": "dualAudienceParam", + "safeName": "dualAudienceParam" + }, + "snakeCase": { + "unsafeName": "dual_audience_param", + "safeName": "dual_audience_param" + }, + "screamingSnakeCase": { + "unsafeName": "DUAL_AUDIENCE_PARAM", + "safeName": "DUAL_AUDIENCE_PARAM" + }, + "pascalCase": { + "unsafeName": "DualAudienceParam", + "safeName": "DualAudienceParam" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "headers": [], + "body": { + "value": [ + { + "name": { + "wireValue": "name", + "name": { + "originalName": "name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "email", + "name": { + "originalName": "email", + "camelCase": { + "unsafeName": "email", + "safeName": "email" + }, + "snakeCase": { + "unsafeName": "email", + "safeName": "email" + }, + "screamingSnakeCase": { + "unsafeName": "EMAIL", + "safeName": "EMAIL" + }, + "pascalCase": { + "unsafeName": "Email", + "safeName": "Email" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "ip_address", + "name": { + "originalName": "ip_address", + "camelCase": { + "unsafeName": "ipAddress", + "safeName": "ipAddress" + }, + "snakeCase": { + "unsafeName": "ip_address", + "safeName": "ip_address" + }, + "screamingSnakeCase": { + "unsafeName": "IP_ADDRESS", + "safeName": "IP_ADDRESS" + }, + "pascalCase": { + "unsafeName": "IPAddress", + "safeName": "IPAddress" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "force_verify", + "name": { + "originalName": "force_verify", + "camelCase": { + "unsafeName": "forceVerify", + "safeName": "forceVerify" + }, + "snakeCase": { + "unsafeName": "force_verify", + "safeName": "force_verify" + }, + "screamingSnakeCase": { + "unsafeName": "FORCE_VERIFY", + "safeName": "FORCE_VERIFY" + }, + "pascalCase": { + "unsafeName": "ForceVerify", + "safeName": "ForceVerify" + } + } + }, + "typeReference": { + "value": { + "value": "BOOLEAN", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "custom_id", + "name": { + "originalName": "custom_id", + "camelCase": { + "unsafeName": "customID", + "safeName": "customID" + }, + "snakeCase": { + "unsafeName": "custom_id", + "safeName": "custom_id" + }, + "screamingSnakeCase": { + "unsafeName": "CUSTOM_ID", + "safeName": "CUSTOM_ID" + }, + "pascalCase": { + "unsafeName": "CustomID", + "safeName": "CustomID" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + }, + { + "name": { + "wireValue": "dual_audience_field", + "name": { + "originalName": "dual_audience_field", + "camelCase": { + "unsafeName": "dualAudienceField", + "safeName": "dualAudienceField" + }, + "snakeCase": { + "unsafeName": "dual_audience_field", + "safeName": "dual_audience_field" + }, + "screamingSnakeCase": { + "unsafeName": "DUAL_AUDIENCE_FIELD", + "safeName": "DUAL_AUDIENCE_FIELD" + }, + "pascalCase": { + "unsafeName": "DualAudienceField", + "safeName": "DualAudienceField" + } + } + }, + "typeReference": { + "value": { + "value": "STRING", + "type": "primitive" + }, + "type": "optional" + } + } + ], + "type": "properties" + }, + "metadata": { + "includePathParameters": false, + "onlyPathParameters": false + }, + "type": "inlined" + }, + "response": { + "type": "json" + }, + "examples": [] + }, + "endpoint_.listAdmins": { + "declaration": { + "name": { + "originalName": "listAdmins", + "camelCase": { + "unsafeName": "listAdmins", + "safeName": "listAdmins" + }, + "snakeCase": { + "unsafeName": "list_admins", + "safeName": "list_admins" + }, + "screamingSnakeCase": { + "unsafeName": "LIST_ADMINS", + "safeName": "LIST_ADMINS" + }, + "pascalCase": { + "unsafeName": "ListAdmins", + "safeName": "ListAdmins" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "location": { + "method": "GET", + "path": "/admins" + }, + "request": { + "pathParameters": [], + "type": "body" + }, + "response": { + "type": "json" + }, + "examples": [] + }, + "endpoint_.getUser": { + "declaration": { + "name": { + "originalName": "getUser", + "camelCase": { + "unsafeName": "getUser", + "safeName": "getUser" + }, + "snakeCase": { + "unsafeName": "get_user", + "safeName": "get_user" + }, + "screamingSnakeCase": { + "unsafeName": "GET_USER", + "safeName": "GET_USER" + }, + "pascalCase": { + "unsafeName": "GetUser", + "safeName": "GetUser" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "location": { + "method": "GET", + "path": "/users/{id}" + }, + "request": { + "declaration": { + "name": { + "originalName": "GetUserRequest", + "camelCase": { + "unsafeName": "getUserRequest", + "safeName": "getUserRequest" + }, + "snakeCase": { + "unsafeName": "get_user_request", + "safeName": "get_user_request" + }, + "screamingSnakeCase": { + "unsafeName": "GET_USER_REQUEST", + "safeName": "GET_USER_REQUEST" + }, + "pascalCase": { + "unsafeName": "GetUserRequest", + "safeName": "GetUserRequest" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "pathParameters": [ + { + "name": { + "name": { + "originalName": "id", + "camelCase": { + "unsafeName": "id", + "safeName": "id" + }, + "snakeCase": { + "unsafeName": "id", + "safeName": "id" + }, + "screamingSnakeCase": { + "unsafeName": "ID", + "safeName": "ID" + }, + "pascalCase": { + "unsafeName": "ID", + "safeName": "ID" + } + }, + "wireValue": "id" + }, + "typeReference": { + "value": "STRING", + "type": "primitive" + } + } + ], + "queryParameters": [], + "headers": [], + "metadata": { + "includePathParameters": true, + "onlyPathParameters": true + }, + "type": "inlined" + }, + "response": { + "type": "json" + }, + "examples": [] + } + }, + "pathParameters": [], + "environments": { + "defaultEnvironment": "Default", + "environments": { + "environments": [ + { + "id": "Default", + "name": { + "originalName": "Default", + "camelCase": { + "unsafeName": "default", + "safeName": "default" + }, + "snakeCase": { + "unsafeName": "default", + "safeName": "default" + }, + "screamingSnakeCase": { + "unsafeName": "DEFAULT", + "safeName": "DEFAULT" + }, + "pascalCase": { + "unsafeName": "Default", + "safeName": "Default" + } + }, + "url": "https://api.example.com" + } + ], + "type": "singleBaseUrl" + } + } + }, + "apiPlayground": true, + "casingsConfig": { + "smartCasing": true + }, + "subpackages": {}, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "service": "service_", + "types": [ + "type_:UserCreatedPayload", + "type_:User" + ], + "errors": [], + "subpackages": [], + "webhooks": "webhooks_", + "hasEndpointsInTree": true + }, + "sdkConfig": { + "isAuthMandatory": false, + "hasStreamingEndpoints": false, + "hasPaginatedEndpoints": false, + "hasFileDownloadEndpoints": false, + "platformHeaders": { + "language": "X-Fern-Language", + "sdkName": "X-Fern-SDK-Name", + "sdkVersion": "X-Fern-SDK-Version" + } + } +} \ No newline at end of file diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/v3-property-level-audiences.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/v3-property-level-audiences.json new file mode 100644 index 000000000000..3c821b10f862 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/v3-property-level-audiences.json @@ -0,0 +1,1714 @@ +{ + "auth": { + "requirement": "ALL", + "schemes": [] + }, + "selfHosted": false, + "types": { + "User": { + "name": { + "typeId": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User" + }, + "shape": { + "properties": [ + { + "name": "id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UserId_example_autogenerated": "string" + } + } + }, + { + "name": "username", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UserUsername_example_autogenerated": "string" + } + } + }, + { + "name": "password_hash", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UserPasswordHash_example_autogenerated": "string" + } + } + } + ], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "User_example_autogenerated": {} + } + } + }, + "listUsers_Response_200": { + "name": { + "typeId": "listUsers_Response_200", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listUsers_Response_200" + }, + "shape": { + "properties": [], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "docs": "Empty response body", + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listUsers_Response_200_example_autogenerated": {} + } + } + }, + "createUser_Response_201": { + "name": { + "typeId": "createUser_Response_201", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "createUser_Response_201" + }, + "shape": { + "properties": [], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "docs": "Empty response body", + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "createUser_Response_201_example_autogenerated": {} + } + } + }, + "listAdmins_Response_200": { + "name": { + "typeId": "listAdmins_Response_200", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listAdmins_Response_200" + }, + "shape": { + "properties": [], + "extends": [], + "extendedProperties": [], + "extraProperties": false, + "type": "object" + }, + "autogeneratedExamples": [], + "userProvidedExamples": [], + "docs": "Empty response body", + "referencedTypes": {}, + "inline": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listAdmins_Response_200_example_autogenerated": {} + } + } + } + }, + "services": { + "service_": { + "name": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + } + }, + "basePath": { + "head": "", + "parts": [] + }, + "headers": [], + "pathParameters": [], + "endpoints": [ + { + "method": "GET", + "baseUrl": "https://api.example.com", + "path": { + "head": "/users", + "parts": [] + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "responseHeaders": [], + "errors": [], + "auth": false, + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "8714ecc5", + "url": "/users", + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "response": { + "value": { + "value": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [], + "type": "object" + }, + "typeName": { + "typeId": "listUsers_Response_200", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listUsers_Response_200" + }, + "type": "named" + } + }, + "type": "body" + }, + "type": "ok" + } + } + } + ], + "idempotent": false, + "fullPath": { + "head": "/users", + "parts": [] + }, + "allPathParameters": [], + "source": { + "type": "openapi" + }, + "audiences": [ + "internal" + ], + "id": "endpoint_.listUsers", + "name": "listUsers", + "v2RequestBodies": {}, + "response": { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listUsers_Response_200", + "typeId": "listUsers_Response_200", + "inline": false, + "type": "named" + }, + "docs": "internal-only listing", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listUsersExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "internal-only listing" + }, + "v2Examples": { + "autogeneratedExamples": { + "base_listUsersExample_200": { + "displayName": "listUsersExample", + "request": { + "endpoint": { + "method": "GET", + "path": "/users" + }, + "environment": "https://api.example.com", + "pathParameters": {}, + "queryParameters": {}, + "headers": {} + }, + "response": { + "statusCode": 200, + "body": { + "value": {}, + "type": "json" + } + } + } + }, + "userSpecifiedExamples": {} + }, + "v2Responses": { + "responses": [ + { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listUsers_Response_200", + "typeId": "listUsers_Response_200", + "inline": false, + "type": "named" + }, + "docs": "internal-only listing", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listUsersExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "internal-only listing" + } + ] + } + }, + { + "method": "POST", + "baseUrl": "https://api.example.com", + "path": { + "head": "/users", + "parts": [] + }, + "pathParameters": [], + "queryParameters": [ + { + "name": "page", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "INTEGER", + "v2": { + "validation": {}, + "type": "integer" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "page_example": 1 + } + } + }, + { + "name": "internal_ref", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "internal_ref_example": "internal_ref" + } + } + }, + { + "name": "dual_audience_param", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "dual_audience_param_example": "dual_audience_param" + } + } + } + ], + "headers": [], + "responseHeaders": [], + "errors": [], + "auth": false, + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "2a61f781", + "url": "/users", + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": { + "jsonExample": {}, + "properties": [ + { + "name": "name", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "email", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "ip_address", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "force_verify", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "BOOLEAN", + "v2": { + "type": "boolean" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "custom_id", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "dual_audience_field", + "value": { + "shape": { + "container": { + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "inlinedRequestBody" + }, + "response": { + "value": { + "value": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [], + "type": "object" + }, + "typeName": { + "typeId": "createUser_Response_201", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "createUser_Response_201" + }, + "type": "named" + } + }, + "type": "body" + }, + "type": "ok" + } + } + } + ], + "idempotent": false, + "fullPath": { + "head": "/users", + "parts": [] + }, + "allPathParameters": [], + "source": { + "type": "openapi" + }, + "audiences": [ + "public" + ], + "id": "endpoint_.createUser", + "name": "createUser", + "requestBody": { + "contentType": "application/json", + "name": "createUser_Request", + "extendedProperties": [], + "extends": [], + "properties": [ + { + "name": "name", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaName_example_autogenerated": "string" + } + } + }, + { + "name": "email", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaEmail_example_autogenerated": "string" + } + } + }, + { + "name": "ip_address", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaIpAddress_example_autogenerated": "string" + } + } + }, + { + "name": "force_verify", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "BOOLEAN", + "v2": { + "type": "boolean" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaForceVerify_example_autogenerated": true + } + } + }, + { + "name": "custom_id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaCustomId_example_autogenerated": "string" + } + } + }, + { + "name": "dual_audience_field", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaDualAudienceField_example_autogenerated": "string" + } + } + } + ], + "extraProperties": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "createUserExample": {} + } + }, + "type": "inlinedRequestBody" + }, + "v2RequestBodies": { + "requestBodies": [ + { + "contentType": "application/json", + "name": "createUser_Request", + "extendedProperties": [], + "extends": [], + "properties": [ + { + "name": "name", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaName_example_autogenerated": "string" + } + } + }, + { + "name": "email", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaEmail_example_autogenerated": "string" + } + } + }, + { + "name": "ip_address", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaIpAddress_example_autogenerated": "string" + } + } + }, + { + "name": "force_verify", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "BOOLEAN", + "v2": { + "type": "boolean" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaForceVerify_example_autogenerated": true + } + } + }, + { + "name": "custom_id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaCustomId_example_autogenerated": "string" + } + } + }, + { + "name": "dual_audience_field", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "UsersPostRequestBodyContentApplicationJsonSchemaDualAudienceField_example_autogenerated": "string" + } + } + } + ], + "extraProperties": false, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "createUserExample": {} + } + }, + "type": "inlinedRequestBody" + } + ] + }, + "response": { + "statusCode": 201, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "createUser_Response_201", + "typeId": "createUser_Response_201", + "inline": false, + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "createUserExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + }, + "v2Examples": { + "autogeneratedExamples": { + "createUserExample_201": { + "displayName": "createUserExample", + "request": { + "endpoint": { + "method": "POST", + "path": "/users" + }, + "environment": "https://api.example.com", + "pathParameters": {}, + "queryParameters": {}, + "headers": {}, + "requestBody": {} + }, + "response": { + "statusCode": 201, + "body": { + "value": {}, + "type": "json" + } + } + } + }, + "userSpecifiedExamples": {} + }, + "v2Responses": { + "responses": [ + { + "statusCode": 201, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "createUser_Response_201", + "typeId": "createUser_Response_201", + "inline": false, + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "createUserExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + } + ] + } + }, + { + "method": "GET", + "baseUrl": "https://api.example.com", + "path": { + "head": "/admins", + "parts": [] + }, + "pathParameters": [], + "queryParameters": [], + "headers": [], + "responseHeaders": [], + "errors": [], + "auth": false, + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "ea949df5", + "url": "/admins", + "endpointHeaders": [], + "endpointPathParameters": [], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "response": { + "value": { + "value": { + "jsonExample": {}, + "shape": { + "shape": { + "properties": [], + "type": "object" + }, + "typeName": { + "typeId": "listAdmins_Response_200", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listAdmins_Response_200" + }, + "type": "named" + } + }, + "type": "body" + }, + "type": "ok" + } + } + } + ], + "idempotent": false, + "fullPath": { + "head": "/admins", + "parts": [] + }, + "allPathParameters": [], + "source": { + "type": "openapi" + }, + "audiences": [], + "id": "endpoint_.listAdmins", + "name": "listAdmins", + "v2RequestBodies": {}, + "response": { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listAdmins_Response_200", + "typeId": "listAdmins_Response_200", + "inline": false, + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listAdminsExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + }, + "v2Examples": { + "autogeneratedExamples": { + "base_listAdminsExample_200": { + "displayName": "listAdminsExample", + "request": { + "endpoint": { + "method": "GET", + "path": "/admins" + }, + "environment": "https://api.example.com", + "pathParameters": {}, + "queryParameters": {}, + "headers": {} + }, + "response": { + "statusCode": 200, + "body": { + "value": {}, + "type": "json" + } + } + } + }, + "userSpecifiedExamples": {} + }, + "v2Responses": { + "responses": [ + { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "listAdmins_Response_200", + "typeId": "listAdmins_Response_200", + "inline": false, + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "listAdminsExample": {} + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + } + ] + } + }, + { + "method": "GET", + "baseUrl": "https://api.example.com", + "path": { + "head": "/users/", + "parts": [ + { + "pathParameter": "id", + "tail": "" + } + ] + }, + "pathParameters": [ + { + "name": "id", + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "location": "ENDPOINT", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "id_example": "id" + } + } + } + ], + "queryParameters": [], + "headers": [], + "responseHeaders": [], + "errors": [], + "auth": false, + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "baa3450a", + "url": "/users/id", + "endpointHeaders": [], + "endpointPathParameters": [ + { + "name": "id", + "value": { + "jsonExample": "id", + "shape": { + "primitive": { + "string": { + "original": "id" + }, + "type": "string" + }, + "type": "primitive" + } + } + } + ], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "response": { + "value": { + "value": { + "jsonExample": { + "id": "id", + "username": "username", + "password_hash": "password_hash" + }, + "shape": { + "shape": { + "properties": [ + { + "name": "id", + "originalTypeDeclaration": { + "typeId": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User" + }, + "value": { + "jsonExample": "id", + "shape": { + "container": { + "optional": { + "jsonExample": "id", + "shape": { + "primitive": { + "string": { + "original": "id" + }, + "type": "string" + }, + "type": "primitive" + } + }, + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "username", + "originalTypeDeclaration": { + "typeId": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User" + }, + "value": { + "jsonExample": "username", + "shape": { + "container": { + "optional": { + "jsonExample": "username", + "shape": { + "primitive": { + "string": { + "original": "username" + }, + "type": "string" + }, + "type": "primitive" + } + }, + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + }, + { + "name": "password_hash", + "originalTypeDeclaration": { + "typeId": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User" + }, + "value": { + "jsonExample": "password_hash", + "shape": { + "container": { + "optional": { + "jsonExample": "password_hash", + "shape": { + "primitive": { + "string": { + "original": "password_hash" + }, + "type": "string" + }, + "type": "primitive" + } + }, + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + } + } + } + ], + "type": "object" + }, + "typeName": { + "typeId": "User", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User" + }, + "type": "named" + } + }, + "type": "body" + }, + "type": "ok" + } + } + } + ], + "idempotent": false, + "fullPath": { + "head": "/users/", + "parts": [ + { + "pathParameter": "id", + "tail": "" + } + ] + }, + "allPathParameters": [ + { + "name": "id", + "valueType": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "location": "ENDPOINT", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "id_example": "id" + } + } + } + ], + "source": { + "type": "openapi" + }, + "audiences": [ + "public" + ], + "id": "endpoint_.getUser", + "name": "getUser", + "v2RequestBodies": {}, + "response": { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User", + "typeId": "User", + "inline": false, + "displayName": "User", + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "getUserExample": { + "id": "string", + "username": "string", + "password_hash": "string" + } + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + }, + "v2Examples": { + "autogeneratedExamples": { + "base_getUserExample_200": { + "displayName": "getUserExample", + "request": { + "endpoint": { + "method": "GET", + "path": "/users/id" + }, + "environment": "https://api.example.com", + "pathParameters": { + "id": "id" + }, + "queryParameters": {}, + "headers": {} + }, + "response": { + "statusCode": 200, + "body": { + "value": { + "id": "string", + "username": "string", + "password_hash": "string" + }, + "type": "json" + } + } + } + }, + "userSpecifiedExamples": {} + }, + "v2Responses": { + "responses": [ + { + "statusCode": 200, + "body": { + "value": { + "responseBodyType": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": "User", + "typeId": "User", + "inline": false, + "displayName": "User", + "type": "named" + }, + "docs": "ok", + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "getUserExample": { + "id": "string", + "username": "string", + "password_hash": "string" + } + } + }, + "type": "response" + }, + "type": "json" + }, + "docs": "ok" + } + ] + } + } + ] + } + }, + "errors": {}, + "webhookGroups": { + "userCreated": [ + { + "id": ".userCreated", + "name": "userCreated", + "method": "POST", + "headers": [], + "payload": { + "name": "userCreated_Request", + "extends": [], + "properties": [ + { + "name": "user_id", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "WebhooksUserCreatedPayloadContentApplicationJsonSchemaUserId_example_autogenerated": "string" + } + } + }, + { + "name": "internal_reason", + "valueType": { + "container": { + "optional": { + "primitive": { + "v1": "STRING", + "v2": { + "validation": {}, + "type": "string" + } + }, + "type": "primitive" + }, + "type": "optional" + }, + "type": "container" + }, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": { + "WebhooksUserCreatedPayloadContentApplicationJsonSchemaInternalReason_example_autogenerated": "string" + } + } + } + ], + "type": "inlinedPayload" + }, + "responses": [ + { + "statusCode": 200, + "docs": "ok" + } + ], + "examples": [], + "v2Examples": { + "autogeneratedExamples": { + "userCreatedExample": { + "name": "userCreatedExample", + "payload": {} + } + }, + "userSpecifiedExamples": {} + } + } + ] + }, + "headers": [], + "idempotencyHeaders": [], + "apiDisplayName": "Property-level audience filtering regression fixture", + "pathParameters": [], + "errorDiscriminationStrategy": { + "type": "statusCode" + }, + "variables": [], + "serviceTypeReferenceInfo": { + "sharedTypes": [], + "typesReferencedOnlyByService": {} + }, + "environments": { + "defaultEnvironment": "https://api.example.com", + "environments": { + "environments": [ + { + "id": "https://api.example.com", + "name": "https://api.example.com", + "url": "https://api.example.com" + } + ], + "type": "singleBaseUrl" + } + }, + "rootPackage": { + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "service": "service_", + "types": [ + "User" + ], + "errors": [], + "subpackages": [], + "webhooks": "userCreated", + "hasEndpointsInTree": false + }, + "subpackages": {}, + "sdkConfig": { + "hasFileDownloadEndpoints": false, + "hasPaginatedEndpoints": false, + "hasStreamingEndpoints": false, + "isAuthMandatory": true, + "platformHeaders": { + "language": "", + "sdkName": "", + "sdkVersion": "" + } + }, + "apiName": "Property-level audience filtering regression fixture", + "constants": { + "errorInstanceIdKey": "errorInstanceId" + } +} \ No newline at end of file diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/fern/generators.yml b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/fern/generators.yml new file mode 100644 index 000000000000..602118874c2a --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/fern/generators.yml @@ -0,0 +1,3 @@ +api: + specs: + - openapi: ../openapi.yml diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/generators.yml.bak b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/generators.yml.bak new file mode 100644 index 000000000000..602118874c2a --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/generators.yml.bak @@ -0,0 +1,3 @@ +api: + specs: + - openapi: ../openapi.yml diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/openapi.yml b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/openapi.yml new file mode 100644 index 000000000000..e5ef04885976 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/v3-property-level-audiences/openapi.yml @@ -0,0 +1,127 @@ +openapi: 3.0.3 +info: + title: Property-level audience filtering regression fixture + version: 1.0.0 + description: | + Mirrors the structure of the customer-reported V3 OpenAPI audience bug: + inline request body properties, query parameters, and inline webhook + payload properties carry `x-fern-audiences`, and we want to verify the + shared IR filter scrubs the right ones — and ONLY the right ones — when + the V3 OpenAPI converter is in use. +servers: + - url: https://api.example.com +paths: + /users: + post: + operationId: createUser + x-fern-audiences: ["public"] + parameters: + - in: query + name: page + schema: + type: integer + - in: query + name: internal_ref + x-fern-audiences: ["internal"] + schema: + type: string + - in: query + name: dual_audience_param + x-fern-audiences: ["public", "internal"] + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + # Untagged properties must always survive any filter. + name: + type: string + email: + type: string + ip_address: + type: string + # Tagged internal-only — must be scrubbed by the "public" filter. + force_verify: + type: boolean + x-fern-audiences: ["internal"] + custom_id: + type: string + x-fern-audiences: ["internal"] + # Tagged with both audiences — must survive a "public" filter. + dual_audience_field: + type: string + x-fern-audiences: ["public", "internal"] + responses: + "201": + description: ok + + get: + operationId: listUsers + x-fern-audiences: ["internal"] + responses: + "200": + description: internal-only listing + + /admins: + get: + operationId: listAdmins + # No audience tag — must survive any audience filter (universal endpoint). + responses: + "200": + description: ok + + /users/{id}: + get: + operationId: getUser + x-fern-audiences: ["public"] + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + description: ok + content: + application/json: + schema: + $ref: "#/components/schemas/User" + +webhooks: + userCreated: + post: + operationId: userCreated + x-fern-audiences: ["public"] + x-fern-webhook: true + requestBody: + content: + application/json: + schema: + type: object + properties: + user_id: + type: string + internal_reason: + type: string + x-fern-audiences: ["internal"] + responses: + "200": + description: ok + +components: + schemas: + User: + type: object + properties: + id: + type: string + username: + type: string + password_hash: + type: string + x-fern-audiences: ["internal"] diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/v3-property-level-audiences.test.ts b/packages/cli/api-importers/v3-importer-tests/src/__test__/v3-property-level-audiences.test.ts new file mode 100644 index 000000000000..7b3ab6e4dd55 --- /dev/null +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/v3-property-level-audiences.test.ts @@ -0,0 +1,393 @@ +import type { Audiences } from "@fern-api/configuration"; +import { AbsoluteFilePath, join, RelativeFilePath } from "@fern-api/fs-utils"; +import type { FernIr } from "@fern-api/ir-sdk"; +import { getOriginalName, getWireValue } from "@fern-api/ir-utils"; +import { OSSWorkspace } from "@fern-api/lazy-fern-workspace"; +import { createMockTaskContext } from "@fern-api/task-context"; +import { loadAPIWorkspace } from "@fern-api/workspace-loader"; +import { describe, expect, it } from "vitest"; + +const FIXTURES_DIR = join(AbsoluteFilePath.of(__dirname), RelativeFilePath.of("fixtures")); +const FIXTURE_NAME = "v3-property-level-audiences"; + +async function getIRForFixture(audiences: Audiences) { + const fixturePath = join(FIXTURES_DIR, RelativeFilePath.of(FIXTURE_NAME), RelativeFilePath.of("fern")); + const context = createMockTaskContext(); + const workspace = await loadAPIWorkspace({ + absolutePathToWorkspace: fixturePath, + context, + cliVersion: "0.0.0", + workspaceName: FIXTURE_NAME + }); + if (!workspace.didSucceed) { + throw new Error(`Failed to load OpenAPI fixture ${FIXTURE_NAME}\n${JSON.stringify(workspace.failures)}`); + } + if (!(workspace.workspace instanceof OSSWorkspace)) { + throw new Error(`Expected OSSWorkspace for fixture ${FIXTURE_NAME}`); + } + return workspace.workspace.getIntermediateRepresentation({ + context, + audiences, + enableUniqueErrorsPerEndpoint: false, + generateV1Examples: true, + logWarnings: false + }); +} + +type IR = Awaited>; + +function findEndpointByOperationId(ir: IR, operationId: string): FernIr.HttpEndpoint | undefined { + for (const service of Object.values(ir.services)) { + for (const endpoint of service.endpoints) { + if (getOriginalName(endpoint.name) === operationId) { + return endpoint; + } + } + } + return undefined; +} + +function getInlineRequestPropertyNames(endpoint: FernIr.HttpEndpoint | undefined): string[] { + if (endpoint?.requestBody?.type !== "inlinedRequestBody") { + return []; + } + return endpoint.requestBody.properties.map((property) => getWireValue(property.name)); +} + +function getV2InlineRequestPropertyNames(endpoint: FernIr.HttpEndpoint | undefined): string[] { + const names: string[] = []; + for (const body of endpoint?.v2RequestBodies?.requestBodies ?? []) { + if (body.type !== "inlinedRequestBody") { + continue; + } + for (const property of body.properties) { + names.push(getWireValue(property.name)); + } + } + return names; +} + +function getQueryParameterNames(endpoint: FernIr.HttpEndpoint | undefined): string[] { + return endpoint?.queryParameters.map((qp) => getWireValue(qp.name)) ?? []; +} + +function findWebhook(ir: IR, operationId: string): FernIr.Webhook | undefined { + for (const group of Object.values(ir.webhookGroups)) { + for (const webhook of group) { + if (getOriginalName(webhook.name) === operationId) { + return webhook; + } + } + } + return undefined; +} + +function getWebhookPropertyNames(webhook: FernIr.Webhook | undefined): string[] { + if (webhook?.payload.type !== "inlinedPayload") { + return []; + } + return webhook.payload.properties.map((property) => getWireValue(property.name)); +} + +function findTypeProperties(ir: IR, originalTypeName: string): string[] | undefined { + for (const type of Object.values(ir.types)) { + if (getOriginalName(type.name.name) !== originalTypeName) { + continue; + } + if (type.shape.type !== "object") { + return []; + } + return type.shape.properties.map((property) => getWireValue(property.name)); + } + return undefined; +} + +// These tests guard the OpenAPI 3.1 → IR audience filter against the regression +// where `x-fern-audiences` on individual inline properties, query parameters, +// and inline webhook payload properties was silently ignored. They also pin +// down behaviour that customers depend on for published SDKs and docs: +// +// 1. With `audiences: { type: "all" }` the IR is left untouched (no scrubbing). +// 2. Untagged properties NEVER get scrubbed when an audience filter is active. +// 3. Properties tagged with audiences that DON'T overlap the filter are +// scrubbed from both `requestBody.properties` AND `v2RequestBodies`. +// 4. Properties tagged with at least one overlapping audience survive. +// +// `audiences: { type: "all" }` covers the path used by `pnpm fern generate` +// when no `--audience` flag is set; the published SDK path is unaffected by +// this fix and the existing v3-sdks snapshot suite locks that down byte-by-byte. +describe("OpenAPI 3.1 → IR property-level audience filtering (regression coverage)", () => { + describe("no audience filter (audiences: { type: 'all' })", () => { + it("keeps every endpoint, type property, and inline request property untouched", async () => { + const ir = await getIRForFixture({ type: "all" }); + + // Endpoints stay intact (universal + tagged + multi-tagged). + expect(findEndpointByOperationId(ir, "createUser")).toBeDefined(); + expect(findEndpointByOperationId(ir, "listUsers")).toBeDefined(); + expect(findEndpointByOperationId(ir, "listAdmins")).toBeDefined(); + + // Every inline property of the createUser request body is present. + const createUser = findEndpointByOperationId(ir, "createUser"); + expect(getInlineRequestPropertyNames(createUser).sort()).toEqual( + ["custom_id", "dual_audience_field", "email", "force_verify", "ip_address", "name"].sort() + ); + + // The parallel v2RequestBodies collection mirrors the primary body. + expect(getV2InlineRequestPropertyNames(createUser).sort()).toEqual( + ["custom_id", "dual_audience_field", "email", "force_verify", "ip_address", "name"].sort() + ); + + // All query parameters survive (including the internal-only one). + expect(getQueryParameterNames(createUser).sort()).toEqual( + ["dual_audience_param", "internal_ref", "page"].sort() + ); + + // Inline webhook payload property survives. + expect(getWebhookPropertyNames(findWebhook(ir, "userCreated")).sort()).toEqual( + ["internal_reason", "user_id"].sort() + ); + + // Named-type internal property survives. + const userProperties = findTypeProperties(ir, "User"); + expect(userProperties?.sort()).toEqual(["id", "password_hash", "username"].sort()); + }, 90_000); + }); + + describe("audiences: { type: 'select', audiences: ['public'] }", () => { + it("scrubs only inline request properties whose audiences do not overlap [public]", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + expect(createUser).toBeDefined(); + + const requestProperties = getInlineRequestPropertyNames(createUser); + // Untagged (universal) properties must survive — these are the + // exact fields that customers ship in their SDKs. + expect(requestProperties).toContain("name"); + expect(requestProperties).toContain("email"); + expect(requestProperties).toContain("ip_address"); + // Properties whose audiences include "public" must survive. + expect(requestProperties).toContain("dual_audience_field"); + // Internal-only properties must be scrubbed. + expect(requestProperties).not.toContain("force_verify"); + expect(requestProperties).not.toContain("custom_id"); + }, 90_000); + + it("also scrubs internal properties from the parallel v2RequestBodies collection", async () => { + // V3 importers populate `v2RequestBodies` as a sibling of the primary + // request body. We must scrub both consistently — leaving stale + // internal fields in v2RequestBodies leaked them to docs. + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + const v2Names = getV2InlineRequestPropertyNames(createUser); + expect(v2Names).toContain("name"); + expect(v2Names).toContain("email"); + expect(v2Names).toContain("dual_audience_field"); + expect(v2Names).not.toContain("force_verify"); + expect(v2Names).not.toContain("custom_id"); + }, 90_000); + + it("scrubs only query parameters whose audiences do not overlap [public]", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + const queryParams = getQueryParameterNames(createUser); + expect(queryParams).toContain("page"); + expect(queryParams).toContain("dual_audience_param"); + expect(queryParams).not.toContain("internal_ref"); + }, 90_000); + + it("scrubs only inline webhook payload properties whose audiences do not overlap [public]", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const webhook = findWebhook(ir, "userCreated"); + const properties = getWebhookPropertyNames(webhook); + expect(properties).toContain("user_id"); + expect(properties).not.toContain("internal_reason"); + }, 90_000); + + it("scrubs only named-type properties whose audiences do not overlap [public]", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const userProperties = findTypeProperties(ir, "User"); + expect(userProperties).toBeDefined(); + expect(userProperties).toContain("id"); + expect(userProperties).toContain("username"); + expect(userProperties).not.toContain("password_hash"); + }, 90_000); + + it("filters out the internal-tagged endpoint while keeping the public one", async () => { + // Endpoint-level filtering is intentionally exclusive: an endpoint + // is kept only if at least one of its declared audiences overlaps + // the active filter. Untagged endpoints are therefore excluded + // when a filter is active. This pins down the long-standing IR + // contract that both the Fern and OpenAPI V3 paths already share. + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + expect(findEndpointByOperationId(ir, "createUser")).toBeDefined(); + expect(findEndpointByOperationId(ir, "listUsers")).toBeUndefined(); + expect(findEndpointByOperationId(ir, "listAdmins")).toBeUndefined(); + }, 90_000); + + it("does NOT scrub legitimate untagged inline request properties (SDK regression guard)", async () => { + // This is the regression the user explicitly called out: never + // silently filter fields that are not tagged with an audience. + // Published SDKs ship these fields and must continue to. + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + const requestProperties = getInlineRequestPropertyNames(createUser); + for (const untagged of ["name", "email", "ip_address"]) { + expect(requestProperties).toContain(untagged); + } + + const v2Names = getV2InlineRequestPropertyNames(createUser); + for (const untagged of ["name", "email", "ip_address"]) { + expect(v2Names).toContain(untagged); + } + + // Properties whose audiences include the active filter must also survive. + expect(requestProperties).toContain("dual_audience_field"); + expect(v2Names).toContain("dual_audience_field"); + }, 90_000); + + it("does NOT scrub legitimate untagged query parameters or named-type properties", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + expect(getQueryParameterNames(createUser)).toContain("page"); + expect(getQueryParameterNames(createUser)).toContain("dual_audience_param"); + + const userProperties = findTypeProperties(ir, "User"); + expect(userProperties).toContain("id"); + expect(userProperties).toContain("username"); + }, 90_000); + + it("defense-in-depth: scrubbed identifiers do not appear anywhere in the serialized IR", async () => { + // Catches accidental leaks of internal-tagged identifiers into + // serialized v2 example payloads, autogenerated examples, v2 + // request/response bodies, type-level examples, webhook payload + // examples, or any other shape we might not have explicitly + // checked. Public-tagged identifiers that survive the filter + // (e.g. `name`) are intentionally not in this list. + const ir = await getIRForFixture({ type: "select", audiences: ["public"] }); + const serialized = JSON.stringify(ir); + for (const scrubbed of ["force_verify", "custom_id", "internal_ref", "internal_reason", "password_hash"]) { + expect(serialized, `expected scrubbed identifier "${scrubbed}" to be absent from IR`).not.toContain( + scrubbed + ); + } + }, 90_000); + }); + + describe("audiences: { type: 'select', audiences: ['public', 'internal'] }", () => { + it("keeps every property when the active filter covers all declared audiences", async () => { + const ir = await getIRForFixture({ type: "select", audiences: ["public", "internal"] }); + + const createUser = findEndpointByOperationId(ir, "createUser"); + expect(getInlineRequestPropertyNames(createUser).sort()).toEqual( + ["custom_id", "dual_audience_field", "email", "force_verify", "ip_address", "name"].sort() + ); + expect(getQueryParameterNames(createUser).sort()).toEqual( + ["dual_audience_param", "internal_ref", "page"].sort() + ); + expect(getWebhookPropertyNames(findWebhook(ir, "userCreated")).sort()).toEqual( + ["internal_reason", "user_id"].sort() + ); + expect(findTypeProperties(ir, "User")?.sort()).toEqual(["id", "password_hash", "username"].sort()); + }, 90_000); + }); + + // The shared filter prunes any IR field whose backing `IrGraph` collection is empty + // (environments, services, endpoints, types, webhooks, channels, errors). If the V3 + // import path forgets to register a collection, that field silently disappears once + // an audience filter is active — exactly the regression that stripped every `servers:` + // URL and caused docs to render `POST /users` instead of `POST https://api.example.com/users`. + // + // The tests below pin down the structural contract: anything the V3 path does NOT + // audience-tag (environments, auth, top-level headers, idempotency headers, base path, + // path parameters, API name/display name/version, errors referenced by a surviving + // endpoint) MUST be byte-for-byte identical between the unfiltered IR and any + // audience-filtered IR. + describe("structural invariants (regression coverage for untagged top-level fields)", () => { + // `toEqual` chokes on IR objects that mix plain values with non-plain prototypes + // (e.g. classes from `@fern-api/ir-sdk` ↔ casing-generator outputs). Comparing the + // JSON-serialized projection is exactly what the IR ships as on disk and is what + // the docs/SDK pipeline consumes downstream, so it's the strongest contract we + // can pin down here. + function project(value: T): unknown { + const serialized = JSON.stringify(value); + return serialized === undefined ? undefined : JSON.parse(serialized); + } + + it("environments survive intact across every audience filter mode", async () => { + const [unfiltered, publicOnly, both] = await Promise.all([ + getIRForFixture({ type: "all" }), + getIRForFixture({ type: "select", audiences: ["public"] }), + getIRForFixture({ type: "select", audiences: ["public", "internal"] }) + ]); + const baseline = unfiltered.environments; + expect(baseline, "fixture must declare at least one server").toBeDefined(); + expect(baseline?.environments.environments.length).toBeGreaterThan(0); + expect(project(publicOnly.environments)).toEqual(project(baseline)); + expect(project(both.environments)).toEqual(project(baseline)); + + // Belt-and-braces: the customer-visible default URL field must round-trip too. + expect(publicOnly.environments?.defaultEnvironment).toBe(baseline?.defaultEnvironment); + expect(both.environments?.defaultEnvironment).toBe(baseline?.defaultEnvironment); + }, 90_000); + + it("untagged top-level fields are structurally identical between unfiltered and filtered IRs", async () => { + const [unfiltered, filtered] = await Promise.all([ + getIRForFixture({ type: "all" }), + getIRForFixture({ type: "select", audiences: ["public"] }) + ]); + + // Every field below is either audience-agnostic on the V3 path or + // intentionally global. If the shared filter ever starts pruning one, + // this assertion fails before the regression reaches a customer. + const untouchedKeys = [ + "environments", + "auth", + "headers", + "idempotencyHeaders", + "apiVersion", + "apiDisplayName", + "apiName", + "apiDocs", + "basePath", + "pathParameters", + "variables", + "errorDiscriminationStrategy" + ] as const satisfies readonly (keyof typeof unfiltered)[]; + + for (const key of untouchedKeys) { + expect(project(filtered[key]), `top-level field "${key}" must survive audience filtering`).toEqual( + project(unfiltered[key]) + ); + } + }, 90_000); + + it("endpoints surviving the filter retain their environment-aware url, headers, and path parameters", async () => { + // Sanity check that endpoint-level structural fields (not just the + // top-level `environments` map) keep referencing the unfiltered base URL. + // This is what the docs renderer actually uses to display `POST /users`. + const [unfiltered, filtered] = await Promise.all([ + getIRForFixture({ type: "all" }), + getIRForFixture({ type: "select", audiences: ["public"] }) + ]); + + const unfilteredEndpoint = findEndpointByOperationId(unfiltered, "createUser"); + const filteredEndpoint = findEndpointByOperationId(filtered, "createUser"); + expect(unfilteredEndpoint).toBeDefined(); + expect(filteredEndpoint).toBeDefined(); + + expect(project(filteredEndpoint?.fullPath)).toEqual(project(unfilteredEndpoint?.fullPath)); + expect(project(filteredEndpoint?.path)).toEqual(project(unfilteredEndpoint?.path)); + expect(project(filteredEndpoint?.baseUrl)).toEqual(project(unfilteredEndpoint?.baseUrl)); + expect(project(filteredEndpoint?.headers)).toEqual(project(unfilteredEndpoint?.headers)); + expect(project(filteredEndpoint?.pathParameters)).toEqual(project(unfilteredEndpoint?.pathParameters)); + }, 90_000); + }); +}); diff --git a/packages/cli/cli/changes/5.23.3/fix-property-level-audience-filtering-v3-openapi.yml b/packages/cli/cli/changes/5.23.3/fix-property-level-audience-filtering-v3-openapi.yml new file mode 100644 index 000000000000..d72df6cc4868 --- /dev/null +++ b/packages/cli/cli/changes/5.23.3/fix-property-level-audience-filtering-v3-openapi.yml @@ -0,0 +1,9 @@ +- summary: | + Property-level `x-fern-audiences` filtering now also applies on the V3 OpenAPI / AsyncAPI / + OpenRPC import path used by `fern docs dev` and `fern generate --from-openapi`. Inline + request-body properties, query parameters, inline webhook payload properties, named-type + properties, `v2RequestBodies`, and the docs `v2Examples` blocks (type-level, request body, + response body, endpoint-level, `v2Responses`, and webhook payload examples) are now scrubbed + using the same exclusion semantics as the Fern Definition path. Untagged elements remain + universal and are never silently removed. + type: fix diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index 1e4d93cae085..7e5f7e769617 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,4 +1,17 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 5.23.3 + changelogEntry: + - summary: | + Property-level `x-fern-audiences` filtering now also applies on the V3 OpenAPI / AsyncAPI / + OpenRPC import path used by `fern docs dev` and `fern generate --from-openapi`. Inline + request-body properties, query parameters, inline webhook payload properties, named-type + properties, `v2RequestBodies`, and the docs `v2Examples` blocks (type-level, request body, + response body, endpoint-level, `v2Responses`, and webhook payload examples) are now scrubbed + using the same exclusion semantics as the Fern Definition path. Untagged elements remain + universal and are never silently removed. + type: fix + createdAt: "2026-05-12" + irVersion: 66 - version: 5.23.2 changelogEntry: - summary: | diff --git a/packages/commons/ir-utils/src/__test__/filteredIrPropertyAudiences.test.ts b/packages/commons/ir-utils/src/__test__/filteredIrPropertyAudiences.test.ts index 486ca1a7625a..a401911cb354 100644 --- a/packages/commons/ir-utils/src/__test__/filteredIrPropertyAudiences.test.ts +++ b/packages/commons/ir-utils/src/__test__/filteredIrPropertyAudiences.test.ts @@ -204,3 +204,59 @@ describe("IrGraph.build() property exclusion (integration)", () => { expect(filteredIr.hasProperty(typeId, "password_hash")).toBe(true); }); }); + +// The V3 OpenAPI importer must register environments with the IR graph even when the +// spec carries no per-environment `x-fern-audiences` tagging (the common `servers:` +// case). The contract it relies on is `markEnvironmentForAudiences(env, [], true)` → +// environment id is present in the filtered IR even under an active audience filter. +// If this contract ever breaks, every server URL silently disappears from the IR and +// docs render `POST /users` instead of `POST https://api.example.com/users`. +describe("IrGraph.markEnvironmentForAudiences (contract for untagged servers)", () => { + function makeSingleBaseUrlEnvironment(id: string) { + return { + id, + name: { + originalName: id, + camelCase: { unsafeName: id, safeName: id }, + snakeCase: { unsafeName: id, safeName: id }, + screamingSnakeCase: { unsafeName: id, safeName: id }, + pascalCase: { unsafeName: id, safeName: id } + }, + url: `https://${id}.example.com`, + audiences: undefined, + defaultUrl: undefined, + urlTemplate: undefined, + urlVariables: undefined, + docs: undefined + }; + } + + it("preserves the environment under an audience filter when ignoreAudiences=true", () => { + const graph = new IrGraph({ type: "select", audiences: ["public"] }); + const env = makeSingleBaseUrlEnvironment("prod"); + graph.markEnvironmentForAudiences(env, [], true); + expect(graph.build().hasEnvironmentId("prod")).toBe(true); + }); + + it("preserves the environment under an audience filter when its audiences overlap the filter", () => { + const graph = new IrGraph({ type: "select", audiences: ["public"] }); + const env = makeSingleBaseUrlEnvironment("prod"); + graph.markEnvironmentForAudiences(env, ["public"]); + expect(graph.build().hasEnvironmentId("prod")).toBe(true); + }); + + it("drops the environment under an audience filter when its audiences don't overlap and ignoreAudiences is false", () => { + const graph = new IrGraph({ type: "select", audiences: ["public"] }); + const env = makeSingleBaseUrlEnvironment("prod"); + graph.markEnvironmentForAudiences(env, ["internal"]); + expect(graph.build().hasEnvironmentId("prod")).toBe(false); + }); + + it("regression guard: a totally unregistered environment is reported as absent", () => { + // This is the failure mode my V3 fix has to compensate for — if the importer + // never calls `markEnvironmentForAudiences`, the env id is NOT in the filtered + // IR and the shared filter prunes the entire `servers:` block. + const graph = new IrGraph({ type: "select", audiences: ["public"] }); + expect(graph.build().hasEnvironmentId("prod")).toBe(false); + }); +}); diff --git a/packages/commons/ir-utils/src/filtered-ir/IrGraph.ts b/packages/commons/ir-utils/src/filtered-ir/IrGraph.ts index 553336b8b145..72c9cb24cc52 100644 --- a/packages/commons/ir-utils/src/filtered-ir/IrGraph.ts +++ b/packages/commons/ir-utils/src/filtered-ir/IrGraph.ts @@ -379,6 +379,31 @@ export class IrGraph { } } + /** + * Registers inline request body audience info for importers that don't pass a raw Fern + * Definition (e.g. OpenAPI V3). Properties absent from every audience set are universal. + */ + public markInlinedRequestPropertiesForAudiences( + endpointId: EndpointId, + propertiesByAudience: Record> + ): void { + this.requestProperties[endpointId] = { endpointId, propertiesByAudience }; + } + + public markQueryParametersForAudiences( + endpointId: EndpointId, + parametersByAudience: Record> + ): void { + this.queryParameters[endpointId] = { endpointId, parametersByAudience }; + } + + public markInlinedWebhookPayloadPropertiesForAudiences( + webhookId: WebhookId, + propertiesByAudience: Record> + ): void { + this.webhookProperties[webhookId] = { webhookId, propertiesByAudience }; + } + public addChannel( filepath: FernFilepath, channelId: string, @@ -463,8 +488,7 @@ export class IrGraph { this.addReferencedTypes(typeIds, channelNode.referencedTypes); } - // Property-level filtering is exclusion-based: a property is excluded iff it has - // at least one declared audience and none of those overlap the active filter. + // Property filtering is exclusion-based: drop only if declared audiences don't overlap. const excludedProperties: Record | undefined> = {}; const excludedRequestProperties: Record | undefined> = {}; const excludedQueryParameters: Record | undefined> = {}; diff --git a/packages/commons/ir-utils/src/filtered-ir/filterExamples.ts b/packages/commons/ir-utils/src/filtered-ir/filterExamples.ts index 2fce0e99bab4..00af9e5e9a87 100644 --- a/packages/commons/ir-utils/src/filtered-ir/filterExamples.ts +++ b/packages/commons/ir-utils/src/filtered-ir/filterExamples.ts @@ -17,9 +17,13 @@ import { ExampleTypeReference, ExampleTypeReferenceShape, ExampleTypeShape, - FernIr + FernIr, + TypeReference, + V2HttpEndpointExamples, + V2SchemaExamples } from "@fern-api/ir-sdk"; +import { IdGenerator } from "../utils/IdGenerator.js"; import { getWireValue } from "../utils/namesUtils.js"; import { FilteredIr } from "./FilteredIr.js"; @@ -482,13 +486,9 @@ export function filterEndpointExample({ } /** - * Filters an inline webhook payload example by `hasWebhookPayloadProperty`. Inline - * webhook payloads are not registered as regular types in the filter graph, so we - * cannot reuse `filterExampleTypeReference` (which short-circuits on `hasTypeId`). - * - * The IR converter currently emits user-specified inline webhook payload examples - * as `container.map` shapes of `unknown` values (one entry per top-level key) - * rather than as typed `named.object` shapes. We handle both forms. + * Filters an inline webhook payload example by `hasWebhookPayloadProperty`. Inline payloads + * aren't registered as regular types in the filter graph, and the IR converter emits these + * examples in two forms (`container.map` and `named.object`), so we handle both. */ export function filterWebhookExamplePayload({ filteredIr, @@ -605,3 +605,164 @@ export function filterExampleType({ } }); } + +// v2 example scrubbers +// +// v2 examples are raw `unknown` JSON payloads (unlike the typed V1 example trees above), so +// they need a separate top-level-key scrubbing pass when an audience filter is active. +// Nested objects are left alone because the v2 shapes don't carry the nested types we'd need. + +type KeyPredicate = (key: string) => boolean; + +function stripTopLevelKeysFromJsonExample(value: unknown, isAllowed: KeyPredicate): unknown { + if (value == null || typeof value !== "object" || Array.isArray(value)) { + return value; + } + const out: Record = {}; + for (const [key, v] of Object.entries(value as Record)) { + if (isAllowed(key)) { + out[key] = v; + } + } + return out; +} + +function scrubV2SchemaExampleMap(map: Record, isAllowed: KeyPredicate): Record { + return Object.fromEntries( + Object.entries(map).map(([name, value]) => [name, stripTopLevelKeysFromJsonExample(value, isAllowed)]) + ); +} + +export function scrubV2SchemaExamples( + v2Examples: V2SchemaExamples | undefined, + isAllowed: KeyPredicate +): V2SchemaExamples | undefined { + if (v2Examples == null) { + return v2Examples; + } + return { + userSpecifiedExamples: scrubV2SchemaExampleMap(v2Examples.userSpecifiedExamples, isAllowed), + autogeneratedExamples: scrubV2SchemaExampleMap(v2Examples.autogeneratedExamples, isAllowed) + }; +} + +/** Peels containers (optional, nullable, list, set) to the canonical `IrGraph` type id, if any. */ +export function getNamedTypeIdFromTypeReference(typeReference: TypeReference): string | undefined { + return typeReference._visit({ + named: (declaredTypeName) => IdGenerator.generateTypeId(declaredTypeName), + container: (container) => + container._visit({ + optional: (inner) => getNamedTypeIdFromTypeReference(inner), + nullable: (inner) => getNamedTypeIdFromTypeReference(inner), + list: (inner) => getNamedTypeIdFromTypeReference(inner), + set: (inner) => getNamedTypeIdFromTypeReference(inner), + map: () => undefined, + literal: () => undefined, + _other: () => undefined + }), + primitive: () => undefined, + unknown: () => undefined, + _other: () => undefined + }); +} + +/** + * Scrubs the endpoint-level `v2Examples` block. Shapes we can't disambiguate (file uploads, + * byte bodies, streaming responses) are left untouched. + */ +export function scrubV2HttpEndpointExamples({ + v2Examples, + requestBodyIsAllowed, + responseBodyIsAllowed, + queryParameterIsAllowed +}: { + v2Examples: V2HttpEndpointExamples | undefined; + requestBodyIsAllowed: KeyPredicate; + responseBodyIsAllowed: KeyPredicate; + queryParameterIsAllowed: KeyPredicate; +}): V2HttpEndpointExamples | undefined { + if (v2Examples == null) { + return v2Examples; + } + const scrubExampleMap = ( + examples: Record + ): Record => { + return Object.fromEntries( + Object.entries(examples).map(([name, example]) => [ + name, + { + ...example, + request: + example.request != null + ? { + ...example.request, + requestBody: stripTopLevelKeysFromJsonExample( + example.request.requestBody, + requestBodyIsAllowed + ), + queryParameters: + example.request.queryParameters != null + ? Object.fromEntries( + Object.entries(example.request.queryParameters).filter(([key]) => + queryParameterIsAllowed(key) + ) + ) + : example.request.queryParameters + } + : example.request, + response: + example.response?.body != null + ? { + ...example.response, + body: scrubV2HttpEndpointResponseBody(example.response.body, responseBodyIsAllowed) + } + : example.response + } + ]) + ); + }; + return { + userSpecifiedExamples: scrubExampleMap(v2Examples.userSpecifiedExamples), + autogeneratedExamples: scrubExampleMap(v2Examples.autogeneratedExamples) + }; +} + +function scrubV2HttpEndpointResponseBody( + body: FernIr.V2HttpEndpointResponseBody, + responseBodyIsAllowed: KeyPredicate +): FernIr.V2HttpEndpointResponseBody { + return body._visit({ + json: (value) => + FernIr.V2HttpEndpointResponseBody.json(stripTopLevelKeysFromJsonExample(value, responseBodyIsAllowed)), + error: (value) => FernIr.V2HttpEndpointResponseBody.error(value), + stream: (value) => FernIr.V2HttpEndpointResponseBody.stream(value), + _other: () => body + }); +} + +/** Scrubs `v2Examples` on a webhook by dropping top-level payload keys excluded by the filter. */ +export function scrubV2WebhookExamples( + v2Examples: FernIr.V2WebhookExamples | undefined, + isAllowed: KeyPredicate +): FernIr.V2WebhookExamples | undefined { + if (v2Examples == null) { + return v2Examples; + } + const scrubExampleMap = ( + examples: Record + ): Record => { + return Object.fromEntries( + Object.entries(examples).map(([name, example]) => [ + name, + { + ...example, + payload: stripTopLevelKeysFromJsonExample(example.payload, isAllowed) + } + ]) + ); + }; + return { + userSpecifiedExamples: scrubExampleMap(v2Examples.userSpecifiedExamples), + autogeneratedExamples: scrubExampleMap(v2Examples.autogeneratedExamples) + }; +} diff --git a/packages/commons/ir-utils/src/filtered-ir/filterIntermediateRepresentationForAudiences.ts b/packages/commons/ir-utils/src/filtered-ir/filterIntermediateRepresentationForAudiences.ts index ebbf373a6f05..b5e761309063 100644 --- a/packages/commons/ir-utils/src/filtered-ir/filterIntermediateRepresentationForAudiences.ts +++ b/packages/commons/ir-utils/src/filtered-ir/filterIntermediateRepresentationForAudiences.ts @@ -1,5 +1,6 @@ import { ExampleType, + HttpEndpoint, IntermediateRepresentation, ServiceId, ServiceTypeReferenceInfo, @@ -8,9 +9,18 @@ import { } from "@fern-api/ir-sdk"; import { mapValues, pickBy } from "lodash-es"; +import { IdGenerator } from "../utils/IdGenerator.js"; import { getWireValue } from "../utils/namesUtils.js"; import { FilteredIr } from "./FilteredIr.js"; -import { filterEndpointExample, filterExampleType, filterWebhookExamplePayload } from "./filterExamples.js"; +import { + filterEndpointExample, + filterExampleType, + filterWebhookExamplePayload, + getNamedTypeIdFromTypeReference, + scrubV2HttpEndpointExamples, + scrubV2SchemaExamples, + scrubV2WebhookExamples +} from "./filterExamples.js"; export function filterIntermediateRepresentationForAudiences( intermediateRepresentation: Omit, @@ -23,13 +33,18 @@ export function filterIntermediateRepresentationForAudiences( const filteredTypes = pickBy(intermediateRepresentation.types, (type) => filteredIr.hasType(type)); const filteredTypesAndProperties = Object.fromEntries( Object.entries(filteredTypes).map(([typeId, typeDeclaration]) => { + // `ir.types` keys differ across importers (Fern uses generated ids, V3 OpenAPI uses + // namespaced schema ids), but `IrGraph` always keys by `IdGenerator.generateTypeId`. + const propertyLookupTypeId = IdGenerator.generateTypeId(typeDeclaration.name); + const isPropertyAllowed = (wireName: string) => filteredIr.hasProperty(propertyLookupTypeId, wireName); const filteredProperties = []; typeDeclaration.userProvidedExamples = typeDeclaration.userProvidedExamples .map((example) => filterExampleType({ filteredIr, exampleType: example })) .filter((ex) => ex !== undefined) as ExampleType[]; + typeDeclaration.v2Examples = scrubV2SchemaExamples(typeDeclaration.v2Examples, isPropertyAllowed); if (typeDeclaration.shape.type === "object") { for (const property of typeDeclaration.shape.properties) { - const hasProperty = filteredIr.hasProperty(typeId, getWireValue(property.name)); + const hasProperty = isPropertyAllowed(getWireValue(property.name)); if (hasProperty) { filteredProperties.push(property); } @@ -56,13 +71,22 @@ export function filterIntermediateRepresentationForAudiences( .filter((webhook) => filteredIr.hasWebhook(webhook)) .map((webhook) => { const webhookId = webhook.id; + // Inline payloads → webhook-scoped exclusions; reference payloads → referenced + // type's exclusions; unknown shapes → allow all keys. + let payloadKeyIsAllowed: (key: string) => boolean = () => true; if (webhook.payload.type === "inlinedPayload" && webhookId != null) { + payloadKeyIsAllowed = (key) => filteredIr.hasWebhookPayloadProperty(webhookId, key); webhook.payload = { ...webhook.payload, properties: webhook.payload.properties.filter((property) => { - return filteredIr.hasWebhookPayloadProperty(webhookId, getWireValue(property.name)); + return payloadKeyIsAllowed(getWireValue(property.name)); }) }; + } else if (webhook.payload.type === "reference") { + const referencedTypeId = getNamedTypeIdFromTypeReference(webhook.payload.payloadType); + if (referencedTypeId != null) { + payloadKeyIsAllowed = (key) => filteredIr.hasProperty(referencedTypeId, key); + } } if (webhook.examples != null && webhookId != null) { webhook.examples = webhook.examples.map((example) => ({ @@ -74,6 +98,7 @@ export function filterIntermediateRepresentationForAudiences( }) })); } + webhook.v2Examples = scrubV2WebhookExamples(webhook.v2Examples, payloadKeyIsAllowed); return webhook; }); return [webhookGroupId, filteredWebhooks]; @@ -135,52 +160,7 @@ export function filterIntermediateRepresentationForAudiences( ...httpService, endpoints: httpService.endpoints .filter((httpEndpoint) => filteredIr.hasEndpoint(httpEndpoint)) - .map((httpEndpoint) => { - const endpointId = httpEndpoint.id; - httpEndpoint.autogeneratedExamples = httpEndpoint.autogeneratedExamples.map((autogenerated) => { - return { - ...autogenerated, - example: filterEndpointExample({ - filteredIr, - example: autogenerated.example, - endpointId - }) - }; - }); - httpEndpoint.userSpecifiedExamples = httpEndpoint.userSpecifiedExamples.map((userSpecified) => { - return { - ...userSpecified, - example: - userSpecified.example != null - ? filterEndpointExample({ - filteredIr, - example: userSpecified.example, - endpointId - }) - : undefined - }; - }); - if (httpEndpoint.queryParameters.length > 0) { - httpEndpoint.queryParameters = httpEndpoint.queryParameters.filter((queryParameter) => { - return filteredIr.hasQueryParameter(httpEndpoint.id, getWireValue(queryParameter.name)); - }); - } - if (httpEndpoint.requestBody?.type === "inlinedRequestBody") { - return { - ...httpEndpoint, - requestBody: { - ...httpEndpoint.requestBody, - properties: httpEndpoint.requestBody.properties.filter((property) => { - return filteredIr.hasRequestProperty( - httpEndpoint.id, - getWireValue(property.name) - ); - }) - } - }; - } - return httpEndpoint; - }) + .map((httpEndpoint) => filterHttpEndpoint(httpEndpoint, filteredIr)) }) ), websocketChannels: filteredChannels, @@ -192,6 +172,158 @@ export function filterIntermediateRepresentationForAudiences( }; } +/** + * Predicate for top-level JSON keys on the endpoint's request body example. Inline bodies use + * endpoint-scoped exclusions; reference bodies use the referenced type's exclusions; anything + * else (file uploads, bytes, no body) allows all keys. + */ +function getRequestBodyKeyPredicate(httpEndpoint: HttpEndpoint, filteredIr: FilteredIr): (key: string) => boolean { + const body = httpEndpoint.requestBody; + if (body == null) { + return () => true; + } + if (body.type === "inlinedRequestBody") { + return (key) => filteredIr.hasRequestProperty(httpEndpoint.id, key); + } + if (body.type === "reference") { + const referencedTypeId = getNamedTypeIdFromTypeReference(body.requestBodyType); + if (referencedTypeId != null) { + return (key) => filteredIr.hasProperty(referencedTypeId, key); + } + } + return () => true; +} + +/** + * Predicate for top-level JSON keys on the endpoint's response body example. Only typed JSON + * responses with a (container-wrapped) named body type scrub anything; everything else allows all. + */ +function getResponseBodyKeyPredicate(httpEndpoint: HttpEndpoint, filteredIr: FilteredIr): (key: string) => boolean { + const body = httpEndpoint.response?.body; + if (body?.type !== "json") { + return () => true; + } + const inner = body.value; + const responseBodyType = + inner.type === "response" || inner.type === "nestedPropertyAsResponse" ? inner.responseBodyType : undefined; + if (responseBodyType == null) { + return () => true; + } + const referencedTypeId = getNamedTypeIdFromTypeReference(responseBodyType); + if (referencedTypeId == null) { + return () => true; + } + return (key) => filteredIr.hasProperty(referencedTypeId, key); +} + +/** + * Applies every per-endpoint scrubbing step: V1 examples, query parameters, inline request body + * properties (both `requestBody` and the V3 parallel `v2RequestBodies`), and every `v2Examples` + * block attached to typed request/response bodies, the endpoint, and `v2Responses`. + */ +function filterHttpEndpoint(httpEndpoint: HttpEndpoint, filteredIr: FilteredIr): HttpEndpoint { + const endpointId = httpEndpoint.id; + const requestBodyKeyIsAllowed = getRequestBodyKeyPredicate(httpEndpoint, filteredIr); + const responseBodyKeyIsAllowed = getResponseBodyKeyPredicate(httpEndpoint, filteredIr); + const queryParameterKeyIsAllowed = (key: string) => filteredIr.hasQueryParameter(endpointId, key); + + httpEndpoint.autogeneratedExamples = httpEndpoint.autogeneratedExamples.map((autogenerated) => ({ + ...autogenerated, + example: filterEndpointExample({ filteredIr, example: autogenerated.example, endpointId }) + })); + httpEndpoint.userSpecifiedExamples = httpEndpoint.userSpecifiedExamples.map((userSpecified) => ({ + ...userSpecified, + example: + userSpecified.example != null + ? filterEndpointExample({ filteredIr, example: userSpecified.example, endpointId }) + : undefined + })); + if (httpEndpoint.queryParameters.length > 0) { + httpEndpoint.queryParameters = httpEndpoint.queryParameters.filter((queryParameter) => + queryParameterKeyIsAllowed(getWireValue(queryParameter.name)) + ); + } + httpEndpoint.v2Examples = scrubV2HttpEndpointExamples({ + v2Examples: httpEndpoint.v2Examples, + requestBodyIsAllowed: requestBodyKeyIsAllowed, + responseBodyIsAllowed: responseBodyKeyIsAllowed, + queryParameterIsAllowed: queryParameterKeyIsAllowed + }); + if (httpEndpoint.response?.body?.type === "json") { + const inner = httpEndpoint.response.body.value; + if (inner.type === "response" || inner.type === "nestedPropertyAsResponse") { + inner.v2Examples = scrubV2SchemaExamples(inner.v2Examples, responseBodyKeyIsAllowed); + } + } + if (httpEndpoint.v2Responses?.responses != null) { + httpEndpoint.v2Responses = { + ...httpEndpoint.v2Responses, + responses: httpEndpoint.v2Responses.responses.map((resp) => { + if (resp.body?.type !== "json") { + return resp; + } + const inner = resp.body.value; + if (inner.type === "response" || inner.type === "nestedPropertyAsResponse") { + return { + ...resp, + body: { + ...resp.body, + value: { + ...inner, + v2Examples: scrubV2SchemaExamples(inner.v2Examples, responseBodyKeyIsAllowed) + } + } + }; + } + return resp; + }) + }; + } + if (httpEndpoint.v2RequestBodies?.requestBodies != null) { + // V3 OpenAPI parallel collection for multi-content-type endpoints; mirror primary scrubbing. + httpEndpoint.v2RequestBodies = { + ...httpEndpoint.v2RequestBodies, + requestBodies: httpEndpoint.v2RequestBodies.requestBodies.map((body) => { + if (body.type === "inlinedRequestBody") { + return { + ...body, + properties: body.properties.filter((property) => + requestBodyKeyIsAllowed(getWireValue(property.name)) + ), + v2Examples: scrubV2SchemaExamples(body.v2Examples, requestBodyKeyIsAllowed) + }; + } + if (body.type === "reference") { + return { ...body, v2Examples: scrubV2SchemaExamples(body.v2Examples, requestBodyKeyIsAllowed) }; + } + return body; + }) + }; + } + if (httpEndpoint.requestBody?.type === "inlinedRequestBody") { + return { + ...httpEndpoint, + requestBody: { + ...httpEndpoint.requestBody, + properties: httpEndpoint.requestBody.properties.filter((property) => + requestBodyKeyIsAllowed(getWireValue(property.name)) + ), + v2Examples: scrubV2SchemaExamples(httpEndpoint.requestBody.v2Examples, requestBodyKeyIsAllowed) + } + }; + } + if (httpEndpoint.requestBody?.type === "reference") { + return { + ...httpEndpoint, + requestBody: { + ...httpEndpoint.requestBody, + v2Examples: scrubV2SchemaExamples(httpEndpoint.requestBody.v2Examples, requestBodyKeyIsAllowed) + } + }; + } + return httpEndpoint; +} + function filterServiceTypeReferenceInfoForAudiences( serviceTypeReferenceInfo: ServiceTypeReferenceInfo, filteredIr: FilteredIr | undefined diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 872093928461..69e500ddde59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4217,9 +4217,18 @@ importers: '@fern-api/configs': specifier: workspace:* version: link:../../../configs + '@fern-api/configuration': + specifier: workspace:* + version: link:../../configuration '@fern-api/ir-generator': specifier: workspace:* version: link:../../generation/ir-generator + '@fern-api/ir-sdk': + specifier: workspace:* + version: link:../../../ir-sdk + '@fern-api/ir-utils': + specifier: workspace:* + version: link:../../../commons/ir-utils '@types/node': specifier: 'catalog:' version: 22.19.17 diff --git a/seed/java-sdk/java-inline-types/enable-forward-compatible-enums/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java b/seed/java-sdk/java-inline-types/enable-forward-compatible-enums/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java index 4c8948db67a4..fdf0c521cbe7 100644 --- a/seed/java-sdk/java-inline-types/enable-forward-compatible-enums/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java +++ b/seed/java-sdk/java-inline-types/enable-forward-compatible-enums/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java @@ -295,6 +295,12 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx } catch (RuntimeException e) { } } + if (value instanceof Map && ((Map) value).containsKey("foo")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); + } catch (RuntimeException e) { + } + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, DiscriminatedUnion1.class)); } catch (RuntimeException e) { @@ -322,12 +328,6 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx value, new TypeReference>() {})); } catch (RuntimeException e) { } - if (value instanceof Map && ((Map) value).containsKey("foo")) { - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); - } catch (RuntimeException e) { - } - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/java-sdk/java-inline-types/inline/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java b/seed/java-sdk/java-inline-types/inline/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java index 165f17662703..e0cec2c0dde9 100644 --- a/seed/java-sdk/java-inline-types/inline/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java +++ b/seed/java-sdk/java-inline-types/inline/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java @@ -296,6 +296,12 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx } catch (RuntimeException e) { } } + if (value instanceof Map && ((Map) value).containsKey("foo")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); + } catch (RuntimeException e) { + } + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, DiscriminatedUnion1.class)); } catch (RuntimeException e) { @@ -323,12 +329,6 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx value, new TypeReference>() {})); } catch (RuntimeException e) { } - if (value instanceof Map && ((Map) value).containsKey("foo")) { - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); - } catch (RuntimeException e) { - } - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/java-sdk/java-inline-types/no-inline/src/main/java/com/seed/object/types/UndiscriminatedUnion1.java b/seed/java-sdk/java-inline-types/no-inline/src/main/java/com/seed/object/types/UndiscriminatedUnion1.java index eacda4d6307a..93b72652efb2 100644 --- a/seed/java-sdk/java-inline-types/no-inline/src/main/java/com/seed/object/types/UndiscriminatedUnion1.java +++ b/seed/java-sdk/java-inline-types/no-inline/src/main/java/com/seed/object/types/UndiscriminatedUnion1.java @@ -158,6 +158,12 @@ public UndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext co } catch (RuntimeException e) { } } + if (value instanceof Map && ((Map) value).containsKey("foo")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); + } catch (RuntimeException e) { + } + } try { return of( ObjectMappers.JSON_MAPPER.convertValue(value, UndiscriminatedUnion1DiscriminatedUnion1.class)); @@ -186,12 +192,6 @@ public UndiscriminatedUnion1 deserialize(JsonParser p, DeserializationContext co value, new TypeReference>() {})); } catch (RuntimeException e) { } - if (value instanceof Map && ((Map) value).containsKey("foo")) { - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); - } catch (RuntimeException e) { - } - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/java-sdk/java-inline-types/no-wrapped-aliases/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java b/seed/java-sdk/java-inline-types/no-wrapped-aliases/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java index 4c8948db67a4..fdf0c521cbe7 100644 --- a/seed/java-sdk/java-inline-types/no-wrapped-aliases/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java +++ b/seed/java-sdk/java-inline-types/no-wrapped-aliases/src/main/java/com/seed/object/requests/GetUndiscriminatedUnionRequest.java @@ -295,6 +295,12 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx } catch (RuntimeException e) { } } + if (value instanceof Map && ((Map) value).containsKey("foo")) { + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); + } catch (RuntimeException e) { + } + } try { return of(ObjectMappers.JSON_MAPPER.convertValue(value, DiscriminatedUnion1.class)); } catch (RuntimeException e) { @@ -322,12 +328,6 @@ public Bar deserialize(JsonParser p, DeserializationContext context) throws IOEx value, new TypeReference>() {})); } catch (RuntimeException e) { } - if (value instanceof Map && ((Map) value).containsKey("foo")) { - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, ReferenceType.class)); - } catch (RuntimeException e) { - } - } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/MetadataUnion.java b/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/MetadataUnion.java index 947c09be8008..d5f0f755ef39 100644 --- a/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/MetadataUnion.java +++ b/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/MetadataUnion.java @@ -84,11 +84,6 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public MetadataUnion deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue( - value, new TypeReference>>() {})); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("name") && ((Map) value).containsKey("value")) { @@ -97,6 +92,11 @@ public MetadataUnion deserialize(JsonParser p, DeserializationContext context) t } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue( + value, new TypeReference>>() {})); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/OuterNestedUnion.java b/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/OuterNestedUnion.java index fcfda11352f0..226023f2b67c 100644 --- a/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/OuterNestedUnion.java +++ b/seed/java-sdk/undiscriminated-unions/src/main/java/com/seed/undiscriminatedUnions/resources/union/types/OuterNestedUnion.java @@ -82,10 +82,6 @@ static final class Deserializer extends StdDeserializer { @java.lang.Override public OuterNestedUnion deserialize(JsonParser p, DeserializationContext context) throws IOException { Object value = p.readValueAs(Object.class); - try { - return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); - } catch (RuntimeException e) { - } if (value instanceof Map && ((Map) value).containsKey("inner") && ((Map) value).containsKey("label")) { @@ -94,6 +90,10 @@ public OuterNestedUnion deserialize(JsonParser p, DeserializationContext context } catch (RuntimeException e) { } } + try { + return of(ObjectMappers.JSON_MAPPER.convertValue(value, String.class)); + } catch (RuntimeException e) { + } throw new JsonParseException(p, "Failed to deserialize"); } } diff --git a/seed/rust-sdk/accept-header/src/core/pagination.rs b/seed/rust-sdk/accept-header/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/accept-header/src/core/pagination.rs +++ b/seed/rust-sdk/accept-header/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/alias-extends/src/core/pagination.rs b/seed/rust-sdk/alias-extends/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/alias-extends/src/core/pagination.rs +++ b/seed/rust-sdk/alias-extends/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/alias/src/core/pagination.rs b/seed/rust-sdk/alias/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/alias/src/core/pagination.rs +++ b/seed/rust-sdk/alias/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/allof-inline/src/core/pagination.rs b/seed/rust-sdk/allof-inline/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/allof-inline/src/core/pagination.rs +++ b/seed/rust-sdk/allof-inline/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/allof/src/core/pagination.rs b/seed/rust-sdk/allof/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/allof/src/core/pagination.rs +++ b/seed/rust-sdk/allof/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/any-auth/src/core/pagination.rs b/seed/rust-sdk/any-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/any-auth/src/core/pagination.rs +++ b/seed/rust-sdk/any-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/api-wide-base-path/src/core/pagination.rs b/seed/rust-sdk/api-wide-base-path/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/api-wide-base-path/src/core/pagination.rs +++ b/seed/rust-sdk/api-wide-base-path/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/audiences/src/core/pagination.rs b/seed/rust-sdk/audiences/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/audiences/src/core/pagination.rs +++ b/seed/rust-sdk/audiences/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/basic-auth-environment-variables/src/core/pagination.rs b/seed/rust-sdk/basic-auth-environment-variables/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/basic-auth-environment-variables/src/core/pagination.rs +++ b/seed/rust-sdk/basic-auth-environment-variables/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/basic-auth-pw-omitted/src/core/pagination.rs b/seed/rust-sdk/basic-auth-pw-omitted/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/basic-auth-pw-omitted/src/core/pagination.rs +++ b/seed/rust-sdk/basic-auth-pw-omitted/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/basic-auth/src/core/pagination.rs b/seed/rust-sdk/basic-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/basic-auth/src/core/pagination.rs +++ b/seed/rust-sdk/basic-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/bearer-token-environment-variable/src/core/pagination.rs b/seed/rust-sdk/bearer-token-environment-variable/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/bearer-token-environment-variable/src/core/pagination.rs +++ b/seed/rust-sdk/bearer-token-environment-variable/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/bytes-download/src/core/pagination.rs b/seed/rust-sdk/bytes-download/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/bytes-download/src/core/pagination.rs +++ b/seed/rust-sdk/bytes-download/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/bytes-upload/src/core/pagination.rs b/seed/rust-sdk/bytes-upload/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/bytes-upload/src/core/pagination.rs +++ b/seed/rust-sdk/bytes-upload/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/circular-references-advanced/src/core/pagination.rs b/seed/rust-sdk/circular-references-advanced/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/circular-references-advanced/src/core/pagination.rs +++ b/seed/rust-sdk/circular-references-advanced/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/circular-references-extends/src/core/pagination.rs b/seed/rust-sdk/circular-references-extends/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/circular-references-extends/src/core/pagination.rs +++ b/seed/rust-sdk/circular-references-extends/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/circular-references/src/core/pagination.rs b/seed/rust-sdk/circular-references/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/circular-references/src/core/pagination.rs +++ b/seed/rust-sdk/circular-references/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/client-side-params/src/core/pagination.rs b/seed/rust-sdk/client-side-params/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/client-side-params/src/core/pagination.rs +++ b/seed/rust-sdk/client-side-params/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/content-type/src/core/pagination.rs b/seed/rust-sdk/content-type/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/content-type/src/core/pagination.rs +++ b/seed/rust-sdk/content-type/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/cross-package-type-names/src/core/pagination.rs b/seed/rust-sdk/cross-package-type-names/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/cross-package-type-names/src/core/pagination.rs +++ b/seed/rust-sdk/cross-package-type-names/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/dollar-string-examples/src/core/pagination.rs b/seed/rust-sdk/dollar-string-examples/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/dollar-string-examples/src/core/pagination.rs +++ b/seed/rust-sdk/dollar-string-examples/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/empty-clients/src/core/pagination.rs b/seed/rust-sdk/empty-clients/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/empty-clients/src/core/pagination.rs +++ b/seed/rust-sdk/empty-clients/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/endpoint-security-auth/src/core/pagination.rs b/seed/rust-sdk/endpoint-security-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/endpoint-security-auth/src/core/pagination.rs +++ b/seed/rust-sdk/endpoint-security-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/enum/src/core/pagination.rs b/seed/rust-sdk/enum/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/enum/src/core/pagination.rs +++ b/seed/rust-sdk/enum/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/error-property/src/core/pagination.rs b/seed/rust-sdk/error-property/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/error-property/src/core/pagination.rs +++ b/seed/rust-sdk/error-property/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/errors/src/core/pagination.rs b/seed/rust-sdk/errors/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/errors/src/core/pagination.rs +++ b/seed/rust-sdk/errors/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/examples/no-custom-config/src/core/pagination.rs b/seed/rust-sdk/examples/no-custom-config/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/examples/no-custom-config/src/core/pagination.rs +++ b/seed/rust-sdk/examples/no-custom-config/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/examples/readme-config/src/core/pagination.rs b/seed/rust-sdk/examples/readme-config/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/examples/readme-config/src/core/pagination.rs +++ b/seed/rust-sdk/examples/readme-config/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/examples/readme-config/tests/file_notification_service_test.rs b/seed/rust-sdk/examples/readme-config/tests/file_notification_service_test.rs index 9c853be7da9d..dcdf96d4be77 100644 --- a/seed/rust-sdk/examples/readme-config/tests/file_notification_service_test.rs +++ b/seed/rust-sdk/examples/readme-config/tests/file_notification_service_test.rs @@ -13,7 +13,6 @@ async fn test_file_notification_service_get_exception_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/examples/readme-config/tests/file_service_test.rs b/seed/rust-sdk/examples/readme-config/tests/file_service_test.rs index 80d795e9433a..2a627ef77258 100644 --- a/seed/rust-sdk/examples/readme-config/tests/file_service_test.rs +++ b/seed/rust-sdk/examples/readme-config/tests/file_service_test.rs @@ -13,7 +13,6 @@ async fn test_file_service_get_file_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/examples/readme-config/tests/health_service_test.rs b/seed/rust-sdk/examples/readme-config/tests/health_service_test.rs index f8b33f815422..dc0c7d3dd73e 100644 --- a/seed/rust-sdk/examples/readme-config/tests/health_service_test.rs +++ b/seed/rust-sdk/examples/readme-config/tests/health_service_test.rs @@ -13,7 +13,6 @@ async fn test_health_service_check_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -40,7 +39,6 @@ async fn test_health_service_ping_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client.health.service.ping(None).await; diff --git a/seed/rust-sdk/examples/readme-config/tests/root_test.rs b/seed/rust-sdk/examples/readme-config/tests/root_test.rs index 986ef57132ba..e1a614c5152a 100644 --- a/seed/rust-sdk/examples/readme-config/tests/root_test.rs +++ b/seed/rust-sdk/examples/readme-config/tests/root_test.rs @@ -13,7 +13,6 @@ async fn test_root_echo_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -38,7 +37,6 @@ async fn test_root_create_type_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client.echo(&"primitive".to_string(), None).await; diff --git a/seed/rust-sdk/examples/readme-config/tests/service_test.rs b/seed/rust-sdk/examples/readme-config/tests/service_test.rs index 7e70ebc5e54a..5038b179394c 100644 --- a/seed/rust-sdk/examples/readme-config/tests/service_test.rs +++ b/seed/rust-sdk/examples/readme-config/tests/service_test.rs @@ -13,7 +13,6 @@ async fn test_service_get_movie_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -39,7 +38,6 @@ async fn test_service_create_movie_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -89,7 +87,6 @@ async fn test_service_get_metadata_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -129,7 +126,6 @@ async fn test_service_create_big_entity_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client @@ -388,7 +384,6 @@ async fn test_service_refresh_token_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExamplesClient::new(config).expect("Failed to build client"); let result = client.service.refresh_token(&None, None).await; diff --git a/seed/rust-sdk/exhaustive/src/core/pagination.rs b/seed/rust-sdk/exhaustive/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/exhaustive/src/core/pagination.rs +++ b/seed/rust-sdk/exhaustive/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_container_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_container_test.rs index 2ea606203083..5e50a9bcde5d 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_container_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_container_test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_container_get_and_return_list_of_primitives_with_wiremoc ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -40,7 +39,6 @@ async fn test_endpoints_container_get_and_return_list_of_objects_with_wiremock() ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -79,7 +77,6 @@ async fn test_endpoints_container_get_and_return_set_of_primitives_with_wiremock ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -106,7 +103,6 @@ async fn test_endpoints_container_get_and_return_set_of_objects_with_wiremock() ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -139,7 +135,6 @@ async fn test_endpoints_container_get_and_return_map_prim_to_prim_with_wiremock( ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -169,7 +164,6 @@ async fn test_endpoints_container_get_and_return_map_of_prim_to_object_with_wire ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -206,7 +200,6 @@ async fn test_endpoints_container_get_and_return_map_of_prim_to_undiscriminated_ ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -236,7 +229,6 @@ async fn test_endpoints_container_get_and_return_optional_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_content_type_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_content_type_test.rs index ffa0e11918fc..5442710ad704 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_content_type_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_content_type_test.rs @@ -15,7 +15,6 @@ async fn test_endpoints_content_type_post_json_patch_content_type_with_wiremock( ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -64,7 +63,6 @@ async fn test_endpoints_content_type_post_json_patch_content_with_charset_type_w ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_enum__test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_enum__test.rs index 7d3dd89bc12a..be93fe6d25d4 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_enum__test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_enum__test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_enum_get_and_return_enum_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_http_methods_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_http_methods_test.rs index 46d0e4c69efa..3d4d9d3dea14 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_http_methods_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_http_methods_test.rs @@ -15,7 +15,6 @@ async fn test_endpoints_http_methods_test_get_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -42,7 +41,6 @@ async fn test_endpoints_http_methods_test_post_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -75,7 +73,6 @@ async fn test_endpoints_http_methods_test_put_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -109,7 +106,6 @@ async fn test_endpoints_http_methods_test_patch_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -159,7 +155,6 @@ async fn test_endpoints_http_methods_test_delete_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs index 618a167eee07..0076fa60c5e5 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs @@ -15,7 +15,6 @@ async fn test_endpoints_object_get_and_return_with_optional_field_with_wiremock( ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -69,7 +68,6 @@ async fn test_endpoints_object_get_and_return_with_required_field_with_wiremock( ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -107,7 +105,6 @@ async fn test_endpoints_object_get_and_return_with_map_of_map_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -148,7 +145,6 @@ async fn test_endpoints_object_get_and_return_nested_with_optional_field_with_wi ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -206,7 +202,6 @@ async fn test_endpoints_object_get_and_return_nested_with_required_field_with_wi ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -265,7 +260,6 @@ async fn test_endpoints_object_get_and_return_nested_with_required_field_as_list ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -357,7 +351,6 @@ async fn test_endpoints_object_get_and_return_with_unknown_field_with_wiremock() ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -395,7 +388,6 @@ async fn test_endpoints_object_get_and_return_with_documented_unknown_type_with_ ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -433,7 +425,6 @@ async fn test_endpoints_object_get_and_return_map_of_documented_unknown_type_wit ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -472,7 +463,6 @@ async fn test_endpoints_object_get_and_return_with_mixed_required_and_optional_f ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -513,7 +503,6 @@ async fn test_endpoints_object_get_and_return_with_required_nested_object_with_w ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -558,7 +547,6 @@ async fn test_endpoints_object_get_and_return_with_datetime_like_string_with_wir ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_pagination_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_pagination_test.rs index 8ca725203726..51883c2823ae 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_pagination_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_pagination_test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_pagination_list_items_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_params_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_params_test.rs index a3120acdfc4a..8b6ee32ed785 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_params_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_params_test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_params_get_with_path_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -40,7 +39,6 @@ async fn test_endpoints_params_get_with_inline_path_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -67,7 +65,6 @@ async fn test_endpoints_params_get_with_query_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -108,7 +105,6 @@ async fn test_endpoints_params_get_with_allow_multiple_query_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -149,7 +145,6 @@ async fn test_endpoints_params_get_with_path_and_query_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -187,7 +182,6 @@ async fn test_endpoints_params_get_with_inline_path_and_query_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -225,7 +219,6 @@ async fn test_endpoints_params_modify_with_path_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -252,7 +245,6 @@ async fn test_endpoints_params_modify_with_inline_path_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -279,7 +271,6 @@ async fn test_endpoints_params_get_with_boolean_path_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -306,7 +297,6 @@ async fn test_endpoints_params_get_with_path_and_errors_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_primitive_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_primitive_test.rs index c13e11810c7f..48943d3ec715 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_primitive_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_primitive_test.rs @@ -14,7 +14,6 @@ async fn test_endpoints_primitive_get_and_return_string_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -41,7 +40,6 @@ async fn test_endpoints_primitive_get_and_return_int_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -68,7 +66,6 @@ async fn test_endpoints_primitive_get_and_return_long_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -95,7 +92,6 @@ async fn test_endpoints_primitive_get_and_return_double_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -122,7 +118,6 @@ async fn test_endpoints_primitive_get_and_return_bool_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -149,7 +144,6 @@ async fn test_endpoints_primitive_get_and_return_datetime_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -179,7 +173,6 @@ async fn test_endpoints_primitive_get_and_return_date_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -209,7 +202,6 @@ async fn test_endpoints_primitive_get_and_return_uuid_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client @@ -239,7 +231,6 @@ async fn test_endpoints_primitive_get_and_return_base64_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_put_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_put_test.rs index 13b156c72d36..c46f085bdacc 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_put_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_put_test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_put_add_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.endpoints.put.add(&"id".to_string(), None).await; diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_union__test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_union__test.rs index 701a653d1a5f..8eb6ede10adf 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_union__test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_union__test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_union_get_and_return_union_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_urls_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_urls_test.rs index d041550ea44f..91cb66cc655e 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_urls_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_urls_test.rs @@ -13,7 +13,6 @@ async fn test_endpoints_urls_with_mixed_case_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.endpoints.urls.with_mixed_case(None).await; @@ -36,7 +35,6 @@ async fn test_endpoints_urls_no_ending_slash_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.endpoints.urls.no_ending_slash(None).await; @@ -59,7 +57,6 @@ async fn test_endpoints_urls_with_ending_slash_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.endpoints.urls.with_ending_slash(None).await; @@ -82,7 +79,6 @@ async fn test_endpoints_urls_with_underscores_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.endpoints.urls.with_underscores(None).await; diff --git a/seed/rust-sdk/exhaustive/tests/inlined_requests_test.rs b/seed/rust-sdk/exhaustive/tests/inlined_requests_test.rs index 053fc0c0a782..137908df231c 100644 --- a/seed/rust-sdk/exhaustive/tests/inlined_requests_test.rs +++ b/seed/rust-sdk/exhaustive/tests/inlined_requests_test.rs @@ -15,7 +15,6 @@ async fn test_inlined_requests_post_with_object_bodyand_response_with_wiremock() ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/no_auth_test.rs b/seed/rust-sdk/exhaustive/tests/no_auth_test.rs index 89b5685dabc8..2bb9cefc2b31 100644 --- a/seed/rust-sdk/exhaustive/tests/no_auth_test.rs +++ b/seed/rust-sdk/exhaustive/tests/no_auth_test.rs @@ -13,7 +13,6 @@ async fn test_no_auth_post_with_no_auth_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/exhaustive/tests/no_req_body_test.rs b/seed/rust-sdk/exhaustive/tests/no_req_body_test.rs index a5e281a88e99..70dd366258e9 100644 --- a/seed/rust-sdk/exhaustive/tests/no_req_body_test.rs +++ b/seed/rust-sdk/exhaustive/tests/no_req_body_test.rs @@ -13,7 +13,6 @@ async fn test_no_req_body_get_with_no_request_body_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.no_req_body.get_with_no_request_body(None).await; @@ -36,7 +35,6 @@ async fn test_no_req_body_post_with_no_request_body_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client.no_req_body.post_with_no_request_body(None).await; diff --git a/seed/rust-sdk/exhaustive/tests/req_with_headers_test.rs b/seed/rust-sdk/exhaustive/tests/req_with_headers_test.rs index bbf88c9013f2..7c2687f63462 100644 --- a/seed/rust-sdk/exhaustive/tests/req_with_headers_test.rs +++ b/seed/rust-sdk/exhaustive/tests/req_with_headers_test.rs @@ -13,7 +13,6 @@ async fn test_req_with_headers_get_with_custom_header_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ExhaustiveClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/extends/src/core/pagination.rs b/seed/rust-sdk/extends/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/extends/src/core/pagination.rs +++ b/seed/rust-sdk/extends/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/extra-properties/src/core/pagination.rs b/seed/rust-sdk/extra-properties/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/extra-properties/src/core/pagination.rs +++ b/seed/rust-sdk/extra-properties/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/file-download/src/core/pagination.rs b/seed/rust-sdk/file-download/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/file-download/src/core/pagination.rs +++ b/seed/rust-sdk/file-download/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/file-upload-openapi/src/core/pagination.rs b/seed/rust-sdk/file-upload-openapi/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/file-upload-openapi/src/core/pagination.rs +++ b/seed/rust-sdk/file-upload-openapi/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/file-upload/src/core/pagination.rs b/seed/rust-sdk/file-upload/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/file-upload/src/core/pagination.rs +++ b/seed/rust-sdk/file-upload/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/folders/src/core/pagination.rs b/seed/rust-sdk/folders/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/folders/src/core/pagination.rs +++ b/seed/rust-sdk/folders/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/header-auth-environment-variable/src/core/pagination.rs b/seed/rust-sdk/header-auth-environment-variable/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/header-auth-environment-variable/src/core/pagination.rs +++ b/seed/rust-sdk/header-auth-environment-variable/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/header-auth/src/core/pagination.rs b/seed/rust-sdk/header-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/header-auth/src/core/pagination.rs +++ b/seed/rust-sdk/header-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/http-head/src/core/pagination.rs b/seed/rust-sdk/http-head/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/http-head/src/core/pagination.rs +++ b/seed/rust-sdk/http-head/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/idempotency-headers/src/core/pagination.rs b/seed/rust-sdk/idempotency-headers/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/idempotency-headers/src/core/pagination.rs +++ b/seed/rust-sdk/idempotency-headers/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/imdb/imdb-custom-config/src/core/pagination.rs b/seed/rust-sdk/imdb/imdb-custom-config/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/imdb/imdb-custom-config/src/core/pagination.rs +++ b/seed/rust-sdk/imdb/imdb-custom-config/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/imdb/imdb-custom-config/tests/imdb_test.rs b/seed/rust-sdk/imdb/imdb-custom-config/tests/imdb_test.rs index 0b1ca8550d8b..3e0c2950d825 100644 --- a/seed/rust-sdk/imdb/imdb-custom-config/tests/imdb_test.rs +++ b/seed/rust-sdk/imdb/imdb-custom-config/tests/imdb_test.rs @@ -13,7 +13,6 @@ async fn test_imdb_create_movie_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = CustomImdbClient::new(config).expect("Failed to build client"); let result = client @@ -46,7 +45,6 @@ async fn test_imdb_get_movie_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = CustomImdbClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/imdb/imdb-custom-features/src/core/pagination.rs b/seed/rust-sdk/imdb/imdb-custom-features/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/imdb/imdb-custom-features/src/core/pagination.rs +++ b/seed/rust-sdk/imdb/imdb-custom-features/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/imdb/imdb/src/core/pagination.rs b/seed/rust-sdk/imdb/imdb/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/imdb/imdb/src/core/pagination.rs +++ b/seed/rust-sdk/imdb/imdb/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/inferred-auth-explicit/src/core/pagination.rs b/seed/rust-sdk/inferred-auth-explicit/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/inferred-auth-explicit/src/core/pagination.rs +++ b/seed/rust-sdk/inferred-auth-explicit/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/inferred-auth-implicit-api-key/src/core/pagination.rs b/seed/rust-sdk/inferred-auth-implicit-api-key/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/inferred-auth-implicit-api-key/src/core/pagination.rs +++ b/seed/rust-sdk/inferred-auth-implicit-api-key/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/inferred-auth-implicit-no-expiry/src/core/pagination.rs b/seed/rust-sdk/inferred-auth-implicit-no-expiry/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/inferred-auth-implicit-no-expiry/src/core/pagination.rs +++ b/seed/rust-sdk/inferred-auth-implicit-no-expiry/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/inferred-auth-implicit-reference/src/core/pagination.rs b/seed/rust-sdk/inferred-auth-implicit-reference/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/inferred-auth-implicit-reference/src/core/pagination.rs +++ b/seed/rust-sdk/inferred-auth-implicit-reference/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/inferred-auth-implicit/src/core/pagination.rs b/seed/rust-sdk/inferred-auth-implicit/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/inferred-auth-implicit/src/core/pagination.rs +++ b/seed/rust-sdk/inferred-auth-implicit/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/license/basic/src/core/pagination.rs b/seed/rust-sdk/license/basic/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/license/basic/src/core/pagination.rs +++ b/seed/rust-sdk/license/basic/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/license/both-license-options/src/core/pagination.rs b/seed/rust-sdk/license/both-license-options/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/license/both-license-options/src/core/pagination.rs +++ b/seed/rust-sdk/license/both-license-options/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/license/custom-license-file/src/core/pagination.rs b/seed/rust-sdk/license/custom-license-file/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/license/custom-license-file/src/core/pagination.rs +++ b/seed/rust-sdk/license/custom-license-file/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/license/empty-license-file/src/core/pagination.rs b/seed/rust-sdk/license/empty-license-file/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/license/empty-license-file/src/core/pagination.rs +++ b/seed/rust-sdk/license/empty-license-file/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/literal-user-agent/src/core/pagination.rs b/seed/rust-sdk/literal-user-agent/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/literal-user-agent/src/core/pagination.rs +++ b/seed/rust-sdk/literal-user-agent/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/literal/src/core/pagination.rs b/seed/rust-sdk/literal/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/literal/src/core/pagination.rs +++ b/seed/rust-sdk/literal/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/literals-unions/src/core/pagination.rs b/seed/rust-sdk/literals-unions/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/literals-unions/src/core/pagination.rs +++ b/seed/rust-sdk/literals-unions/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/mixed-case/src/core/pagination.rs b/seed/rust-sdk/mixed-case/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/mixed-case/src/core/pagination.rs +++ b/seed/rust-sdk/mixed-case/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/mixed-file-directory/src/core/pagination.rs b/seed/rust-sdk/mixed-file-directory/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/mixed-file-directory/src/core/pagination.rs +++ b/seed/rust-sdk/mixed-file-directory/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/multi-line-docs/src/core/pagination.rs b/seed/rust-sdk/multi-line-docs/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/multi-line-docs/src/core/pagination.rs +++ b/seed/rust-sdk/multi-line-docs/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/multi-url-environment-no-default/src/core/pagination.rs b/seed/rust-sdk/multi-url-environment-no-default/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/multi-url-environment-no-default/src/core/pagination.rs +++ b/seed/rust-sdk/multi-url-environment-no-default/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/multi-url-environment-reference/src/core/pagination.rs b/seed/rust-sdk/multi-url-environment-reference/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/multi-url-environment-reference/src/core/pagination.rs +++ b/seed/rust-sdk/multi-url-environment-reference/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/multi-url-environment/src/core/pagination.rs b/seed/rust-sdk/multi-url-environment/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/multi-url-environment/src/core/pagination.rs +++ b/seed/rust-sdk/multi-url-environment/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/multiple-request-bodies/src/core/pagination.rs b/seed/rust-sdk/multiple-request-bodies/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/multiple-request-bodies/src/core/pagination.rs +++ b/seed/rust-sdk/multiple-request-bodies/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/no-content-response/src/core/pagination.rs b/seed/rust-sdk/no-content-response/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/no-content-response/src/core/pagination.rs +++ b/seed/rust-sdk/no-content-response/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/no-environment/src/core/pagination.rs b/seed/rust-sdk/no-environment/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/no-environment/src/core/pagination.rs +++ b/seed/rust-sdk/no-environment/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/no-retries/src/core/pagination.rs b/seed/rust-sdk/no-retries/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/no-retries/src/core/pagination.rs +++ b/seed/rust-sdk/no-retries/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/null-type/src/core/pagination.rs b/seed/rust-sdk/null-type/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/null-type/src/core/pagination.rs +++ b/seed/rust-sdk/null-type/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/nullable-allof-extends/src/core/pagination.rs b/seed/rust-sdk/nullable-allof-extends/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/nullable-allof-extends/src/core/pagination.rs +++ b/seed/rust-sdk/nullable-allof-extends/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/nullable-optional/src/core/pagination.rs b/seed/rust-sdk/nullable-optional/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/nullable-optional/src/core/pagination.rs +++ b/seed/rust-sdk/nullable-optional/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/nullable-request-body/src/core/pagination.rs b/seed/rust-sdk/nullable-request-body/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/nullable-request-body/src/core/pagination.rs +++ b/seed/rust-sdk/nullable-request-body/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/nullable/src/core/pagination.rs b/seed/rust-sdk/nullable/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/nullable/src/core/pagination.rs +++ b/seed/rust-sdk/nullable/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-custom/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-custom/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-custom/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-custom/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-default/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-default/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-default/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-default/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-environment-variables/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-environment-variables/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-environment-variables/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-environment-variables/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-mandatory-auth/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-mandatory-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-mandatory-auth/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-mandatory-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-nested-root/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-nested-root/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-nested-root/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-nested-root/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-openapi/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-openapi/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-openapi/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-openapi/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-reference/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-reference/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-reference/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-reference/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials-with-variables/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials-with-variables/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials-with-variables/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials-with-variables/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/oauth-client-credentials/src/core/pagination.rs b/seed/rust-sdk/oauth-client-credentials/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/oauth-client-credentials/src/core/pagination.rs +++ b/seed/rust-sdk/oauth-client-credentials/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/object/src/core/pagination.rs b/seed/rust-sdk/object/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/object/src/core/pagination.rs +++ b/seed/rust-sdk/object/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/objects-with-imports/src/core/pagination.rs b/seed/rust-sdk/objects-with-imports/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/objects-with-imports/src/core/pagination.rs +++ b/seed/rust-sdk/objects-with-imports/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/openapi-request-body-ref/src/core/pagination.rs b/seed/rust-sdk/openapi-request-body-ref/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/openapi-request-body-ref/src/core/pagination.rs +++ b/seed/rust-sdk/openapi-request-body-ref/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/optional/src/core/pagination.rs b/seed/rust-sdk/optional/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/optional/src/core/pagination.rs +++ b/seed/rust-sdk/optional/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/package-yml/src/core/pagination.rs b/seed/rust-sdk/package-yml/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/package-yml/src/core/pagination.rs +++ b/seed/rust-sdk/package-yml/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/pagination-custom/src/core/pagination.rs b/seed/rust-sdk/pagination-custom/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/pagination-custom/src/core/pagination.rs +++ b/seed/rust-sdk/pagination-custom/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/pagination-uri-path/src/core/pagination.rs b/seed/rust-sdk/pagination-uri-path/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/pagination-uri-path/src/core/pagination.rs +++ b/seed/rust-sdk/pagination-uri-path/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/pagination/src/core/pagination.rs b/seed/rust-sdk/pagination/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/pagination/src/core/pagination.rs +++ b/seed/rust-sdk/pagination/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/path-parameters/src/core/pagination.rs b/seed/rust-sdk/path-parameters/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/path-parameters/src/core/pagination.rs +++ b/seed/rust-sdk/path-parameters/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/plain-text/src/core/pagination.rs b/seed/rust-sdk/plain-text/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/plain-text/src/core/pagination.rs +++ b/seed/rust-sdk/plain-text/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/property-access/src/core/pagination.rs b/seed/rust-sdk/property-access/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/property-access/src/core/pagination.rs +++ b/seed/rust-sdk/property-access/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/public-object/src/core/pagination.rs b/seed/rust-sdk/public-object/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/public-object/src/core/pagination.rs +++ b/seed/rust-sdk/public-object/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/query-param-name-conflict/src/core/pagination.rs b/seed/rust-sdk/query-param-name-conflict/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/query-param-name-conflict/src/core/pagination.rs +++ b/seed/rust-sdk/query-param-name-conflict/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/query-parameters-openapi-as-objects/src/core/pagination.rs b/seed/rust-sdk/query-parameters-openapi-as-objects/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/query-parameters-openapi-as-objects/src/core/pagination.rs +++ b/seed/rust-sdk/query-parameters-openapi-as-objects/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/query-parameters-openapi/src/core/pagination.rs b/seed/rust-sdk/query-parameters-openapi/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/query-parameters-openapi/src/core/pagination.rs +++ b/seed/rust-sdk/query-parameters-openapi/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/query-parameters/src/core/pagination.rs b/seed/rust-sdk/query-parameters/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/query-parameters/src/core/pagination.rs +++ b/seed/rust-sdk/query-parameters/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/request-parameters/src/core/pagination.rs b/seed/rust-sdk/request-parameters/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/request-parameters/src/core/pagination.rs +++ b/seed/rust-sdk/request-parameters/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/required-nullable/src/core/pagination.rs b/seed/rust-sdk/required-nullable/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/required-nullable/src/core/pagination.rs +++ b/seed/rust-sdk/required-nullable/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/reserved-keywords/src/core/pagination.rs b/seed/rust-sdk/reserved-keywords/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/reserved-keywords/src/core/pagination.rs +++ b/seed/rust-sdk/reserved-keywords/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/response-property/src/core/pagination.rs b/seed/rust-sdk/response-property/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/response-property/src/core/pagination.rs +++ b/seed/rust-sdk/response-property/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/schemaless-request-body-examples/src/core/pagination.rs b/seed/rust-sdk/schemaless-request-body-examples/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/schemaless-request-body-examples/src/core/pagination.rs +++ b/seed/rust-sdk/schemaless-request-body-examples/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/server-sent-event-examples/with-wire-tests/src/core/pagination.rs b/seed/rust-sdk/server-sent-event-examples/with-wire-tests/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/server-sent-event-examples/with-wire-tests/src/core/pagination.rs +++ b/seed/rust-sdk/server-sent-event-examples/with-wire-tests/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/server-sent-event-examples/with-wire-tests/tests/completions_test.rs b/seed/rust-sdk/server-sent-event-examples/with-wire-tests/tests/completions_test.rs index 184254df5c10..f1b855881e66 100644 --- a/seed/rust-sdk/server-sent-event-examples/with-wire-tests/tests/completions_test.rs +++ b/seed/rust-sdk/server-sent-event-examples/with-wire-tests/tests/completions_test.rs @@ -12,7 +12,6 @@ async fn test_completions_stream_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client @@ -42,7 +41,6 @@ async fn test_completions_stream_events_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client @@ -72,7 +70,6 @@ async fn test_completions_stream_events_discriminant_in_data_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client @@ -102,7 +99,6 @@ async fn test_completions_stream_events_context_protocol_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/server-sent-events-openapi/src/core/pagination.rs b/seed/rust-sdk/server-sent-events-openapi/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/server-sent-events-openapi/src/core/pagination.rs +++ b/seed/rust-sdk/server-sent-events-openapi/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/server-sent-events/with-wire-tests/src/core/pagination.rs b/seed/rust-sdk/server-sent-events/with-wire-tests/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/server-sent-events/with-wire-tests/src/core/pagination.rs +++ b/seed/rust-sdk/server-sent-events/with-wire-tests/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/server-sent-events/with-wire-tests/tests/completions_test.rs b/seed/rust-sdk/server-sent-events/with-wire-tests/tests/completions_test.rs index 1151fab568d4..b3de530263b0 100644 --- a/seed/rust-sdk/server-sent-events/with-wire-tests/tests/completions_test.rs +++ b/seed/rust-sdk/server-sent-events/with-wire-tests/tests/completions_test.rs @@ -12,7 +12,6 @@ async fn test_completions_stream_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client @@ -42,7 +41,6 @@ async fn test_completions_stream_without_terminator_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = ServerSentEventsClient::new(config).expect("Failed to build client"); let result = client diff --git a/seed/rust-sdk/server-url-templating/src/core/pagination.rs b/seed/rust-sdk/server-url-templating/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/server-url-templating/src/core/pagination.rs +++ b/seed/rust-sdk/server-url-templating/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/simple-api/basic-custom-config/src/core/pagination.rs b/seed/rust-sdk/simple-api/basic-custom-config/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/simple-api/basic-custom-config/src/core/pagination.rs +++ b/seed/rust-sdk/simple-api/basic-custom-config/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/simple-api/basic-custom-config/tests/user_test.rs b/seed/rust-sdk/simple-api/basic-custom-config/tests/user_test.rs index fb72490f5b55..af5898750a14 100644 --- a/seed/rust-sdk/simple-api/basic-custom-config/tests/user_test.rs +++ b/seed/rust-sdk/simple-api/basic-custom-config/tests/user_test.rs @@ -13,7 +13,6 @@ async fn test_user_get_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = CustomSimpleClient::new(config).expect("Failed to build client"); let result = client.user.get(&"id".to_string(), None).await; diff --git a/seed/rust-sdk/simple-api/basic/src/core/pagination.rs b/seed/rust-sdk/simple-api/basic/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/simple-api/basic/src/core/pagination.rs +++ b/seed/rust-sdk/simple-api/basic/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/simple-fhir/src/core/pagination.rs b/seed/rust-sdk/simple-fhir/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/simple-fhir/src/core/pagination.rs +++ b/seed/rust-sdk/simple-fhir/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/single-url-environment-default/basic/src/core/pagination.rs b/seed/rust-sdk/single-url-environment-default/basic/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/single-url-environment-default/basic/src/core/pagination.rs +++ b/seed/rust-sdk/single-url-environment-default/basic/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/single-url-environment-default/custom-environment/src/core/pagination.rs b/seed/rust-sdk/single-url-environment-default/custom-environment/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/single-url-environment-default/custom-environment/src/core/pagination.rs +++ b/seed/rust-sdk/single-url-environment-default/custom-environment/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/single-url-environment-default/full-custom/src/core/pagination.rs b/seed/rust-sdk/single-url-environment-default/full-custom/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/single-url-environment-default/full-custom/src/core/pagination.rs +++ b/seed/rust-sdk/single-url-environment-default/full-custom/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/single-url-environment-default/full-custom/tests/dummy_test.rs b/seed/rust-sdk/single-url-environment-default/full-custom/tests/dummy_test.rs index 69d251d7a660..81d004ba754c 100644 --- a/seed/rust-sdk/single-url-environment-default/full-custom/tests/dummy_test.rs +++ b/seed/rust-sdk/single-url-environment-default/full-custom/tests/dummy_test.rs @@ -13,7 +13,6 @@ async fn test_dummy_get_dummy_with_wiremock() { ..Default::default() }; config.base_url = wiremock_base_url.to_string(); - config.environment = None; let client = SingleUrlEnvironmentDefaultClient::new(config).expect("Failed to build client"); let result = client.dummy.get_dummy(None).await; diff --git a/seed/rust-sdk/single-url-environment-no-default/src/core/pagination.rs b/seed/rust-sdk/single-url-environment-no-default/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/single-url-environment-no-default/src/core/pagination.rs +++ b/seed/rust-sdk/single-url-environment-no-default/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/streaming-parameter/src/core/pagination.rs b/seed/rust-sdk/streaming-parameter/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/streaming-parameter/src/core/pagination.rs +++ b/seed/rust-sdk/streaming-parameter/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/streaming/src/core/pagination.rs b/seed/rust-sdk/streaming/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/streaming/src/core/pagination.rs +++ b/seed/rust-sdk/streaming/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/trace/src/core/pagination.rs b/seed/rust-sdk/trace/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/trace/src/core/pagination.rs +++ b/seed/rust-sdk/trace/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/undiscriminated-union-with-response-property/src/core/pagination.rs b/seed/rust-sdk/undiscriminated-union-with-response-property/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/undiscriminated-union-with-response-property/src/core/pagination.rs +++ b/seed/rust-sdk/undiscriminated-union-with-response-property/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/undiscriminated-unions/src/core/pagination.rs b/seed/rust-sdk/undiscriminated-unions/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/undiscriminated-unions/src/core/pagination.rs +++ b/seed/rust-sdk/undiscriminated-unions/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/union-query-parameters/src/core/pagination.rs b/seed/rust-sdk/union-query-parameters/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/union-query-parameters/src/core/pagination.rs +++ b/seed/rust-sdk/union-query-parameters/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/unions-with-local-date/src/core/pagination.rs b/seed/rust-sdk/unions-with-local-date/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/unions-with-local-date/src/core/pagination.rs +++ b/seed/rust-sdk/unions-with-local-date/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/unions/src/core/pagination.rs b/seed/rust-sdk/unions/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/unions/src/core/pagination.rs +++ b/seed/rust-sdk/unions/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/unknown/src/core/pagination.rs b/seed/rust-sdk/unknown/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/unknown/src/core/pagination.rs +++ b/seed/rust-sdk/unknown/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/url-form-encoded/src/core/pagination.rs b/seed/rust-sdk/url-form-encoded/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/url-form-encoded/src/core/pagination.rs +++ b/seed/rust-sdk/url-form-encoded/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/validation/src/core/pagination.rs b/seed/rust-sdk/validation/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/validation/src/core/pagination.rs +++ b/seed/rust-sdk/validation/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/variables/src/core/pagination.rs b/seed/rust-sdk/variables/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/variables/src/core/pagination.rs +++ b/seed/rust-sdk/variables/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/version-no-default/src/core/pagination.rs b/seed/rust-sdk/version-no-default/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/version-no-default/src/core/pagination.rs +++ b/seed/rust-sdk/version-no-default/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/version/src/core/pagination.rs b/seed/rust-sdk/version/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/version/src/core/pagination.rs +++ b/seed/rust-sdk/version/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/webhook-audience/src/core/pagination.rs b/seed/rust-sdk/webhook-audience/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/webhook-audience/src/core/pagination.rs +++ b/seed/rust-sdk/webhook-audience/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/webhooks/src/core/pagination.rs b/seed/rust-sdk/webhooks/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/webhooks/src/core/pagination.rs +++ b/seed/rust-sdk/webhooks/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/websocket-bearer-auth/src/core/pagination.rs b/seed/rust-sdk/websocket-bearer-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/websocket-bearer-auth/src/core/pagination.rs +++ b/seed/rust-sdk/websocket-bearer-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/websocket-inferred-auth/src/core/pagination.rs b/seed/rust-sdk/websocket-inferred-auth/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/websocket-inferred-auth/src/core/pagination.rs +++ b/seed/rust-sdk/websocket-inferred-auth/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/websocket-multi-url/src/core/pagination.rs b/seed/rust-sdk/websocket-multi-url/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/websocket-multi-url/src/core/pagination.rs +++ b/seed/rust-sdk/websocket-multi-url/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); diff --git a/seed/rust-sdk/websocket/src/core/pagination.rs b/seed/rust-sdk/websocket/src/core/pagination.rs index 3853d2856ec1..6170b0299215 100644 --- a/seed/rust-sdk/websocket/src/core/pagination.rs +++ b/seed/rust-sdk/websocket/src/core/pagination.rs @@ -526,7 +526,7 @@ mod tests { fn test_sync_paginator_error_propagation() { let client = make_http_client(); let mut paginator = SyncPaginator::::new(client, |_client, _cursor| { - Err(ApiError::Serialization("test error".to_string())) + Err(ApiError::Configuration("test error".to_string())) }, None).unwrap(); let result = paginator.next_page(); @@ -537,7 +537,7 @@ mod tests { fn test_sync_paginator_iterator_error() { let client = make_http_client(); let mut paginator = SyncPaginator::::new(client, |_client, _cursor| { - Err(ApiError::Serialization("test error".to_string())) + Err(ApiError::Configuration("test error".to_string())) }, None).unwrap(); let item = paginator.next(); diff --git a/seed/rust-sdk/x-fern-default/src/core/pagination.rs b/seed/rust-sdk/x-fern-default/src/core/pagination.rs index c128149eead1..be6e2cca6bf1 100644 --- a/seed/rust-sdk/x-fern-default/src/core/pagination.rs +++ b/seed/rust-sdk/x-fern-default/src/core/pagination.rs @@ -559,7 +559,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap(); @@ -573,7 +573,7 @@ mod tests { let client = make_http_client(); let mut paginator = SyncPaginator::::new( client, - |_client, _cursor| Err(ApiError::Serialization("test error".to_string())), + |_client, _cursor| Err(ApiError::Configuration("test error".to_string())), None, ) .unwrap();