diff --git a/generators/go/internal/generator/model.go b/generators/go/internal/generator/model.go index 85a767716b1b..456e0a0e1b2e 100644 --- a/generators/go/internal/generator/model.go +++ b/generators/go/internal/generator/model.go @@ -2038,7 +2038,7 @@ func getExtraPropertiesFieldName(extraPropertiesEnabled bool) string { // unknownToGoType maps the given unknown into its Go-equivalent. func unknownToGoType(_ any) string { - return "interface{}" + return "any" } // literalToUndiscriminatedUnionField maps Fern's literal types to the field name used in an diff --git a/generators/go/internal/testdata/model/alias/fixtures/imdb.go b/generators/go/internal/testdata/model/alias/fixtures/imdb.go index d2c96f6619fa..9e8b61d37cb4 100644 --- a/generators/go/internal/testdata/model/alias/fixtures/imdb.go +++ b/generators/go/internal/testdata/model/alias/fixtures/imdb.go @@ -309,6 +309,6 @@ func (u *Union) validate() error { return nil } -type Unknown = interface{} +type Unknown = any type Uuid = uuid.UUID diff --git a/generators/go/sdk/versions.yml b/generators/go/sdk/versions.yml index 64b59f96c758..148c1b5b8d91 100644 --- a/generators/go/sdk/versions.yml +++ b/generators/go/sdk/versions.yml @@ -1,4 +1,14 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 1.30.3 + changelogEntry: + - summary: | + Use `any` instead of `interface{}` for unknown type schemas. Since Go 1.18+, + `any` is the idiomatic alias for `interface{}`. This is a purely cosmetic + modernization with no behavioral change. + type: fix + createdAt: "2026-03-16" + irVersion: 61 + - version: 1.30.2 changelogEntry: - summary: | diff --git a/generators/python/sdk/versions.yml b/generators/python/sdk/versions.yml index 69a13d07f617..e8afe6f2de90 100644 --- a/generators/python/sdk/versions.yml +++ b/generators/python/sdk/versions.yml @@ -1,5 +1,15 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json # For unreleased changes, use unreleased.yml +- version: 5.0.2 + changelogEntry: + - summary: | + Add docstring emission for unknown/any type alias definitions. When a type alias + resolves to `typing.Any` and has a description in the API definition, the generated + Python code now includes the docstring below the type alias declaration. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + - version: 5.0.1 changelogEntry: - summary: | @@ -52,6 +62,7 @@ type: fix createdAt: "2026-03-12" irVersion: 65 + - version: 4.63.5 changelogEntry: - summary: | diff --git a/generators/python/src/fern_python/codegen/ast/nodes/declarations/type_alias/type_alias_declaration.py b/generators/python/src/fern_python/codegen/ast/nodes/declarations/type_alias/type_alias_declaration.py index 89cc98148fc8..f14ae0fbcfa0 100644 --- a/generators/python/src/fern_python/codegen/ast/nodes/declarations/type_alias/type_alias_declaration.py +++ b/generators/python/src/fern_python/codegen/ast/nodes/declarations/type_alias/type_alias_declaration.py @@ -6,10 +6,11 @@ class TypeAliasDeclaration(AstNode): - def __init__(self, name: str, type_hint: TypeHint, snippet: Optional[str] = None): + def __init__(self, name: str, type_hint: TypeHint, snippet: Optional[str] = None, docs: Optional[str] = None): self.name = name self.type_hint = type_hint self.snippet = snippet + self.docs = docs self.ghost_references: Set[Reference] = set() def get_metadata(self) -> AstNodeMetadata: @@ -32,3 +33,9 @@ def write(self, writer: NodeWriter, should_write_as_snippet: Optional[bool] = No writer.write(f"{self.name} = ") self.type_hint.write(writer=writer) writer.write_newline_if_last_line_not() + + if self.docs is not None: + writer.write_line('"""') + writer.write(self.docs) + writer.write_newline_if_last_line_not() + writer.write_line('"""') diff --git a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py index b62223e4f01a..2b21a7eb00f3 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py +++ b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/pydantic_models/pydantic_model_alias_generator.py @@ -46,6 +46,7 @@ def generate( name=self._context.get_class_name_for_type_id(self._name.type_id, as_request=False), type_hint=self._type_hint, snippet=self._snippet, + docs=self._docs, ), should_export=True, ) diff --git a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/typeddicts/typeddict_alias_generator.py b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/typeddicts/typeddict_alias_generator.py index 717bfa839d4c..925936d6c585 100644 --- a/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/typeddicts/typeddict_alias_generator.py +++ b/generators/python/src/fern_python/generators/pydantic_model/type_declaration_handler/typeddicts/typeddict_alias_generator.py @@ -38,6 +38,7 @@ def generate( name=self._context.get_class_name_for_type_id(self._name.type_id, as_request=True), type_hint=self._type_hint, snippet=self._snippet, + docs=self._docs, ), should_export=True, ) diff --git a/generators/typescript/asIs/tests/mock-server/MockServerPool.ts b/generators/typescript/asIs/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/generators/typescript/asIs/tests/mock-server/MockServerPool.ts +++ b/generators/typescript/asIs/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts index 84fed9af07d6..ac268dda772a 100644 --- a/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts +++ b/generators/typescript/model/type-reference-converters/src/AbstractTypeReferenceToTypeNodeConverter.ts @@ -368,19 +368,26 @@ export abstract class AbstractTypeReferenceToTypeNodeConverter extends AbstractT const keyTypeNode = this.convert({ ...params, typeReference: map.keyType }); const valueTypeNode = this.convert({ ...params, typeReference: map.valueType }); return this.generateNonOptionalTypeReferenceNode({ - typeNode: ts.factory.createTypeReferenceNode("Record", [keyTypeNode.typeNode, valueTypeNode.typeNode]), + typeNode: ts.factory.createTypeReferenceNode("Record", [ + keyTypeNode.typeNode, + valueTypeNode.typeNodeWithoutUndefined + ]), requestTypeNode: keyTypeNode.requestTypeNode || valueTypeNode.requestTypeNode ? ts.factory.createTypeReferenceNode("Record", [ keyTypeNode.requestTypeNode ?? keyTypeNode.typeNode, - valueTypeNode.requestTypeNode ?? valueTypeNode.typeNode + valueTypeNode.requestTypeNodeWithoutUndefined ?? + valueTypeNode.requestTypeNode ?? + valueTypeNode.typeNodeWithoutUndefined ]) : undefined, responseTypeNode: keyTypeNode.responseTypeNode || valueTypeNode.responseTypeNode ? ts.factory.createTypeReferenceNode("Record", [ keyTypeNode.responseTypeNode ?? keyTypeNode.typeNode, - valueTypeNode.responseTypeNode ?? valueTypeNode.typeNode + valueTypeNode.responseTypeNodeWithoutUndefined ?? + valueTypeNode.responseTypeNode ?? + valueTypeNode.typeNodeWithoutUndefined ]) : undefined }); diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts index 259c85e5f9f9..8935e91fc151 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts @@ -874,16 +874,30 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { getAuthHeadersCode = ""; } - // For multi-URL environments, this._options.environment is an object (e.g. { ec2: string; s3: string }), - // not a single string URL. Only pass `environment` when it resolves to a single base URL string. - const isMultiUrlEnvironment = - this.intermediateRepresentation.environments?.environments.type === "multipleBaseUrls"; - const environmentCode = isMultiUrlEnvironment ? "" : "environment: this._options.environment,"; + // Resolve the base URL from either the explicit baseUrl option or the environment. + // For multi-URL environments (e.g. { ec2: string; s3: string }), the environment is an object, + // so we project it to a string via its first base URL property to avoid passing an object where a string is expected. + // The property name is read from the IR's baseUrls definition rather than hardcoded. + // For single-URL or no-IR-defined environments, the environment is already a string, so we fall back to it directly. + const envs = this.intermediateRepresentation.environments?.environments; + let baseUrlCode: string; + if (envs != null && envs.type === "multipleBaseUrls") { + const firstBaseUrl = envs.baseUrls[0]; + if (firstBaseUrl == null) { + throw new Error("Multi-URL environment has no base URLs defined"); + } + const firstBaseUrlName = firstBaseUrl.name.camelCase.unsafeName; + baseUrlCode = `baseUrl: this._options.baseUrl ?? (async () => { + const env = await core.Supplier.get(this._options.environment); + return typeof env === "string" ? env : (env as Record)?.${firstBaseUrlName}; + }),`; + } else { + baseUrlCode = "baseUrl: this._options.baseUrl ?? this._options.environment,"; + } const fetchMethodBody = ` return core.makePassthroughRequest(input, init, { - ${environmentCode} - baseUrl: this._options.baseUrl, + ${baseUrlCode} headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/generators/typescript/sdk/generator/src/test-generator/TestGenerator.ts b/generators/typescript/sdk/generator/src/test-generator/TestGenerator.ts index ea4ee9b372cc..9d9b4071ee16 100644 --- a/generators/typescript/sdk/generator/src/test-generator/TestGenerator.ts +++ b/generators/typescript/sdk/generator/src/test-generator/TestGenerator.ts @@ -176,6 +176,10 @@ export class TestGenerator { import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./${this.relativeTestPath}/tsconfig.json" + }, projects: [ { test: { diff --git a/generators/typescript/sdk/versions.yml b/generators/typescript/sdk/versions.yml index c5c9458de13c..2730cfc105f5 100644 --- a/generators/typescript/sdk/versions.yml +++ b/generators/typescript/sdk/versions.yml @@ -1,4 +1,40 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 3.58.0 + changelogEntry: + - summary: | + Add explicit type annotation to `mockServerPool` export in generated test + mock-server code to satisfy `--isolatedDeclarations`. + type: fix + - summary: | + Enable vitest typechecking in generated vitest config so that type errors + in test and source files are caught when running `vitest`. + type: feat + createdAt: "2026-03-17" + irVersion: 65 + +- version: 3.57.2 + changelogEntry: + - summary: | + Fix map types with unknown/any value types to not include spurious `| undefined`. + Previously, `map` generated `Record` + instead of `Record`. The `| undefined` is now correctly omitted + from map value types. + type: fix + createdAt: "2026-03-16" + irVersion: 65 + +- version: 3.57.1 + changelogEntry: + - summary: | + Fix passthrough `fetch()` method producing 404s when the SDK environment is an + object (e.g. `{ base: string; production: string }`) instead of a plain string URL. + The generated code now resolves the environment supplier inline and projects object + environments to their `.base` property, instead of passing the raw object to + `makePassthroughRequest` where it would be stringified as `[object Object]`. + type: fix + createdAt: "2026-03-16" + irVersion: 65 + - version: 3.57.0 changelogEntry: - summary: | @@ -10,7 +46,6 @@ type: feat createdAt: "2026-03-16" irVersion: 65 - - version: 3.56.4 changelogEntry: - summary: | diff --git a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/RequestBodyConverter.ts b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/RequestBodyConverter.ts index 91a90d2200a8..8619a4841e81 100644 --- a/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/RequestBodyConverter.ts +++ b/packages/cli/api-importers/openapi-to-ir/src/3.1/paths/RequestBodyConverter.ts @@ -389,9 +389,9 @@ export class RequestBodyConverter extends Converters.AbstractConverters.Abstract properties: { ...resolvedMediaTypeSchema.properties, [this.streamingExtension.streamConditionProperty]: { + ...streamConditionProperty, type: "boolean", - const: isStreaming, - ...streamConditionProperty + const: isStreaming } as OpenAPIV3_1.SchemaObject }, required: [...(resolvedMediaTypeSchema.required ?? []), this.streamingExtension.streamConditionProperty] diff --git a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertStreamingOperation.ts b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertStreamingOperation.ts index a33800e4b215..ebeb38c193bc 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertStreamingOperation.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-parser/src/openapi/v3/converters/operation/convertStreamingOperation.ts @@ -196,9 +196,9 @@ function getRequestBody({ properties: { ...resolvedRequestBodySchema.properties, [streamingExtension.streamConditionProperty]: { + ...(streamingProperty ?? {}), type: "boolean", - "x-fern-boolean-literal": isStreaming, - ...(streamingProperty ?? {}) + "x-fern-boolean-literal": isStreaming // biome-ignore lint/suspicious/noExplicitAny: allow explicit any } as any }, diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml index 234ad8e03d98..800678239a4d 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml @@ -49,7 +49,9 @@ components: example: How can I use the Vectara platform? stream_response: description: Indicates whether the response should be streamed or not. - type: boolean + type: + - boolean + - "null" default: false required: - query diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/x-fern-streaming-with-stream-condition.json b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/x-fern-streaming-with-stream-condition.json index 8e4fc5b43fb6..1b765f6f781f 100644 --- a/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/x-fern-streaming-with-stream-condition.json +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/__snapshots__/v3-sdks/x-fern-streaming-with-stream-condition.json @@ -101,14 +101,20 @@ "valueType": { "container": { "optional": { - "primitive": { - "v1": "BOOLEAN", - "v2": { - "default": false, - "type": "boolean" - } + "container": { + "nullable": { + "primitive": { + "v1": "BOOLEAN", + "v2": { + "default": false, + "type": "boolean" + } + }, + "type": "primitive" + }, + "type": "nullable" }, - "type": "primitive" + "type": "container" }, "type": "optional" }, diff --git a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml index 234ad8e03d98..800678239a4d 100644 --- a/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml +++ b/packages/cli/api-importers/v3-importer-tests/src/__test__/fixtures/x-fern-streaming-with-stream-condition/openapi.yml @@ -49,7 +49,9 @@ components: example: How can I use the Vectara platform? stream_response: description: Indicates whether the response should be streamed or not. - type: boolean + type: + - boolean + - "null" default: false required: - query diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index 51a05be22511..f89f01261d92 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,4 +1,15 @@ # yaml-language-server: $schema=../../../fern-versions-yml.schema.json +- version: 4.31.1 + changelogEntry: + - summary: | + Fix `x-fern-streaming` with `stream-condition` emitting the condition field + as an optional boolean instead of a required literal in split request types. + When the source property was nullable (`type: [boolean, "null"]`), the spread + order allowed the original property to overwrite the literal overrides. + type: fix + createdAt: "2026-03-17" + irVersion: 65 + - version: 4.31.0 changelogEntry: - summary: | diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-namespace-collision/type_System_Task.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-namespace-collision/type_System_Task.json index 49dcb5a2a5ea..3d1a798c5b37 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-namespace-collision/type_System_Task.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/csharp-namespace-collision/type_System_Task.json @@ -6,11 +6,15 @@ }, "user": { "$ref": "#/definitions/System.User" + }, + "owner": { + "$ref": "#/definitions/System.User" } }, "required": [ "name", - "user" + "user", + "owner" ], "additionalProperties": false, "definitions": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object_MapOfDocumentedUnknownType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object_MapOfDocumentedUnknownType.json new file mode 100644 index 000000000000..60e1ba9df033 --- /dev/null +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object_MapOfDocumentedUnknownType.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/types.object.DocumentedUnknownType" + }, + "definitions": { + "types.object.DocumentedUnknownType": { + "type": [ + "string", + "number", + "boolean", + "object", + "array", + "null" + ] + } + } +} \ No newline at end of file diff --git a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-collision.json b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-collision.json index 022e000c7131..a244ffc5cf42 100644 --- a/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-collision.json +++ b/packages/cli/generation/ir-generator-tests/src/dynamic-snippets/__test__/test-definitions/csharp-namespace-collision.json @@ -435,6 +435,36 @@ }, "propertyAccess": null, "variable": null + }, + { + "name": { + "name": { + "originalName": "owner", + "camelCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "snakeCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "screamingSnakeCase": { + "unsafeName": "OWNER", + "safeName": "OWNER" + }, + "pascalCase": { + "unsafeName": "Owner", + "safeName": "Owner" + } + }, + "wireValue": "owner" + }, + "typeReference": { + "type": "named", + "value": "type_System:User" + }, + "propertyAccess": null, + "variable": null } ], "extends": null, @@ -973,6 +1003,119 @@ "type": "json" }, "examples": null + }, + "endpoint_System.getUser": { + "auth": null, + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + } + }, + "location": { + "method": "GET", + "path": "/users/{userId}" + }, + "request": { + "type": "body", + "pathParameters": [ + { + "name": { + "name": { + "originalName": "userId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "wireValue": "userId" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null + } + ], + "body": null + }, + "response": { + "type": "json" + }, + "examples": null } }, "pathParameters": [], diff --git a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-namespace-collision.json b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-namespace-collision.json index bb7f15f16864..a8b9caa0ef7e 100644 --- a/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-namespace-collision.json +++ b/packages/cli/generation/ir-generator-tests/src/ir/__test__/test-definitions/csharp-namespace-collision.json @@ -684,6 +684,108 @@ }, "availability": null, "docs": null + }, + { + "name": { + "name": { + "originalName": "owner", + "camelCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "snakeCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "screamingSnakeCase": { + "unsafeName": "OWNER", + "safeName": "OWNER" + }, + "pascalCase": { + "unsafeName": "Owner", + "safeName": "Owner" + } + }, + "wireValue": "owner" + }, + "valueType": { + "_type": "named", + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User", + "default": null, + "inline": null + }, + "propertyAccess": null, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + }, + "availability": null, + "docs": null } ], "extra-properties": false, @@ -4928,7 +5030,7 @@ "autogeneratedExamples": [ { "example": { - "id": "8afdf8ae", + "id": "71055d3b", "url": "/users", "name": null, "endpointHeaders": [], @@ -5868,1035 +5970,3737 @@ } }, "propertyAccess": null - } - ], - "extraProperties": null - }, - "typeName": { - "name": { - "originalName": "Task", - "camelCase": { - "unsafeName": "task", - "safeName": "task" - }, - "snakeCase": { - "unsafeName": "task", - "safeName": "task" - }, - "screamingSnakeCase": { - "unsafeName": "TASK", - "safeName": "TASK" }, - "pascalCase": { - "unsafeName": "Task", - "safeName": "Task" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" + { + "name": { + "name": { + "originalName": "owner", + "camelCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "snakeCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "screamingSnakeCase": { + "unsafeName": "OWNER", + "safeName": "OWNER" + }, + "pascalCase": { + "unsafeName": "Owner", + "safeName": "Owner" + } }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" + "wireValue": "owner" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:Task" - } - }, - "jsonExample": { - "name": "name", - "user": { - "line1": "line1", - "city": "city", - "state": "state", - "zip": "zip", - "country": "USA" - } - } - }, - "response": { - "type": "ok", - "value": { - "type": "body", - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "name", + "fernFilepath": { + "allParts": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "name", - "safeName": "name" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "NAME", - "safeName": "NAME" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "Name", - "safeName": "Name" + "unsafeName": "System", + "safeName": "System" } - }, - "wireValue": "name" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "Task", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "task", - "safeName": "task" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "task", - "safeName": "task" - }, - "screamingSnakeCase": { - "unsafeName": "TASK", - "safeName": "TASK" - }, - "pascalCase": { - "unsafeName": "Task", - "safeName": "Task" - } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:Task" - }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "name" - } - } - }, - "jsonExample": "name" - }, - "propertyAccess": null - }, - { - "name": { - "name": { - "originalName": "user", - "camelCase": { - "unsafeName": "user", - "safeName": "user" - }, - "snakeCase": { - "unsafeName": "user", - "safeName": "user" - }, - "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" - }, - "pascalCase": { - "unsafeName": "User", - "safeName": "User" - } - }, - "wireValue": "user" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "Task", - "camelCase": { - "unsafeName": "task", - "safeName": "task" - }, - "snakeCase": { - "unsafeName": "task", - "safeName": "task" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "TASK", - "safeName": "TASK" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "Task", - "safeName": "Task" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "line1", + "camelCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "snakeCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "screamingSnakeCase": { + "unsafeName": "LINE1", + "safeName": "LINE1" + }, + "pascalCase": { + "unsafeName": "Line1", + "safeName": "Line1" + } }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" + "wireValue": "line1" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "User", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:Task" - }, - "value": { - "shape": { - "type": "named", - "shape": { - "type": "object", - "properties": [ - { - "name": { - "name": { - "originalName": "line1", + "fernFilepath": { + "allParts": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "line1", - "safeName": "line1" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "line1", - "safeName": "line1" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "LINE1", - "safeName": "LINE1" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "Line1", - "safeName": "Line1" + "unsafeName": "System", + "safeName": "System" } - }, - "wireValue": "line1" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "User", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "User", - "safeName": "User" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line1" + } + } + }, + "jsonExample": "line1" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "line2", + "camelCase": { + "unsafeName": "line2", + "safeName": "line2" }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "line1" - } - } - }, - "jsonExample": "line1" + "snakeCase": { + "unsafeName": "line2", + "safeName": "line2" }, - "propertyAccess": null + "screamingSnakeCase": { + "unsafeName": "LINE2", + "safeName": "LINE2" + }, + "pascalCase": { + "unsafeName": "Line2", + "safeName": "Line2" + } }, - { - "name": { - "name": { - "originalName": "line2", + "wireValue": "line2" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "line2", - "safeName": "line2" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "line2", - "safeName": "line2" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "LINE2", - "safeName": "LINE2" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "Line2", - "safeName": "Line2" + "unsafeName": "System", + "safeName": "System" } - }, - "wireValue": "line2" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "User", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "User", - "safeName": "User" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" - }, - "value": { - "shape": { - "type": "container", - "container": { - "type": "optional", - "optional": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "line2" - } - } - }, - "jsonExample": "line2" - }, - "valueType": { - "_type": "primitive", - "primitive": { - "v1": "STRING", - "v2": { - "type": "string", - "default": null, - "validation": null - } - } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": null, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null } } - }, - "jsonExample": "line2" + } + } + } + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "city", + "camelCase": { + "unsafeName": "city", + "safeName": "city" }, - "propertyAccess": null + "snakeCase": { + "unsafeName": "city", + "safeName": "city" + }, + "screamingSnakeCase": { + "unsafeName": "CITY", + "safeName": "CITY" + }, + "pascalCase": { + "unsafeName": "City", + "safeName": "City" + } }, - { - "name": { - "name": { - "originalName": "city", - "camelCase": { - "unsafeName": "city", - "safeName": "city" - }, - "snakeCase": { - "unsafeName": "city", - "safeName": "city" - }, - "screamingSnakeCase": { - "unsafeName": "CITY", - "safeName": "CITY" - }, - "pascalCase": { - "unsafeName": "City", - "safeName": "City" - } - }, - "wireValue": "city" + "wireValue": "city" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "User", + "camelCase": { + "unsafeName": "user", + "safeName": "user" }, - "originalTypeDeclaration": { - "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": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + "snakeCase": { + "unsafeName": "user", + "safeName": "user" }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "city" - } - } - }, - "jsonExample": "city" + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" }, - "propertyAccess": null + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } }, - { - "name": { - "name": { - "originalName": "state", + "fernFilepath": { + "allParts": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "state", - "safeName": "state" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "state", - "safeName": "state" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "STATE", - "safeName": "STATE" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "State", - "safeName": "State" + "unsafeName": "System", + "safeName": "System" } - }, - "wireValue": "state" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "User", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "User", - "safeName": "User" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "city" + } + } + }, + "jsonExample": "city" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "state", + "camelCase": { + "unsafeName": "state", + "safeName": "state" }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "state" - } - } - }, - "jsonExample": "state" + "snakeCase": { + "unsafeName": "state", + "safeName": "state" }, - "propertyAccess": null + "screamingSnakeCase": { + "unsafeName": "STATE", + "safeName": "STATE" + }, + "pascalCase": { + "unsafeName": "State", + "safeName": "State" + } }, - { - "name": { - "name": { - "originalName": "zip", - "camelCase": { - "unsafeName": "zip", - "safeName": "zip" - }, - "snakeCase": { - "unsafeName": "zip", - "safeName": "zip" - }, - "screamingSnakeCase": { - "unsafeName": "ZIP", - "safeName": "ZIP" - }, - "pascalCase": { - "unsafeName": "Zip", - "safeName": "Zip" - } - }, - "wireValue": "zip" + "wireValue": "state" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "User", + "camelCase": { + "unsafeName": "user", + "safeName": "user" }, - "originalTypeDeclaration": { - "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": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + "snakeCase": { + "unsafeName": "user", + "safeName": "user" }, - "value": { - "shape": { - "type": "primitive", - "primitive": { - "type": "string", - "string": { - "original": "zip" - } - } - }, - "jsonExample": "zip" + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" }, - "propertyAccess": null + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } }, - { - "name": { - "name": { - "originalName": "country", + "fernFilepath": { + "allParts": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "country", - "safeName": "country" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "country", - "safeName": "country" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "COUNTRY", - "safeName": "COUNTRY" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "Country", - "safeName": "Country" + "unsafeName": "System", + "safeName": "System" } - }, - "wireValue": "country" - }, - "originalTypeDeclaration": { - "name": { - "originalName": "User", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "User", - "safeName": "User" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "state" + } + } + }, + "jsonExample": "state" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "zip", + "camelCase": { + "unsafeName": "zip", + "safeName": "zip" }, - "value": { - "shape": { - "type": "container", - "container": { - "type": "literal", - "literal": { - "type": "string", - "string": { - "original": "USA" - } - } + "snakeCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "screamingSnakeCase": { + "unsafeName": "ZIP", + "safeName": "ZIP" + }, + "pascalCase": { + "unsafeName": "Zip", + "safeName": "Zip" + } + }, + "wireValue": "zip" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" } - }, - "jsonExample": "USA" + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "zip" + } + } + }, + "jsonExample": "zip" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "country", + "camelCase": { + "unsafeName": "country", + "safeName": "country" }, - "propertyAccess": null + "snakeCase": { + "unsafeName": "country", + "safeName": "country" + }, + "screamingSnakeCase": { + "unsafeName": "COUNTRY", + "safeName": "COUNTRY" + }, + "pascalCase": { + "unsafeName": "Country", + "safeName": "Country" + } + }, + "wireValue": "country" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "literal", + "literal": { + "type": "string", + "string": { + "original": "USA" + } + } + } + }, + "jsonExample": "USA" + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + } + }, + "jsonExample": { + "line1": "line1", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + } + }, + "jsonExample": { + "name": "name", + "user": { + "line1": "line1", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + }, + "owner": { + "line1": "line1", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + } + }, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "name", + "camelCase": { + "unsafeName": "name", + "safeName": "name" + }, + "snakeCase": { + "unsafeName": "name", + "safeName": "name" + }, + "screamingSnakeCase": { + "unsafeName": "NAME", + "safeName": "NAME" + }, + "pascalCase": { + "unsafeName": "Name", + "safeName": "Name" + } + }, + "wireValue": "name" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "name" + } + } + }, + "jsonExample": "name" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "user", + "camelCase": { + "unsafeName": "user", + "safeName": "user" + }, + "snakeCase": { + "unsafeName": "user", + "safeName": "user" + }, + "screamingSnakeCase": { + "unsafeName": "USER", + "safeName": "USER" + }, + "pascalCase": { + "unsafeName": "User", + "safeName": "User" + } + }, + "wireValue": "user" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "line1", + "camelCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "snakeCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "screamingSnakeCase": { + "unsafeName": "LINE1", + "safeName": "LINE1" + }, + "pascalCase": { + "unsafeName": "Line1", + "safeName": "Line1" + } + }, + "wireValue": "line1" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line1" + } + } + }, + "jsonExample": "line1" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "line2", + "camelCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "snakeCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "screamingSnakeCase": { + "unsafeName": "LINE2", + "safeName": "LINE2" + }, + "pascalCase": { + "unsafeName": "Line2", + "safeName": "Line2" + } + }, + "wireValue": "line2" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line2" + } + } + }, + "jsonExample": "line2" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "line2" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "city", + "camelCase": { + "unsafeName": "city", + "safeName": "city" + }, + "snakeCase": { + "unsafeName": "city", + "safeName": "city" + }, + "screamingSnakeCase": { + "unsafeName": "CITY", + "safeName": "CITY" + }, + "pascalCase": { + "unsafeName": "City", + "safeName": "City" + } + }, + "wireValue": "city" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "city" + } + } + }, + "jsonExample": "city" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "state", + "camelCase": { + "unsafeName": "state", + "safeName": "state" + }, + "snakeCase": { + "unsafeName": "state", + "safeName": "state" + }, + "screamingSnakeCase": { + "unsafeName": "STATE", + "safeName": "STATE" + }, + "pascalCase": { + "unsafeName": "State", + "safeName": "State" + } + }, + "wireValue": "state" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "state" + } + } + }, + "jsonExample": "state" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "zip", + "camelCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "snakeCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "screamingSnakeCase": { + "unsafeName": "ZIP", + "safeName": "ZIP" + }, + "pascalCase": { + "unsafeName": "Zip", + "safeName": "Zip" + } + }, + "wireValue": "zip" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "zip" + } + } + }, + "jsonExample": "zip" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "country", + "camelCase": { + "unsafeName": "country", + "safeName": "country" + }, + "snakeCase": { + "unsafeName": "country", + "safeName": "country" + }, + "screamingSnakeCase": { + "unsafeName": "COUNTRY", + "safeName": "COUNTRY" + }, + "pascalCase": { + "unsafeName": "Country", + "safeName": "Country" + } + }, + "wireValue": "country" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "literal", + "literal": { + "type": "string", + "string": { + "original": "USA" + } + } + } + }, + "jsonExample": "USA" + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + } + }, + "jsonExample": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "owner", + "camelCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "snakeCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "screamingSnakeCase": { + "unsafeName": "OWNER", + "safeName": "OWNER" + }, + "pascalCase": { + "unsafeName": "Owner", + "safeName": "Owner" + } + }, + "wireValue": "owner" + }, + "originalTypeDeclaration": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + }, + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "line1", + "camelCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "snakeCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "screamingSnakeCase": { + "unsafeName": "LINE1", + "safeName": "LINE1" + }, + "pascalCase": { + "unsafeName": "Line1", + "safeName": "Line1" + } + }, + "wireValue": "line1" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line1" + } + } + }, + "jsonExample": "line1" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "line2", + "camelCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "snakeCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "screamingSnakeCase": { + "unsafeName": "LINE2", + "safeName": "LINE2" + }, + "pascalCase": { + "unsafeName": "Line2", + "safeName": "Line2" + } + }, + "wireValue": "line2" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line2" + } + } + }, + "jsonExample": "line2" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "line2" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "city", + "camelCase": { + "unsafeName": "city", + "safeName": "city" + }, + "snakeCase": { + "unsafeName": "city", + "safeName": "city" + }, + "screamingSnakeCase": { + "unsafeName": "CITY", + "safeName": "CITY" + }, + "pascalCase": { + "unsafeName": "City", + "safeName": "City" + } + }, + "wireValue": "city" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "city" + } + } + }, + "jsonExample": "city" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "state", + "camelCase": { + "unsafeName": "state", + "safeName": "state" + }, + "snakeCase": { + "unsafeName": "state", + "safeName": "state" + }, + "screamingSnakeCase": { + "unsafeName": "STATE", + "safeName": "STATE" + }, + "pascalCase": { + "unsafeName": "State", + "safeName": "State" + } + }, + "wireValue": "state" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "state" + } + } + }, + "jsonExample": "state" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "zip", + "camelCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "snakeCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "screamingSnakeCase": { + "unsafeName": "ZIP", + "safeName": "ZIP" + }, + "pascalCase": { + "unsafeName": "Zip", + "safeName": "Zip" + } + }, + "wireValue": "zip" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "zip" + } + } + }, + "jsonExample": "zip" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "country", + "camelCase": { + "unsafeName": "country", + "safeName": "country" + }, + "snakeCase": { + "unsafeName": "country", + "safeName": "country" + }, + "screamingSnakeCase": { + "unsafeName": "COUNTRY", + "safeName": "COUNTRY" + }, + "pascalCase": { + "unsafeName": "Country", + "safeName": "Country" + } + }, + "wireValue": "country" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "literal", + "literal": { + "type": "string", + "string": { + "original": "USA" + } + } + } + }, + "jsonExample": "USA" + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + } + }, + "jsonExample": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + }, + "propertyAccess": null + } + ], + "extraProperties": null + }, + "typeName": { + "name": { + "originalName": "Task", + "camelCase": { + "unsafeName": "task", + "safeName": "task" + }, + "snakeCase": { + "unsafeName": "task", + "safeName": "task" + }, + "screamingSnakeCase": { + "unsafeName": "TASK", + "safeName": "TASK" + }, + "pascalCase": { + "unsafeName": "Task", + "safeName": "Task" + } + }, + "fernFilepath": { + "allParts": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:Task" + } + }, + "jsonExample": { + "name": "name", + "user": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + }, + "owner": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + } + } + } + }, + "docs": null + } + } + ], + "pagination": null, + "transport": null, + "v2Examples": null, + "source": null, + "audiences": null, + "retries": null, + "apiPlayground": null, + "responseHeaders": [], + "availability": null, + "docs": null + }, + { + "id": "endpoint_System.getUser", + "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" + } + }, + "displayName": null, + "auth": false, + "security": null, + "idempotent": false, + "baseUrl": null, + "v2BaseUrls": null, + "method": "GET", + "basePath": null, + "path": { + "head": "/", + "parts": [ + { + "pathParameter": "userId", + "tail": "" + } + ] + }, + "fullPath": { + "head": "/users/", + "parts": [ + { + "pathParameter": "userId", + "tail": "" + } + ] + }, + "pathParameters": [ + { + "name": { + "originalName": "userId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "location": "ENDPOINT", + "variable": null, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + }, + "explode": null, + "docs": null + } + ], + "allPathParameters": [ + { + "name": { + "originalName": "userId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + }, + "location": "ENDPOINT", + "variable": null, + "v2Examples": { + "userSpecifiedExamples": {}, + "autogeneratedExamples": {} + }, + "explode": null, + "docs": null + } + ], + "queryParameters": [], + "headers": [], + "requestBody": null, + "v2RequestBodies": null, + "sdkRequest": null, + "response": { + "body": { + "type": "json", + "value": { + "type": "response", + "responseBodyType": { + "_type": "named", + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User", + "default": null, + "inline": null + }, + "docs": null, + "v2Examples": null + } + }, + "status-code": null, + "isWildcardStatusCode": null, + "docs": null + }, + "v2Responses": null, + "errors": [], + "userSpecifiedExamples": [], + "autogeneratedExamples": [ + { + "example": { + "id": "ca4a0ad", + "url": "/users/userId", + "name": null, + "endpointHeaders": [], + "endpointPathParameters": [ + { + "name": { + "originalName": "userId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "userId" + } + } + }, + "jsonExample": "userId" + } + } + ], + "queryParameters": [], + "servicePathParameters": [], + "serviceHeaders": [], + "rootPathParameters": [], + "request": null, + "response": { + "type": "ok", + "value": { + "type": "body", + "value": { + "shape": { + "type": "named", + "shape": { + "type": "object", + "properties": [ + { + "name": { + "name": { + "originalName": "line1", + "camelCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "snakeCase": { + "unsafeName": "line1", + "safeName": "line1" + }, + "screamingSnakeCase": { + "unsafeName": "LINE1", + "safeName": "LINE1" + }, + "pascalCase": { + "unsafeName": "Line1", + "safeName": "Line1" + } + }, + "wireValue": "line1" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line1" + } + } + }, + "jsonExample": "line1" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "line2", + "camelCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "snakeCase": { + "unsafeName": "line2", + "safeName": "line2" + }, + "screamingSnakeCase": { + "unsafeName": "LINE2", + "safeName": "LINE2" + }, + "pascalCase": { + "unsafeName": "Line2", + "safeName": "Line2" + } + }, + "wireValue": "line2" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "optional", + "optional": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "line2" + } + } + }, + "jsonExample": "line2" + }, + "valueType": { + "_type": "primitive", + "primitive": { + "v1": "STRING", + "v2": { + "type": "string", + "default": null, + "validation": null + } + } + } + } + }, + "jsonExample": "line2" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "city", + "camelCase": { + "unsafeName": "city", + "safeName": "city" + }, + "snakeCase": { + "unsafeName": "city", + "safeName": "city" + }, + "screamingSnakeCase": { + "unsafeName": "CITY", + "safeName": "CITY" + }, + "pascalCase": { + "unsafeName": "City", + "safeName": "City" + } + }, + "wireValue": "city" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "city" + } + } + }, + "jsonExample": "city" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "state", + "camelCase": { + "unsafeName": "state", + "safeName": "state" + }, + "snakeCase": { + "unsafeName": "state", + "safeName": "state" + }, + "screamingSnakeCase": { + "unsafeName": "STATE", + "safeName": "STATE" + }, + "pascalCase": { + "unsafeName": "State", + "safeName": "State" + } + }, + "wireValue": "state" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "state" + } + } + }, + "jsonExample": "state" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "zip", + "camelCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "snakeCase": { + "unsafeName": "zip", + "safeName": "zip" + }, + "screamingSnakeCase": { + "unsafeName": "ZIP", + "safeName": "ZIP" + }, + "pascalCase": { + "unsafeName": "Zip", + "safeName": "Zip" + } + }, + "wireValue": "zip" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "primitive", + "primitive": { + "type": "string", + "string": { + "original": "zip" + } + } + }, + "jsonExample": "zip" + }, + "propertyAccess": null + }, + { + "name": { + "name": { + "originalName": "country", + "camelCase": { + "unsafeName": "country", + "safeName": "country" + }, + "snakeCase": { + "unsafeName": "country", + "safeName": "country" + }, + "screamingSnakeCase": { + "unsafeName": "COUNTRY", + "safeName": "COUNTRY" + }, + "pascalCase": { + "unsafeName": "Country", + "safeName": "Country" + } + }, + "wireValue": "country" + }, + "originalTypeDeclaration": { + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" } - ], - "extraProperties": null - }, - "typeName": { - "name": { - "originalName": "User", + } + ], + "packagePath": [ + { + "originalName": "System", "camelCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "snakeCase": { - "unsafeName": "user", - "safeName": "user" + "unsafeName": "system", + "safeName": "system" }, "screamingSnakeCase": { - "unsafeName": "USER", - "safeName": "USER" + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" }, "pascalCase": { - "unsafeName": "User", - "safeName": "User" + "unsafeName": "System", + "safeName": "System" } - }, - "fernFilepath": { - "allParts": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "packagePath": [ - { - "originalName": "System", - "camelCase": { - "unsafeName": "system", - "safeName": "system" - }, - "snakeCase": { - "unsafeName": "system", - "safeName": "system" - }, - "screamingSnakeCase": { - "unsafeName": "SYSTEM", - "safeName": "SYSTEM" - }, - "pascalCase": { - "unsafeName": "System", - "safeName": "System" - } - } - ], - "file": null - }, - "displayName": null, - "typeId": "type_System:User" + } + ], + "file": null + }, + "displayName": null, + "typeId": "type_System:User" + }, + "value": { + "shape": { + "type": "container", + "container": { + "type": "literal", + "literal": { + "type": "string", + "string": { + "original": "USA" + } + } } }, - "jsonExample": { - "line1": "line1", - "line2": "line2", - "city": "city", - "state": "state", - "zip": "zip", - "country": "USA" - } + "jsonExample": "USA" }, "propertyAccess": null } @@ -6905,22 +9709,22 @@ }, "typeName": { "name": { - "originalName": "Task", + "originalName": "User", "camelCase": { - "unsafeName": "task", - "safeName": "task" + "unsafeName": "user", + "safeName": "user" }, "snakeCase": { - "unsafeName": "task", - "safeName": "task" + "unsafeName": "user", + "safeName": "user" }, "screamingSnakeCase": { - "unsafeName": "TASK", - "safeName": "TASK" + "unsafeName": "USER", + "safeName": "USER" }, "pascalCase": { - "unsafeName": "Task", - "safeName": "Task" + "unsafeName": "User", + "safeName": "User" } }, "fernFilepath": { @@ -6969,19 +9773,16 @@ "file": null }, "displayName": null, - "typeId": "type_System:Task" + "typeId": "type_System:User" } }, "jsonExample": { - "name": "name", - "user": { - "line1": "line1", - "line2": "line2", - "city": "city", - "state": "state", - "zip": "zip", - "country": "USA" - } + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" } } } @@ -7491,6 +10292,36 @@ }, "propertyAccess": null, "variable": null + }, + { + "name": { + "name": { + "originalName": "owner", + "camelCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "snakeCase": { + "unsafeName": "owner", + "safeName": "owner" + }, + "screamingSnakeCase": { + "unsafeName": "OWNER", + "safeName": "OWNER" + }, + "pascalCase": { + "unsafeName": "Owner", + "safeName": "Owner" + } + }, + "wireValue": "owner" + }, + "typeReference": { + "type": "named", + "value": "type_System:User" + }, + "propertyAccess": null, + "variable": null } ], "extends": null, @@ -8029,6 +10860,119 @@ "type": "json" }, "examples": null + }, + "endpoint_System.getUser": { + "auth": null, + "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": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "packagePath": [ + { + "originalName": "System", + "camelCase": { + "unsafeName": "system", + "safeName": "system" + }, + "snakeCase": { + "unsafeName": "system", + "safeName": "system" + }, + "screamingSnakeCase": { + "unsafeName": "SYSTEM", + "safeName": "SYSTEM" + }, + "pascalCase": { + "unsafeName": "System", + "safeName": "System" + } + } + ], + "file": null + } + }, + "location": { + "method": "GET", + "path": "/users/{userId}" + }, + "request": { + "type": "body", + "pathParameters": [ + { + "name": { + "name": { + "originalName": "userId", + "camelCase": { + "unsafeName": "userID", + "safeName": "userID" + }, + "snakeCase": { + "unsafeName": "user_id", + "safeName": "user_id" + }, + "screamingSnakeCase": { + "unsafeName": "USER_ID", + "safeName": "USER_ID" + }, + "pascalCase": { + "unsafeName": "UserID", + "safeName": "UserID" + } + }, + "wireValue": "userId" + }, + "typeReference": { + "type": "primitive", + "value": "STRING" + }, + "propertyAccess": null, + "variable": null + } + ], + "body": null + }, + "response": { + "type": "json" + }, + "examples": null } }, "pathParameters": [], diff --git a/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto b/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto index 8185518063f7..4f302a5b1c95 100644 --- a/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto +++ b/seed/csharp-model/csharp-grpc-proto-exhaustive/proto/data/v1/data.proto @@ -263,19 +263,11 @@ message DescribeResponse { } service DataService { - rpc Upload(UploadRequest) returns (UploadResponse) { - option (google.api.http) = { - post: "/data" - body: "*" - }; - } - - rpc Delete(DeleteRequest) returns (DeleteResponse) { - option (google.api.http) = { - post: "/data/delete" - body: "*" - }; - } + rpc Upload(UploadRequest) returns (UploadResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Query(QueryRequest) returns (QueryResponse); + rpc Describe(DescribeRequest) returns (DescribeResponse); + rpc Create(CreateRequest) returns (CreateResponse); rpc Fetch(FetchRequest) returns (FetchResponse) { option (google.api.http) = { @@ -289,31 +281,10 @@ service DataService { }; } - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/data/query" - body: "*" - }; - } - rpc Update(UpdateRequest) returns (UpdateResponse) { option (google.api.http) = { post: "/data/update" body: "*" }; } - - rpc Describe(DescribeRequest) returns (DescribeResponse) { - option (google.api.http) = { - post: "/data/describe" - body: "*" - }; - } - - rpc Create(CreateRequest) returns (CreateResponse) { - option (google.api.http) = { - post: "/data/create" - body: "*" - }; - } } diff --git a/seed/csharp-model/csharp-namespace-collision/src/SeedCsharpNamespaceCollision/System/Task.cs b/seed/csharp-model/csharp-namespace-collision/src/SeedCsharpNamespaceCollision/System/Task.cs index 559571aab446..e9138c8e6bec 100644 --- a/seed/csharp-model/csharp-namespace-collision/src/SeedCsharpNamespaceCollision/System/Task.cs +++ b/seed/csharp-model/csharp-namespace-collision/src/SeedCsharpNamespaceCollision/System/Task.cs @@ -18,6 +18,9 @@ public record Task : IJsonOnDeserialized [JsonPropertyName("user")] public required User User { get; set; } + [JsonPropertyName("owner")] + public required User Owner { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/reference.md b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/reference.md index 5e1114656a61..7f7febb587df 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/reference.md +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/reference.md @@ -172,6 +172,15 @@ await client.System.CreateTaskAsync( Zip = "zip", Country = "USA", }, + Owner = new global::SeedCsharpNamespaceCollision.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, } ); ``` @@ -200,3 +209,43 @@ await client.System.CreateTaskAsync( +
client.System.GetUserAsync(userId) -> WithRawResponseTask<User> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.System.GetUserAsync("userId"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**userId:** `string` + +
+
+
+
+ + +
+
+
+ diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/snippet.json b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/snippet.json index 2820720d1fe7..ae266b9b093b 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/snippet.json +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/snippet.json @@ -46,7 +46,19 @@ }, "snippet": { "type": "csharp", - "client": "using SeedCsharpNamespaceCollision;\n\nvar client = new SeedCsharpNamespaceCollisionClient();\nawait client.System.CreateTaskAsync(\n new global::SeedCsharpNamespaceCollision.System.Task\n {\n Name = \"name\",\n User = new global::SeedCsharpNamespaceCollision.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n }\n);\n" + "client": "using SeedCsharpNamespaceCollision;\n\nvar client = new SeedCsharpNamespaceCollisionClient();\nawait client.System.CreateTaskAsync(\n new global::SeedCsharpNamespaceCollision.System.Task\n {\n Name = \"name\",\n User = new global::SeedCsharpNamespaceCollision.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n Owner = new global::SeedCsharpNamespaceCollision.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n }\n);\n" + } + }, + { + "example_identifier": null, + "id": { + "path": "/users/{userId}", + "method": "GET", + "identifier_override": "endpoint_System.getUser" + }, + "snippet": { + "type": "csharp", + "client": "using SeedCsharpNamespaceCollision;\n\nvar client = new SeedCsharpNamespaceCollisionClient();\nawait client.System.GetUserAsync(\"userId\");\n" } } ] diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example3.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example3.cs index fe5dc4682351..a41a1f803bda 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example3.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example3.cs @@ -21,6 +21,14 @@ await client.System.CreateTaskAsync( State = "state", Zip = "zip", Country = "USA" + }, + Owner = new global::SeedCsharpNamespaceCollision.System.User { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA" } } ); diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example4.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example4.cs new file mode 100644 index 000000000000..107fe0e223bc --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedApi.DynamicSnippets/Example4.cs @@ -0,0 +1,19 @@ +using SeedCsharpNamespaceCollision; + +namespace Usage; + +public class Example4 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new SeedCsharpNamespaceCollisionClient( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.System.GetUserAsync( + "userId" + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/CreateTaskTest.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/CreateTaskTest.cs index b8667bd19359..9c70cc7bc11d 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/CreateTaskTest.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/CreateTaskTest.cs @@ -20,6 +20,14 @@ public class CreateTaskTest : BaseMockServerTest "state": "state", "zip": "zip", "country": "USA" + }, + "owner": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" } } """; @@ -34,6 +42,14 @@ public class CreateTaskTest : BaseMockServerTest "state": "state", "zip": "zip", "country": "USA" + }, + "owner": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" } } """; @@ -66,6 +82,15 @@ public class CreateTaskTest : BaseMockServerTest Zip = "zip", Country = "USA", }, + Owner = new SeedCsharpNamespaceCollision.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, } ); JsonAssert.AreEqual(response, mockResponse); diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/GetUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/GetUserTest.cs new file mode 100644 index 000000000000..ada5ee94eebd --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision.Test/Unit/MockServer/System/GetUserTest.cs @@ -0,0 +1,36 @@ +using NUnit.Framework; +using SeedCsharpNamespaceCollision.Test.Utils; + +namespace SeedCsharpNamespaceCollision.Test.Unit.MockServer.System; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetUserTest : BaseMockServerTest +{ + [Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string mockResponse = """ + { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + """; + + Server + .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users/userId").UsingGet()) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.System.GetUserAsync("userId"); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/ISystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/ISystemClient.cs index fc11a89a216e..bdb00578fcb1 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/ISystemClient.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/ISystemClient.cs @@ -13,4 +13,10 @@ WithRawResponseTask CreateTaskAsync( RequestOptions? options = null, CancellationToken cancellationToken = default ); + + WithRawResponseTask GetUserAsync( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); } diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/SystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/SystemClient.cs index 7be1f93373fa..9da910a01818 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/SystemClient.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/SystemClient.cs @@ -144,6 +144,71 @@ private async Task> CreateTaskAsyncCore( } } + private async Task> GetUserAsyncCore( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Get, + Path = string.Format("/users/{0}", ValueConvert.ToPathParameterString(userId)), + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedCsharpNamespaceCollisionApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedCsharpNamespaceCollisionApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + /// /// await client.System.CreateUserAsync( /// new global::SeedCsharpNamespaceCollision.System.User @@ -182,6 +247,15 @@ public WithRawResponseTask CreateUserAsync( /// Zip = "zip", /// Country = "USA", /// }, + /// Owner = new global::SeedCsharpNamespaceCollision.System.User + /// { + /// Line1 = "line1", + /// Line2 = "line2", + /// City = "city", + /// State = "state", + /// Zip = "zip", + /// Country = "USA", + /// }, /// } /// ); /// @@ -195,4 +269,16 @@ public WithRawResponseTask CreateTaskAsync( CreateTaskAsyncCore(request, options, cancellationToken) ); } + + /// + /// await client.System.GetUserAsync("userId"); + /// + public WithRawResponseTask GetUserAsync( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask(GetUserAsyncCore(userId, options, cancellationToken)); + } } diff --git a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/Types/Task.cs index 4c2280792eb4..7651fcc63cfd 100644 --- a/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/Types/Task.cs +++ b/seed/csharp-sdk/csharp-namespace-collision/fully-qualified-namespaces/src/SeedCsharpNamespaceCollision/System/Types/Task.cs @@ -17,6 +17,9 @@ public record Task : IJsonOnDeserialized [JsonPropertyName("user")] public required User User { get; set; } + [JsonPropertyName("owner")] + public required User Owner { get; set; } + [JsonIgnore] public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.editorconfig b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.editorconfig new file mode 100644 index 000000000000..1e7a0adbac80 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.editorconfig @@ -0,0 +1,35 @@ +root = true + +[*.cs] +resharper_arrange_object_creation_when_type_evident_highlighting = hint +resharper_auto_property_can_be_made_get_only_global_highlighting = hint +resharper_check_namespace_highlighting = hint +resharper_class_never_instantiated_global_highlighting = hint +resharper_class_never_instantiated_local_highlighting = hint +resharper_collection_never_updated_global_highlighting = hint +resharper_convert_type_check_pattern_to_null_check_highlighting = hint +resharper_inconsistent_naming_highlighting = hint +resharper_member_can_be_private_global_highlighting = hint +resharper_member_hides_static_from_outer_class_highlighting = hint +resharper_not_accessed_field_local_highlighting = hint +resharper_nullable_warning_suppression_is_used_highlighting = suggestion +resharper_partial_type_with_single_part_highlighting = hint +resharper_prefer_concrete_value_over_default_highlighting = none +resharper_private_field_can_be_converted_to_local_variable_highlighting = hint +resharper_property_can_be_made_init_only_global_highlighting = hint +resharper_property_can_be_made_init_only_local_highlighting = hint +resharper_redundant_name_qualifier_highlighting = none +resharper_redundant_using_directive_highlighting = hint +resharper_replace_slice_with_range_indexer_highlighting = none +resharper_unused_auto_property_accessor_global_highlighting = hint +resharper_unused_auto_property_accessor_local_highlighting = hint +resharper_unused_member_global_highlighting = hint +resharper_unused_type_global_highlighting = hint +resharper_use_string_interpolation_highlighting = hint +dotnet_diagnostic.CS1591.severity = suggestion + +[src/**/Types/*.cs] +resharper_check_namespace_highlighting = none + +[src/**/Core/Public/*.cs] +resharper_check_namespace_highlighting = none \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.fern/metadata.json b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.fern/metadata.json new file mode 100644 index 000000000000..08007fbcc0c8 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.fern/metadata.json @@ -0,0 +1,13 @@ +{ + "cliVersion": "DUMMY", + "generatorName": "fernapi/fern-csharp-sdk", + "generatorVersion": "latest", + "generatorConfig": { + "namespace": "Contoso.Net", + "client-class-name": "Contoso", + "explicit-namespaces": true, + "experimental-fully-qualified-namespaces": true + }, + "originGitCommit": "DUMMY", + "sdkVersion": "0.0.1" +} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.github/workflows/ci.yml b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.github/workflows/ci.yml new file mode 100644 index 000000000000..a77c0c0e6af6 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: ci + +on: [push] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +env: + DOTNET_NOLOGO: true + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.x + + - name: Install tools + run: dotnet tool restore + + - name: Restore dependencies + run: dotnet restore src/Contoso.Net/Contoso.Net.csproj + + - name: Build + run: dotnet build src/Contoso.Net/Contoso.Net.csproj --no-restore -c Release + + - name: Restore test dependencies + run: dotnet restore src/Contoso.Net.Test/Contoso.Net.Test.csproj + + - name: Build tests + run: dotnet build src/Contoso.Net.Test/Contoso.Net.Test.csproj --no-restore -c Release + + - name: Test + run: dotnet test src/Contoso.Net.Test/Contoso.Net.Test.csproj --no-restore --no-build -c Release + + - name: Pack + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + run: dotnet pack src/Contoso.Net/Contoso.Net.csproj --no-build --no-restore -c Release + + - name: Publish to NuGet.org + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_TOKEN }} + run: dotnet nuget push src/Contoso.Net/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org" + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.gitignore b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.gitignore new file mode 100644 index 000000000000..11014f2b33d7 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/.gitignore @@ -0,0 +1,484 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +## This is based on `dotnet new gitignore` and customized by Fern + +# dotenv files +.env + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +# [Rr]elease/ (Ignored by Fern) +# [Rr]eleases/ (Ignored by Fern) +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +# [Ll]og/ (Ignored by Fern) +# [Ll]ogs/ (Ignored by Fern) + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/Contoso.Net.slnx b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/Contoso.Net.slnx new file mode 100644 index 000000000000..5ab3ac53fcc1 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/Contoso.Net.slnx @@ -0,0 +1,4 @@ + + + + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md new file mode 100644 index 000000000000..98ab45a85b57 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/README.md @@ -0,0 +1,178 @@ +# Seed C# Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=Seed%2FC%23) +[![nuget shield](https://img.shields.io/nuget/v/Contoso.Net)](https://nuget.org/packages/Contoso.Net) + +The Seed C# library provides convenient access to the Seed APIs from C#. + +## Table of Contents + +- [Requirements](#requirements) +- [Installation](#installation) +- [Reference](#reference) +- [Usage](#usage) +- [Exception Handling](#exception-handling) +- [Advanced](#advanced) + - [Retries](#retries) + - [Timeouts](#timeouts) + - [Raw Response](#raw-response) + - [Additional Headers](#additional-headers) + - [Additional Query Parameters](#additional-query-parameters) +- [Contributing](#contributing) + +## Requirements + +This SDK requires: + +## Installation + +```sh +dotnet add package Contoso.Net +``` + +## Reference + +A full reference for this library is available [here](./reference.md). + +## Usage + +Instantiate and use the client with the following: + +```csharp +using Contoso.Net; + +var client = new Contoso(); +await client.CreateUserAsync( + new global::Contoso.Net.User + { + Id = "id", + Name = "name", + Email = "email", + Password = "password", + } +); +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```csharp +using Contoso.Net; + +try { + var response = await client.CreateUserAsync(...); +} catch (ContosoApiException e) { + System.Console.WriteLine(e.Body); + System.Console.WriteLine(e.StatusCode); +} +``` + +## Advanced + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retryable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retryable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `MaxRetries` request option to configure this behavior. + +```csharp +var response = await client.CreateUserAsync( + ..., + new RequestOptions { + MaxRetries: 0 // Override MaxRetries at the request level + } +); +``` + +### Timeouts + +The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. + +```csharp +var response = await client.CreateUserAsync( + ..., + new RequestOptions { + Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s + } +); +``` + +### Raw Response + +Access raw HTTP response data (status code, headers, URL) alongside parsed response data using the `.WithRawResponse()` method. + +```csharp +using Contoso.Net; + +// Access raw response data (status code, headers, etc.) alongside the parsed response +var result = await client.CreateUserAsync(...).WithRawResponse(); + +// Access the parsed data +var data = result.Data; + +// Access raw response metadata +var statusCode = result.RawResponse.StatusCode; +var headers = result.RawResponse.Headers; +var url = result.RawResponse.Url; + +// Access specific headers (case-insensitive) +if (headers.TryGetValue("X-Request-Id", out var requestId)) +{ + System.Console.WriteLine($"Request ID: {requestId}"); +} + +// For the default behavior, simply await without .WithRawResponse() +var data = await client.CreateUserAsync(...); +``` + +### Additional Headers + +If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option. + +```csharp +var response = await client.CreateUserAsync( + ..., + new RequestOptions { + AdditionalHeaders = new Dictionary + { + { "X-Custom-Header", "custom-value" } + } + } +); +``` + +### Additional Query Parameters + +If you would like to send additional query parameters as part of the request, use the `AdditionalQueryParameters` request option. + +```csharp +var response = await client.CreateUserAsync( + ..., + new RequestOptions { + AdditionalQueryParameters = new Dictionary + { + { "custom_param", "custom-value" } + } + } +); +``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/reference.md b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/reference.md new file mode 100644 index 000000000000..ae31d966b785 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/reference.md @@ -0,0 +1,251 @@ +# Reference +
client.CreateUserAsync(User { ... }) -> WithRawResponseTask<User> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.CreateUserAsync( + new global::Contoso.Net.User + { + Id = "id", + Name = "name", + Email = "email", + Password = "password", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `User` + +
+
+
+
+ + +
+
+
+ +
client.CreateTaskAsync(Task { ... }) -> WithRawResponseTask<Task> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.CreateTaskAsync( + new global::Contoso.Net.Task + { + Id = "id", + Name = "name", + Email = "email", + Password = "password", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Task` + +
+
+
+
+ + +
+
+
+ +## System +
client.System.CreateUserAsync(User { ... }) -> WithRawResponseTask<User> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.System.CreateUserAsync( + new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `User` + +
+
+
+
+ + +
+
+
+ +
client.System.CreateTaskAsync(Task { ... }) -> WithRawResponseTask<Task> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.System.CreateTaskAsync( + new global::Contoso.Net.System.Task + { + Name = "name", + User = new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, + Owner = new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Task` + +
+
+
+
+ + +
+
+
+ +
client.System.GetUserAsync(userId) -> WithRawResponseTask<User> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.System.GetUserAsync("userId"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**userId:** `string` + +
+
+
+
+ + +
+
+
+ diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json new file mode 100644 index 000000000000..31cd30b1d86e --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/snippet.json @@ -0,0 +1,65 @@ +{ + "types": {}, + "endpoints": [ + { + "example_identifier": null, + "id": { + "path": "/users", + "method": "POST", + "identifier_override": "endpoint_.createUser" + }, + "snippet": { + "type": "csharp", + "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.CreateUserAsync(\n new global::Contoso.Net.User\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" + } + }, + { + "example_identifier": null, + "id": { + "path": "/users", + "method": "POST", + "identifier_override": "endpoint_.createTask" + }, + "snippet": { + "type": "csharp", + "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.CreateTaskAsync(\n new global::Contoso.Net.Task\n {\n Id = \"id\",\n Name = \"name\",\n Email = \"email\",\n Password = \"password\",\n }\n);\n" + } + }, + { + "example_identifier": null, + "id": { + "path": "/users", + "method": "POST", + "identifier_override": "endpoint_System.createUser" + }, + "snippet": { + "type": "csharp", + "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.CreateUserAsync(\n new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n }\n);\n" + } + }, + { + "example_identifier": null, + "id": { + "path": "/users", + "method": "POST", + "identifier_override": "endpoint_System.createTask" + }, + "snippet": { + "type": "csharp", + "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.CreateTaskAsync(\n new global::Contoso.Net.System.Task\n {\n Name = \"name\",\n User = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n Owner = new global::Contoso.Net.System.User\n {\n Line1 = \"line1\",\n Line2 = \"line2\",\n City = \"city\",\n State = \"state\",\n Zip = \"zip\",\n Country = \"USA\",\n },\n }\n);\n" + } + }, + { + "example_identifier": null, + "id": { + "path": "/users/{userId}", + "method": "GET", + "identifier_override": "endpoint_System.getUser" + }, + "snippet": { + "type": "csharp", + "client": "using Contoso.Net;\n\nvar client = new Contoso();\nawait client.System.GetUserAsync(\"userId\");\n" + } + } + ] +} \ No newline at end of file diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.Custom.props b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.Custom.props new file mode 100644 index 000000000000..aac9b5020d80 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.Custom.props @@ -0,0 +1,6 @@ + + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.csproj b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.csproj new file mode 100644 index 000000000000..5aaec94f808b --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Contoso.Net.Test.csproj @@ -0,0 +1,39 @@ + + + net8.0 + 12 + enable + enable + false + true + true + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/HeadersBuilderTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/HeadersBuilderTests.cs new file mode 100644 index 000000000000..cf28fea90429 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/HeadersBuilderTests.cs @@ -0,0 +1,326 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core; + +[TestFixture] +public class HeadersBuilderTests +{ + [Test] + public async global::System.Threading.Tasks.Task Add_SimpleHeaders() + { + var headers = await new HeadersBuilder.Builder() + .Add("Content-Type", "application/json") + .Add("Authorization", "Bearer token123") + .Add("X-API-Key", "key456") + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(3)); + Assert.That(headers["Content-Type"], Is.EqualTo("application/json")); + Assert.That(headers["Authorization"], Is.EqualTo("Bearer token123")); + Assert.That(headers["X-API-Key"], Is.EqualTo("key456")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_NullValuesIgnored() + { + var headers = await new HeadersBuilder.Builder() + .Add("Header1", "value1") + .Add("Header2", null) + .Add("Header3", "value3") + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(2)); + Assert.That(headers.ContainsKey("Header1"), Is.True); + Assert.That(headers.ContainsKey("Header2"), Is.False); + Assert.That(headers.ContainsKey("Header3"), Is.True); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_OverwritesExistingHeader() + { + var headers = await new HeadersBuilder.Builder() + .Add("Content-Type", "application/json") + .Add("Content-Type", "application/xml") + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(1)); + Assert.That(headers["Content-Type"], Is.EqualTo("application/xml")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_HeadersOverload_MergesExistingHeaders() + { + var existingHeaders = new Headers( + new Dictionary { { "Header1", "value1" }, { "Header2", "value2" } } + ); + + var result = await new HeadersBuilder.Builder() + .Add("Header3", "value3") + .Add(existingHeaders) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result.Count, Is.EqualTo(3)); + Assert.That(result["Header1"], Is.EqualTo("value1")); + Assert.That(result["Header2"], Is.EqualTo("value2")); + Assert.That(result["Header3"], Is.EqualTo("value3")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_HeadersOverload_OverwritesExistingHeaders() + { + var existingHeaders = new Headers( + new Dictionary { { "Header1", "override" } } + ); + + var result = await new HeadersBuilder.Builder() + .Add("Header1", "original") + .Add("Header2", "keep") + .Add(existingHeaders) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result.Count, Is.EqualTo(2)); + Assert.That(result["Header1"], Is.EqualTo("override")); + Assert.That(result["Header2"], Is.EqualTo("keep")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_HeadersOverload_NullHeadersIgnored() + { + var result = await new HeadersBuilder.Builder() + .Add("Header1", "value1") + .Add((Headers?)null) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result.Count, Is.EqualTo(1)); + Assert.That(result["Header1"], Is.EqualTo("value1")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_KeyValuePairOverload_AddsHeaders() + { + var additionalHeaders = new List> + { + new("Header1", "value1"), + new("Header2", "value2"), + }; + + var headers = await new HeadersBuilder.Builder() + .Add("Header3", "value3") + .Add(additionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(3)); + Assert.That(headers["Header1"], Is.EqualTo("value1")); + Assert.That(headers["Header2"], Is.EqualTo("value2")); + Assert.That(headers["Header3"], Is.EqualTo("value3")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_KeyValuePairOverload_IgnoresNullValues() + { + var additionalHeaders = new List> + { + new("Header1", "value1"), + new("Header2", null), // Should be ignored + }; + + var headers = await new HeadersBuilder.Builder() + .Add(additionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(1)); + Assert.That(headers.ContainsKey("Header2"), Is.False); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_DictionaryOverload_AddsHeaders() + { + var dict = new Dictionary + { + { "Header1", "value1" }, + { "Header2", "value2" }, + }; + + var headers = await new HeadersBuilder.Builder() + .Add("Header3", "value3") + .Add(dict) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(3)); + Assert.That(headers["Header1"], Is.EqualTo("value1")); + Assert.That(headers["Header2"], Is.EqualTo("value2")); + Assert.That(headers["Header3"], Is.EqualTo("value3")); + } + + [Test] + public async global::System.Threading.Tasks.Task EmptyBuilder_ReturnsEmptyHeaders() + { + var headers = await new HeadersBuilder.Builder().BuildAsync().ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(0)); + } + + [Test] + public async global::System.Threading.Tasks.Task OnlyNullValues_ReturnsEmptyHeaders() + { + var headers = await new HeadersBuilder.Builder() + .Add("Header1", null) + .Add("Header2", null) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(0)); + } + + [Test] + public async global::System.Threading.Tasks.Task ComplexMergingScenario() + { + // Simulates real SDK usage: endpoint headers + client headers + request options + var clientHeaders = new Headers( + new Dictionary + { + { "X-Client-Version", "1.0.0" }, + { "User-Agent", "MyClient/1.0" }, + } + ); + + var clientAdditionalHeaders = new List> + { + new("X-Custom-Header", "custom-value"), + }; + + var requestOptionsHeaders = new Headers( + new Dictionary + { + { "Authorization", "Bearer user-token" }, + { "User-Agent", "MyClient/2.0" }, // Override + } + ); + + var requestAdditionalHeaders = new List> + { + new("X-Request-ID", "req-123"), + new("X-Custom-Header", "overridden-value"), // Override + }; + + var headers = await new HeadersBuilder.Builder() + .Add("Content-Type", "application/json") // Endpoint header + .Add("X-Endpoint-ID", "endpoint-1") + .Add(clientHeaders) + .Add(clientAdditionalHeaders) + .Add(requestOptionsHeaders) + .Add(requestAdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + + // Verify precedence + Assert.That(headers["Content-Type"], Is.EqualTo("application/json")); + Assert.That(headers["X-Endpoint-ID"], Is.EqualTo("endpoint-1")); + Assert.That(headers["X-Client-Version"], Is.EqualTo("1.0.0")); + Assert.That(headers["User-Agent"], Is.EqualTo("MyClient/2.0")); // Overridden + Assert.That(headers["Authorization"], Is.EqualTo("Bearer user-token")); + Assert.That(headers["X-Request-ID"], Is.EqualTo("req-123")); + Assert.That(headers["X-Custom-Header"], Is.EqualTo("overridden-value")); // Overridden + } + + [Test] + public async global::System.Threading.Tasks.Task Builder_WithCapacity() + { + // Test that capacity constructor works without errors + var headers = await new HeadersBuilder.Builder(capacity: 10) + .Add("Header1", "value1") + .Add("Header2", "value2") + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(2)); + Assert.That(headers["Header1"], Is.EqualTo("value1")); + Assert.That(headers["Header2"], Is.EqualTo("value2")); + } + + [Test] + public async global::System.Threading.Tasks.Task Add_HeadersOverload_ResolvesDynamicHeaderValues() + { + // Test that BuildAsync properly resolves HeaderValue instances + var existingHeaders = new Headers(); + existingHeaders["DynamicHeader"] = + (Func>)( + () => global::System.Threading.Tasks.Task.FromResult("dynamic-value") + ); + + var result = await new HeadersBuilder.Builder() + .Add("StaticHeader", "static-value") + .Add(existingHeaders) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result.Count, Is.EqualTo(2)); + Assert.That(result["StaticHeader"], Is.EqualTo("static-value")); + Assert.That(result["DynamicHeader"], Is.EqualTo("dynamic-value")); + } + + [Test] + public async global::System.Threading.Tasks.Task MultipleSyncAdds() + { + var headers1 = new Headers(new Dictionary { { "H1", "v1" } }); + var headers2 = new Headers(new Dictionary { { "H2", "v2" } }); + var headers3 = new Headers(new Dictionary { { "H3", "v3" } }); + + var result = await new HeadersBuilder.Builder() + .Add(headers1) + .Add(headers2) + .Add(headers3) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result.Count, Is.EqualTo(3)); + Assert.That(result["H1"], Is.EqualTo("v1")); + Assert.That(result["H2"], Is.EqualTo("v2")); + Assert.That(result["H3"], Is.EqualTo("v3")); + } + + [Test] + public async global::System.Threading.Tasks.Task PrecedenceOrder_LatestWins() + { + // Test that later operations override earlier ones + var headers1 = new Headers(new Dictionary { { "Key", "value1" } }); + var headers2 = new Headers(new Dictionary { { "Key", "value2" } }); + var additional = new List> { new("Key", "value3") }; + + var result = await new HeadersBuilder.Builder() + .Add("Key", "value0") + .Add(headers1) + .Add(headers2) + .Add(additional) + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(result["Key"], Is.EqualTo("value3")); + } + + [Test] + public async global::System.Threading.Tasks.Task CaseInsensitiveKeys() + { + // Test that header keys are case-insensitive + var headers = await new HeadersBuilder.Builder() + .Add("content-type", "application/json") + .Add("Content-Type", "application/xml") // Should overwrite + .BuildAsync() + .ConfigureAwait(false); + + Assert.That(headers.Count, Is.EqualTo(1)); + Assert.That(headers["content-type"], Is.EqualTo("application/xml")); + Assert.That(headers["Content-Type"], Is.EqualTo("application/xml")); + Assert.That(headers["CONTENT-TYPE"], Is.EqualTo("application/xml")); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/AdditionalPropertiesTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/AdditionalPropertiesTests.cs new file mode 100644 index 000000000000..77b10cf56bce --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/AdditionalPropertiesTests.cs @@ -0,0 +1,365 @@ +using Contoso.Net.Core; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core.Json; + +[TestFixture] +public class AdditionalPropertiesTests +{ + [Test] + public void Record_OnDeserialized_ShouldPopulateAdditionalProperties() + { + // Arrange + const string json = """ + { + "id": "1", + "category": "fiction", + "title": "The Hobbit" + } + """; + + // Act + var record = JsonUtils.Deserialize(json); + + // Assert + Assert.That(record, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(record.Id, Is.EqualTo("1")); + Assert.That(record.AdditionalProperties["category"].GetString(), Is.EqualTo("fiction")); + Assert.That(record.AdditionalProperties["title"].GetString(), Is.EqualTo("The Hobbit")); + }); + } + + [Test] + public void RecordWithWriteableAdditionalProperties_OnSerialization_ShouldIncludeAdditionalProperties() + { + // Arrange + var record = new WriteableRecord + { + Id = "1", + AdditionalProperties = { ["category"] = "fiction", ["title"] = "The Hobbit" }, + }; + + // Act + var json = JsonUtils.Serialize(record); + var deserializedRecord = JsonUtils.Deserialize(json); + + // Assert + Assert.That(deserializedRecord, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(deserializedRecord.Id, Is.EqualTo("1")); + Assert.That( + deserializedRecord.AdditionalProperties["category"], + Is.InstanceOf() + ); + Assert.That( + ((JsonElement)deserializedRecord.AdditionalProperties["category"]!).GetString(), + Is.EqualTo("fiction") + ); + Assert.That( + deserializedRecord.AdditionalProperties["title"], + Is.InstanceOf() + ); + Assert.That( + ((JsonElement)deserializedRecord.AdditionalProperties["title"]!).GetString(), + Is.EqualTo("The Hobbit") + ); + }); + } + + [Test] + public void ReadOnlyAdditionalProperties_ShouldRetrieveValuesCorrectly() + { + // Arrange + var extensionData = new Dictionary + { + ["key1"] = JsonUtils.SerializeToElement("value1"), + ["key2"] = JsonUtils.SerializeToElement(123), + }; + var readOnlyProps = new ReadOnlyAdditionalProperties(); + readOnlyProps.CopyFromExtensionData(extensionData); + + // Act & Assert + Assert.That(readOnlyProps["key1"].GetString(), Is.EqualTo("value1")); + Assert.That(readOnlyProps["key2"].GetInt32(), Is.EqualTo(123)); + } + + [Test] + public void AdditionalProperties_ShouldBehaveAsDictionary() + { + // Arrange + var additionalProps = new AdditionalProperties { ["key1"] = "value1", ["key2"] = 123 }; + + // Act + additionalProps["key3"] = true; + + // Assert + Assert.Multiple(() => + { + Assert.That(additionalProps["key1"], Is.EqualTo("value1")); + Assert.That(additionalProps["key2"], Is.EqualTo(123)); + Assert.That((bool)additionalProps["key3"]!, Is.True); + Assert.That(additionalProps.Count, Is.EqualTo(3)); + }); + } + + [Test] + public void AdditionalProperties_ToJsonObject_ShouldSerializeCorrectly() + { + // Arrange + var additionalProps = new AdditionalProperties { ["key1"] = "value1", ["key2"] = 123 }; + + // Act + var jsonObject = additionalProps.ToJsonObject(); + + Assert.Multiple(() => + { + // Assert + Assert.That(jsonObject["key1"]!.GetValue(), Is.EqualTo("value1")); + Assert.That(jsonObject["key2"]!.GetValue(), Is.EqualTo(123)); + }); + } + + [Test] + public void AdditionalProperties_MixReadAndWrite_ShouldOverwriteDeserializedProperty() + { + // Arrange + const string json = """ + { + "id": "1", + "category": "fiction", + "title": "The Hobbit" + } + """; + var record = JsonUtils.Deserialize(json); + + // Act + record.AdditionalProperties["category"] = "non-fiction"; + + // Assert + Assert.Multiple(() => + { + Assert.That(record, Is.Not.Null); + Assert.That(record.Id, Is.EqualTo("1")); + Assert.That(record.AdditionalProperties["category"], Is.EqualTo("non-fiction")); + Assert.That(record.AdditionalProperties["title"], Is.InstanceOf()); + Assert.That( + ((JsonElement)record.AdditionalProperties["title"]!).GetString(), + Is.EqualTo("The Hobbit") + ); + }); + } + + [Test] + public void RecordWithReadonlyAdditionalPropertiesInts_OnDeserialized_ShouldPopulateAdditionalProperties() + { + // Arrange + const string json = """ + { + "extra1": 42, + "extra2": 99 + } + """; + + // Act + var record = JsonUtils.Deserialize(json); + + // Assert + Assert.That(record, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(record.AdditionalProperties["extra1"], Is.EqualTo(42)); + Assert.That(record.AdditionalProperties["extra2"], Is.EqualTo(99)); + }); + } + + [Test] + public void RecordWithAdditionalPropertiesInts_OnSerialization_ShouldIncludeAdditionalProperties() + { + // Arrange + var record = new WriteableRecordWithInts + { + AdditionalProperties = { ["extra1"] = 42, ["extra2"] = 99 }, + }; + + // Act + var json = JsonUtils.Serialize(record); + var deserializedRecord = JsonUtils.Deserialize(json); + + // Assert + Assert.That(deserializedRecord, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(deserializedRecord.AdditionalProperties["extra1"], Is.EqualTo(42)); + Assert.That(deserializedRecord.AdditionalProperties["extra2"], Is.EqualTo(99)); + }); + } + + [Test] + public void RecordWithReadonlyAdditionalPropertiesDictionaries_OnDeserialized_ShouldPopulateAdditionalProperties() + { + // Arrange + const string json = """ + { + "extra1": { "key1": true, "key2": false }, + "extra2": { "key3": true } + } + """; + + // Act + var record = JsonUtils.Deserialize(json); + + // Assert + Assert.That(record, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(record.AdditionalProperties["extra1"]["key1"], Is.True); + Assert.That(record.AdditionalProperties["extra1"]["key2"], Is.False); + Assert.That(record.AdditionalProperties["extra2"]["key3"], Is.True); + }); + } + + [Test] + public void RecordWithAdditionalPropertiesDictionaries_OnSerialization_ShouldIncludeAdditionalProperties() + { + // Arrange + var record = new WriteableRecordWithDictionaries + { + AdditionalProperties = + { + ["extra1"] = new Dictionary { { "key1", true }, { "key2", false } }, + ["extra2"] = new Dictionary { { "key3", true } }, + }, + }; + + // Act + var json = JsonUtils.Serialize(record); + var deserializedRecord = JsonUtils.Deserialize(json); + + // Assert + Assert.That(deserializedRecord, Is.Not.Null); + Assert.Multiple(() => + { + Assert.That(deserializedRecord.AdditionalProperties["extra1"]["key1"], Is.True); + Assert.That(deserializedRecord.AdditionalProperties["extra1"]["key2"], Is.False); + Assert.That(deserializedRecord.AdditionalProperties["extra2"]["key3"], Is.True); + }); + } + + private record Record : IJsonOnDeserialized + { + [JsonPropertyName("id")] + public required string Id { get; set; } + + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + } + + private record WriteableRecord : IJsonOnDeserialized, IJsonOnSerializing + { + [JsonPropertyName("id")] + public required string Id { get; set; } + + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public AdditionalProperties AdditionalProperties { get; set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + + void IJsonOnSerializing.OnSerializing() + { + AdditionalProperties.CopyToExtensionData(_extensionData); + } + } + + private record RecordWithInts : IJsonOnDeserialized + { + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + } + + private record WriteableRecordWithInts : IJsonOnDeserialized, IJsonOnSerializing + { + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public AdditionalProperties AdditionalProperties { get; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + + void IJsonOnSerializing.OnSerializing() + { + AdditionalProperties.CopyToExtensionData(_extensionData); + } + } + + private record RecordWithDictionaries : IJsonOnDeserialized + { + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public ReadOnlyAdditionalProperties< + Dictionary + > AdditionalProperties { get; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + } + + private record WriteableRecordWithDictionaries : IJsonOnDeserialized, IJsonOnSerializing + { + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonIgnore] + public AdditionalProperties> AdditionalProperties { get; } = new(); + + void IJsonOnDeserialized.OnDeserialized() + { + AdditionalProperties.CopyFromExtensionData(_extensionData); + } + + void IJsonOnSerializing.OnSerializing() + { + AdditionalProperties.CopyToExtensionData(_extensionData); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateOnlyJsonTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateOnlyJsonTests.cs new file mode 100644 index 000000000000..3816930fca60 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateOnlyJsonTests.cs @@ -0,0 +1,76 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core.Json; + +[TestFixture] +public class DateOnlyJsonTests +{ + [Test] + public void SerializeDateOnly_ShouldMatchExpectedFormat() + { + (DateOnly dateOnly, string expected)[] testCases = + [ + (new DateOnly(2023, 10, 5), "\"2023-10-05\""), + (new DateOnly(2023, 1, 1), "\"2023-01-01\""), + (new DateOnly(2023, 12, 31), "\"2023-12-31\""), + (new DateOnly(2023, 6, 15), "\"2023-06-15\""), + (new DateOnly(2023, 3, 10), "\"2023-03-10\""), + ]; + foreach (var (dateOnly, expected) in testCases) + { + var json = JsonUtils.Serialize(dateOnly); + Assert.That(json, Is.EqualTo(expected)); + } + } + + [Test] + public void DeserializeDateOnly_ShouldMatchExpectedDateOnly() + { + (DateOnly expected, string json)[] testCases = + [ + (new DateOnly(2023, 10, 5), "\"2023-10-05\""), + (new DateOnly(2023, 1, 1), "\"2023-01-01\""), + (new DateOnly(2023, 12, 31), "\"2023-12-31\""), + (new DateOnly(2023, 6, 15), "\"2023-06-15\""), + (new DateOnly(2023, 3, 10), "\"2023-03-10\""), + ]; + + foreach (var (expected, json) in testCases) + { + var dateOnly = JsonUtils.Deserialize(json); + Assert.That(dateOnly, Is.EqualTo(expected)); + } + } + + [Test] + public void SerializeNullableDateOnly_ShouldMatchExpectedFormat() + { + (DateOnly? dateOnly, string expected)[] testCases = + [ + (new DateOnly(2023, 10, 5), "\"2023-10-05\""), + (null, "null"), + ]; + foreach (var (dateOnly, expected) in testCases) + { + var json = JsonUtils.Serialize(dateOnly); + Assert.That(json, Is.EqualTo(expected)); + } + } + + [Test] + public void DeserializeNullableDateOnly_ShouldMatchExpectedDateOnly() + { + (DateOnly? expected, string json)[] testCases = + [ + (new DateOnly(2023, 10, 5), "\"2023-10-05\""), + (null, "null"), + ]; + + foreach (var (expected, json) in testCases) + { + var dateOnly = JsonUtils.Deserialize(json); + Assert.That(dateOnly, Is.EqualTo(expected)); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateTimeJsonTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateTimeJsonTests.cs new file mode 100644 index 000000000000..2a69511565f2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/DateTimeJsonTests.cs @@ -0,0 +1,110 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core.Json; + +[TestFixture] +public class DateTimeJsonTests +{ + [Test] + public void SerializeDateTime_ShouldMatchExpectedFormat() + { + (DateTime dateTime, string expected)[] testCases = + [ + ( + new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc), + "\"2023-10-05T14:30:00.000Z\"" + ), + (new DateTime(2023, 1, 1, 0, 0, 0, DateTimeKind.Utc), "\"2023-01-01T00:00:00.000Z\""), + ( + new DateTime(2023, 12, 31, 23, 59, 59, DateTimeKind.Utc), + "\"2023-12-31T23:59:59.000Z\"" + ), + (new DateTime(2023, 6, 15, 12, 0, 0, DateTimeKind.Utc), "\"2023-06-15T12:00:00.000Z\""), + ( + new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc), + "\"2023-03-10T08:45:30.000Z\"" + ), + ( + new DateTime(2023, 3, 10, 8, 45, 30, 123, DateTimeKind.Utc), + "\"2023-03-10T08:45:30.123Z\"" + ), + ]; + foreach (var (dateTime, expected) in testCases) + { + var json = JsonUtils.Serialize(dateTime); + Assert.That(json, Is.EqualTo(expected)); + } + } + + [Test] + public void DeserializeDateTime_ShouldMatchExpectedDateTime() + { + (DateTime expected, string json)[] testCases = + [ + ( + new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc), + "\"2023-10-05T14:30:00.000Z\"" + ), + (new DateTime(2023, 1, 1, 0, 0, 0, DateTimeKind.Utc), "\"2023-01-01T00:00:00.000Z\""), + ( + new DateTime(2023, 12, 31, 23, 59, 59, DateTimeKind.Utc), + "\"2023-12-31T23:59:59.000Z\"" + ), + (new DateTime(2023, 6, 15, 12, 0, 0, DateTimeKind.Utc), "\"2023-06-15T12:00:00.000Z\""), + ( + new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc), + "\"2023-03-10T08:45:30.000Z\"" + ), + (new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc), "\"2023-03-10T08:45:30Z\""), + ( + new DateTime(2023, 3, 10, 8, 45, 30, 123, DateTimeKind.Utc), + "\"2023-03-10T08:45:30.123Z\"" + ), + ]; + + foreach (var (expected, json) in testCases) + { + var dateTime = JsonUtils.Deserialize(json); + Assert.That(dateTime, Is.EqualTo(expected)); + } + } + + [Test] + public void SerializeNullableDateTime_ShouldMatchExpectedFormat() + { + (DateTime? expected, string json)[] testCases = + [ + ( + new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc), + "\"2023-10-05T14:30:00.000Z\"" + ), + (null, "null"), + ]; + + foreach (var (expected, json) in testCases) + { + var dateTime = JsonUtils.Deserialize(json); + Assert.That(dateTime, Is.EqualTo(expected)); + } + } + + [Test] + public void DeserializeNullableDateTime_ShouldMatchExpectedDateTime() + { + (DateTime? expected, string json)[] testCases = + [ + ( + new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc), + "\"2023-10-05T14:30:00.000Z\"" + ), + (null, "null"), + ]; + + foreach (var (expected, json) in testCases) + { + var dateTime = JsonUtils.Deserialize(json); + Assert.That(dateTime, Is.EqualTo(expected)); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/JsonAccessAttributeTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/JsonAccessAttributeTests.cs new file mode 100644 index 000000000000..551840392eb2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/Json/JsonAccessAttributeTests.cs @@ -0,0 +1,160 @@ +using Contoso.Net.Core; +using global::System.Text.Json.Serialization; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core.Json; + +[TestFixture] +public class JsonAccessAttributeTests +{ + private class MyClass + { + [JsonPropertyName("read_only_prop")] + [JsonAccess(JsonAccessType.ReadOnly)] + public string? ReadOnlyProp { get; set; } + + [JsonPropertyName("write_only_prop")] + [JsonAccess(JsonAccessType.WriteOnly)] + public string? WriteOnlyProp { get; set; } + + [JsonPropertyName("normal_prop")] + public string? NormalProp { get; set; } + + [JsonPropertyName("read_only_nullable_list")] + [JsonAccess(JsonAccessType.ReadOnly)] + public IEnumerable? ReadOnlyNullableList { get; set; } + + [JsonPropertyName("read_only_list")] + [JsonAccess(JsonAccessType.ReadOnly)] + public IEnumerable ReadOnlyList { get; set; } = []; + + [JsonPropertyName("write_only_nullable_list")] + [JsonAccess(JsonAccessType.WriteOnly)] + public IEnumerable? WriteOnlyNullableList { get; set; } + + [JsonPropertyName("write_only_list")] + [JsonAccess(JsonAccessType.WriteOnly)] + public IEnumerable WriteOnlyList { get; set; } = []; + + [JsonPropertyName("normal_list")] + public IEnumerable NormalList { get; set; } = []; + + [JsonPropertyName("normal_nullable_list")] + public IEnumerable? NullableNormalList { get; set; } + } + + [Test] + public void JsonAccessAttribute_ShouldWorkAsExpected() + { + const string json = """ + { + "read_only_prop": "read", + "write_only_prop": "write", + "normal_prop": "normal_prop", + "read_only_nullable_list": ["item1", "item2"], + "read_only_list": ["item3", "item4"], + "write_only_nullable_list": ["item5", "item6"], + "write_only_list": ["item7", "item8"], + "normal_list": ["normal1", "normal2"], + "normal_nullable_list": ["normal1", "normal2"] + } + """; + var obj = JsonUtils.Deserialize(json); + + Assert.Multiple(() => + { + // String properties + Assert.That(obj.ReadOnlyProp, Is.EqualTo("read")); + Assert.That(obj.WriteOnlyProp, Is.Null); + Assert.That(obj.NormalProp, Is.EqualTo("normal_prop")); + + // List properties - read only + var nullableReadOnlyList = obj.ReadOnlyNullableList?.ToArray(); + Assert.That(nullableReadOnlyList, Is.Not.Null); + Assert.That(nullableReadOnlyList, Has.Length.EqualTo(2)); + Assert.That(nullableReadOnlyList![0], Is.EqualTo("item1")); + Assert.That(nullableReadOnlyList![1], Is.EqualTo("item2")); + + var readOnlyList = obj.ReadOnlyList.ToArray(); + Assert.That(readOnlyList, Is.Not.Null); + Assert.That(readOnlyList, Has.Length.EqualTo(2)); + Assert.That(readOnlyList[0], Is.EqualTo("item3")); + Assert.That(readOnlyList[1], Is.EqualTo("item4")); + + // List properties - write only + Assert.That(obj.WriteOnlyNullableList, Is.Null); + Assert.That(obj.WriteOnlyList, Is.Not.Null); + Assert.That(obj.WriteOnlyList, Is.Empty); + + // Normal list property + var normalList = obj.NormalList.ToArray(); + Assert.That(normalList, Is.Not.Null); + Assert.That(normalList, Has.Length.EqualTo(2)); + Assert.That(normalList[0], Is.EqualTo("normal1")); + Assert.That(normalList[1], Is.EqualTo("normal2")); + }); + + // Set up values for serialization + obj.WriteOnlyProp = "write"; + obj.NormalProp = "new_value"; + obj.WriteOnlyNullableList = new List { "write1", "write2" }; + obj.WriteOnlyList = new List { "write3", "write4" }; + obj.NormalList = new List { "new_normal" }; + obj.NullableNormalList = new List { "new_normal" }; + + var serializedJson = JsonUtils.Serialize(obj); + const string expectedJson = """ + { + "write_only_prop": "write", + "normal_prop": "new_value", + "write_only_nullable_list": [ + "write1", + "write2" + ], + "write_only_list": [ + "write3", + "write4" + ], + "normal_list": [ + "new_normal" + ], + "normal_nullable_list": [ + "new_normal" + ] + } + """; + Assert.That(serializedJson, Is.EqualTo(expectedJson).IgnoreWhiteSpace); + } + + [Test] + public void JsonAccessAttribute_WithNullListsInJson_ShouldWorkAsExpected() + { + const string json = """ + { + "read_only_prop": "read", + "normal_prop": "normal_prop", + "read_only_nullable_list": null, + "read_only_list": [] + } + """; + var obj = JsonUtils.Deserialize(json); + + Assert.Multiple(() => + { + // Read-only nullable list should be null when JSON contains null + var nullableReadOnlyList = obj.ReadOnlyNullableList?.ToArray(); + Assert.That(nullableReadOnlyList, Is.Null); + + // Read-only non-nullable list should never be null, but empty when JSON contains null + var readOnlyList = obj.ReadOnlyList.ToArray(); // This should be initialized to an empty list by default + Assert.That(readOnlyList, Is.Not.Null); + Assert.That(readOnlyList, Is.Empty); + }); + + // Serialize and verify read-only lists are not included + var serializedJson = JsonUtils.Serialize(obj); + Assert.That(serializedJson, Does.Not.Contain("read_only_prop")); + Assert.That(serializedJson, Does.Not.Contain("read_only_nullable_list")); + Assert.That(serializedJson, Does.Not.Contain("read_only_list")); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringBuilderTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringBuilderTests.cs new file mode 100644 index 000000000000..ef6bfe0951bc --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringBuilderTests.cs @@ -0,0 +1,560 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core; + +[TestFixture] +public class QueryStringBuilderTests +{ + [Test] + public void Build_SimpleParameters() + { + var parameters = new List> + { + new("name", "John Doe"), + new("age", "30"), + new("city", "New York"), + }; + + var result = QueryStringBuilder.Build(parameters); + + Assert.That(result, Is.EqualTo("?name=John%20Doe&age=30&city=New%20York")); + } + + [Test] + public void Build_EmptyList_ReturnsEmptyString() + { + var parameters = new List>(); + + var result = QueryStringBuilder.Build(parameters); + + Assert.That(result, Is.EqualTo(string.Empty)); + } + + [Test] + public void Build_SpecialCharacters() + { + var parameters = new List> + { + new("email", "test@example.com"), + new("url", "https://example.com/path?query=value"), + new("special", "a+b=c&d"), + }; + + var result = QueryStringBuilder.Build(parameters); + + Assert.That( + result, + Is.EqualTo( + "?email=test%40example.com&url=https%3A%2F%2Fexample.com%2Fpath%3Fquery%3Dvalue&special=a%2Bb%3Dc%26d" + ) + ); + } + + [Test] + public void Build_UnicodeCharacters() + { + var parameters = new List> { new("greeting", "Hello 世界") }; + + var result = QueryStringBuilder.Build(parameters); + + // Verify the Chinese characters are properly UTF-8 encoded + Assert.That(result, Does.StartWith("?greeting=Hello%20")); + Assert.That(result, Does.Contain("%E4%B8%96%E7%95%8C")); // 世界 + } + + [Test] + public void Build_SessionSettings_DeepObject() + { + // Simulate session settings with nested properties + var sessionSettings = new + { + custom_session_id = "my-custom-session-id", + system_prompt = "You are a helpful assistant", + variables = new Dictionary + { + { "userName", "John" }, + { "userAge", 30 }, + { "isPremium", true }, + }, + }; + + // Build query parameters list + var queryParams = new List> { new("api_key", "test_key_123") }; + + // Add session_settings with prefix using the new overload + queryParams.AddRange( + QueryStringConverter.ToDeepObject("session_settings", sessionSettings) + ); + + var result = QueryStringBuilder.Build(queryParams); + + // Verify the result contains properly formatted deep object notation + // Note: Square brackets are URL-encoded as %5B and %5D + Assert.That(result, Does.StartWith("?api_key=test_key_123")); + Assert.That( + result, + Does.Contain("session_settings%5Bcustom_session_id%5D=my-custom-session-id") + ); + Assert.That( + result, + Does.Contain("session_settings%5Bsystem_prompt%5D=You%20are%20a%20helpful%20assistant") + ); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5BuserName%5D=John")); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5BuserAge%5D=30")); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5BisPremium%5D=true")); + + // Verify it's NOT JSON encoded (no braces or quotes in the original format) + Assert.That(result, Does.Not.Contain("%7B%22")); // Not {" sequence + } + + [Test] + public void Build_ChatApiLikeParameters() + { + // Simulate what ChatApi constructor does + var sessionSettings = new + { + system_prompt = "You are helpful", + variables = new Dictionary { { "name", "Alice" } }, + }; + + var queryParams = new List>(); + + // Simple parameters + var simpleParams = new Dictionary + { + { "access_token", "token123" }, + { "config_id", "config456" }, + { "api_key", "key789" }, + }; + queryParams.AddRange(QueryStringConverter.ToExplodedForm(simpleParams)); + + // Session settings as deep object with prefix + queryParams.AddRange( + QueryStringConverter.ToDeepObject("session_settings", sessionSettings) + ); + + var result = QueryStringBuilder.Build(queryParams); + + // Verify structure (square brackets are URL-encoded) + Assert.That(result, Does.StartWith("?")); + Assert.That(result, Does.Contain("access_token=token123")); + Assert.That(result, Does.Contain("config_id=config456")); + Assert.That(result, Does.Contain("api_key=key789")); + Assert.That( + result, + Does.Contain("session_settings%5Bsystem_prompt%5D=You%20are%20helpful") + ); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5Bname%5D=Alice")); + } + + [Test] + public void Build_ReservedCharacters_NotEncoded() + { + var parameters = new List> + { + new("path", "some-path"), + new("id", "123-456_789.test~value"), + }; + + var result = QueryStringBuilder.Build(parameters); + + // Unreserved characters: A-Z a-z 0-9 - _ . ~ + Assert.That(result, Is.EqualTo("?path=some-path&id=123-456_789.test~value")); + } + + [Test] + public void Builder_Add_SimpleParameters() + { + var result = new QueryStringBuilder.Builder() + .Add("name", "John Doe") + .Add("age", 30) + .Add("active", true) + .Build(); + + Assert.That(result, Does.Contain("name=John%20Doe")); + Assert.That(result, Does.Contain("age=30")); + Assert.That(result, Does.Contain("active=true")); + } + + [Test] + public void Builder_Add_NullValuesIgnored() + { + var result = new QueryStringBuilder.Builder() + .Add("name", "John") + .Add("middle", null) + .Add("age", 30) + .Build(); + + Assert.That(result, Does.Contain("name=John")); + Assert.That(result, Does.Contain("age=30")); + Assert.That(result, Does.Not.Contain("middle")); + } + + [Test] + public void Builder_AddDeepObject_WithPrefix() + { + var settings = new + { + custom_session_id = "id-123", + system_prompt = "You are helpful", + variables = new { name = "Alice", age = 25 }, + }; + + var result = new QueryStringBuilder.Builder() + .Add("api_key", "key123") + .AddDeepObject("session_settings", settings) + .Build(); + + Assert.That(result, Does.Contain("api_key=key123")); + Assert.That(result, Does.Contain("session_settings%5Bcustom_session_id%5D=id-123")); + Assert.That( + result, + Does.Contain("session_settings%5Bsystem_prompt%5D=You%20are%20helpful") + ); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5Bname%5D=Alice")); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5Bage%5D=25")); + } + + [Test] + public void Builder_AddDeepObject_NullIgnored() + { + var result = new QueryStringBuilder.Builder() + .Add("api_key", "key123") + .AddDeepObject("settings", null) + .Build(); + + Assert.That(result, Is.EqualTo("?api_key=key123")); + Assert.That(result, Does.Not.Contain("settings")); + } + + [Test] + public void Builder_AddExploded_WithPrefix() + { + var filter = new { status = "active", type = "user" }; + + var result = new QueryStringBuilder.Builder() + .Add("api_key", "key123") + .AddExploded("filter", filter) + .Build(); + + Assert.That(result, Does.Contain("api_key=key123")); + Assert.That(result, Does.Contain("filter%5Bstatus%5D=active")); + Assert.That(result, Does.Contain("filter%5Btype%5D=user")); + } + + [Test] + public void Builder_AddExploded_NullIgnored() + { + var result = new QueryStringBuilder.Builder() + .Add("api_key", "key123") + .AddExploded("filter", null) + .Build(); + + Assert.That(result, Is.EqualTo("?api_key=key123")); + Assert.That(result, Does.Not.Contain("filter")); + } + + [Test] + public void Builder_WithCapacity() + { + // Test that capacity constructor works without errors + var result = new QueryStringBuilder.Builder(capacity: 10) + .Add("param1", "value1") + .Add("param2", "value2") + .Build(); + + Assert.That(result, Does.Contain("param1=value1")); + Assert.That(result, Does.Contain("param2=value2")); + } + + [Test] + public void Builder_ChatApiLikeUsage() + { + // Simulate real usage from ChatApi + var sessionSettings = new + { + custom_session_id = "session-123", + variables = new Dictionary + { + { "userName", "John" }, + { "userAge", 30 }, + }, + }; + + var result = new QueryStringBuilder.Builder(capacity: 16) + .Add("access_token", "token123") + .Add("allow_connection", true) + .Add("config_id", "config456") + .Add("api_key", "key789") + .AddDeepObject("session_settings", sessionSettings) + .Build(); + + Assert.That(result, Does.StartWith("?")); + Assert.That(result, Does.Contain("access_token=token123")); + Assert.That(result, Does.Contain("allow_connection=true")); + Assert.That(result, Does.Contain("config_id=config456")); + Assert.That(result, Does.Contain("api_key=key789")); + Assert.That(result, Does.Contain("session_settings%5Bcustom_session_id%5D=session-123")); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5BuserName%5D=John")); + Assert.That(result, Does.Contain("session_settings%5Bvariables%5D%5BuserAge%5D=30")); + } + + [Test] + public void Builder_EmptyBuilder_ReturnsEmptyString() + { + var result = new QueryStringBuilder.Builder().Build(); + + Assert.That(result, Is.EqualTo(string.Empty)); + } + + [Test] + public void Builder_OnlyNullValues_ReturnsEmptyString() + { + var result = new QueryStringBuilder.Builder() + .Add("param1", null) + .Add("param2", null) + .AddDeepObject("settings", null) + .Build(); + + Assert.That(result, Is.EqualTo(string.Empty)); + } + + [Test] + public void Builder_Set_OverridesSingleValue() + { + var result = new QueryStringBuilder.Builder() + .Add("foo", "original") + .Set("foo", "override") + .Build(); + + Assert.That(result, Is.EqualTo("?foo=override")); + } + + [Test] + public void Builder_Set_OverridesMultipleValues() + { + var result = new QueryStringBuilder.Builder() + .Add("foo", "value1") + .Add("foo", "value2") + .Set("foo", "override") + .Build(); + + Assert.That(result, Is.EqualTo("?foo=override")); + } + + [Test] + public void Builder_Set_WithArray_CreatesMultipleParameters() + { + var result = new QueryStringBuilder.Builder() + .Add("foo", "original") + .Set("foo", new[] { "value1", "value2" }) + .Build(); + + Assert.That(result, Is.EqualTo("?foo=value1&foo=value2")); + } + + [Test] + public void Builder_Set_WithNull_RemovesParameter() + { + var result = new QueryStringBuilder.Builder() + .Add("foo", "original") + .Add("bar", "keep") + .Set("foo", null) + .Build(); + + Assert.That(result, Is.EqualTo("?bar=keep")); + } + + [Test] + public void Builder_MergeAdditional_WithSingleValues() + { + var additional = new List> + { + new("foo", "bar"), + new("baz", "qux"), + }; + + var result = new QueryStringBuilder.Builder() + .Add("existing", "value") + .MergeAdditional(additional) + .Build(); + + Assert.That(result, Does.Contain("existing=value")); + Assert.That(result, Does.Contain("foo=bar")); + Assert.That(result, Does.Contain("baz=qux")); + } + + [Test] + public void Builder_MergeAdditional_WithDuplicateKeys_CreatesList() + { + var additional = new List> + { + new("foo", "bar1"), + new("foo", "bar2"), + new("baz", "qux"), + }; + + var result = new QueryStringBuilder.Builder() + .Add("existing", "value") + .MergeAdditional(additional) + .Build(); + + Assert.That(result, Does.Contain("existing=value")); + Assert.That(result, Does.Contain("foo=bar1")); + Assert.That(result, Does.Contain("foo=bar2")); + Assert.That(result, Does.Contain("baz=qux")); + } + + [Test] + public void Builder_MergeAdditional_OverridesExistingParameters() + { + var additional = new List> { new("foo", "override") }; + + var result = new QueryStringBuilder.Builder() + .Add("foo", "original1") + .Add("foo", "original2") + .Add("bar", "keep") + .MergeAdditional(additional) + .Build(); + + Assert.That(result, Does.Contain("bar=keep")); + Assert.That(result, Does.Contain("foo=override")); + Assert.That(result, Does.Not.Contain("original1")); + Assert.That(result, Does.Not.Contain("original2")); + } + + [Test] + public void Builder_MergeAdditional_WithDuplicates_OverridesExisting() + { + var additional = new List> + { + new("foo", "new1"), + new("foo", "new2"), + new("foo", "new3"), + }; + + var result = new QueryStringBuilder.Builder() + .Add("foo", "original1") + .Add("foo", "original2") + .Add("bar", "keep") + .MergeAdditional(additional) + .Build(); + + Assert.That(result, Does.Contain("bar=keep")); + Assert.That(result, Does.Contain("foo=new1")); + Assert.That(result, Does.Contain("foo=new2")); + Assert.That(result, Does.Contain("foo=new3")); + Assert.That(result, Does.Not.Contain("original1")); + Assert.That(result, Does.Not.Contain("original2")); + } + + [Test] + public void Builder_MergeAdditional_WithNull_NoOp() + { + var result = new QueryStringBuilder.Builder() + .Add("foo", "value") + .MergeAdditional(null) + .Build(); + + Assert.That(result, Is.EqualTo("?foo=value")); + } + + [Test] + public void Builder_MergeAdditional_WithEmptyList_NoOp() + { + var additional = new List>(); + + var result = new QueryStringBuilder.Builder() + .Add("foo", "value") + .MergeAdditional(additional) + .Build(); + + Assert.That(result, Is.EqualTo("?foo=value")); + } + + [Test] + public void Builder_MergeAdditional_RealWorldScenario() + { + // SDK generates foo=foo1&foo=foo2 + var builder = new QueryStringBuilder.Builder() + .Add("foo", "foo1") + .Add("foo", "foo2") + .Add("bar", "baz"); + + // User provides foo=override in AdditionalQueryParameters + var additional = new List> { new("foo", "override") }; + + var result = builder.MergeAdditional(additional).Build(); + + // Result should be foo=override&bar=baz (user overrides SDK) + Assert.That(result, Does.Contain("bar=baz")); + Assert.That(result, Does.Contain("foo=override")); + Assert.That(result, Does.Not.Contain("foo1")); + Assert.That(result, Does.Not.Contain("foo2")); + } + + [Test] + public void Builder_MergeAdditional_UserProvidesMultipleValues() + { + // SDK generates no foo parameter + var builder = new QueryStringBuilder.Builder().Add("bar", "baz"); + + // User provides foo=bar1&foo=bar2 in AdditionalQueryParameters + var additional = new List> + { + new("foo", "bar1"), + new("foo", "bar2"), + }; + + var result = builder.MergeAdditional(additional).Build(); + + // Result should be bar=baz&foo=bar1&foo=bar2 + Assert.That(result, Does.Contain("bar=baz")); + Assert.That(result, Does.Contain("foo=bar1")); + Assert.That(result, Does.Contain("foo=bar2")); + } + + [Test] + public void Builder_Add_WithCollection_CreatesMultipleParameters() + { + var tags = new[] { "tag1", "tag2", "tag3" }; + var result = new QueryStringBuilder.Builder().Add("tag", tags).Build(); + + Assert.That(result, Does.Contain("tag=tag1")); + Assert.That(result, Does.Contain("tag=tag2")); + Assert.That(result, Does.Contain("tag=tag3")); + } + + [Test] + public void Builder_Add_WithList_CreatesMultipleParameters() + { + var ids = new List { 1, 2, 3 }; + var result = new QueryStringBuilder.Builder().Add("id", ids).Build(); + + Assert.That(result, Does.Contain("id=1")); + Assert.That(result, Does.Contain("id=2")); + Assert.That(result, Does.Contain("id=3")); + } + + [Test] + public void Builder_Set_WithCollection_ReplacesAllPreviousValues() + { + var result = new QueryStringBuilder.Builder() + .Add("id", 1) + .Add("id", 2) + .Set("id", new[] { 10, 20, 30 }) + .Build(); + + Assert.That(result, Does.Contain("id=10")); + Assert.That(result, Does.Contain("id=20")); + Assert.That(result, Does.Contain("id=30")); + // Check that old values are not present (use word boundaries to avoid false positives with id=10) + Assert.That(result, Does.Not.Contain("id=1&")); + Assert.That(result, Does.Not.Contain("id=2&")); + Assert.That(result, Does.Not.Contain("id=1?")); + Assert.That(result, Does.Not.Contain("id=2?")); + Assert.That(result, Does.Not.EndWith("id=1")); + Assert.That(result, Does.Not.EndWith("id=2")); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringConverterTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringConverterTests.cs new file mode 100644 index 000000000000..703fd1b89808 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/QueryStringConverterTests.cs @@ -0,0 +1,158 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core; + +[TestFixture] +public class QueryStringConverterTests +{ + [Test] + public void ToQueryStringCollection_Form() + { + var obj = new + { + Name = "John", + Age = 30, + Address = new + { + Street = "123 Main St", + City = "Anytown", + Coordinates = new[] { 39.781721f, -89.650148f }, + }, + Tags = new[] { "Developer", "Blogger" }, + }; + var result = QueryStringConverter.ToForm(obj); + var expected = new List> + { + new("Name", "John"), + new("Age", "30"), + new("Address[Street]", "123 Main St"), + new("Address[City]", "Anytown"), + new("Address[Coordinates]", "39.78172,-89.65015"), + new("Tags", "Developer,Blogger"), + }; + Assert.That(result, Is.EqualTo(expected)); + } + + [Test] + public void ToQueryStringCollection_ExplodedForm() + { + var obj = new + { + Name = "John", + Age = 30, + Address = new + { + Street = "123 Main St", + City = "Anytown", + Coordinates = new[] { 39.781721f, -89.650148f }, + }, + Tags = new[] { "Developer", "Blogger" }, + }; + var result = QueryStringConverter.ToExplodedForm(obj); + var expected = new List> + { + new("Name", "John"), + new("Age", "30"), + new("Address[Street]", "123 Main St"), + new("Address[City]", "Anytown"), + new("Address[Coordinates]", "39.78172"), + new("Address[Coordinates]", "-89.65015"), + new("Tags", "Developer"), + new("Tags", "Blogger"), + }; + Assert.That(result, Is.EqualTo(expected)); + } + + [Test] + public void ToQueryStringCollection_DeepObject() + { + var obj = new + { + Name = "John", + Age = 30, + Address = new + { + Street = "123 Main St", + City = "Anytown", + Coordinates = new[] { 39.781721f, -89.650148f }, + }, + Tags = new[] { "Developer", "Blogger" }, + }; + var result = QueryStringConverter.ToDeepObject(obj); + var expected = new List> + { + new("Name", "John"), + new("Age", "30"), + new("Address[Street]", "123 Main St"), + new("Address[City]", "Anytown"), + new("Address[Coordinates][0]", "39.78172"), + new("Address[Coordinates][1]", "-89.65015"), + new("Tags[0]", "Developer"), + new("Tags[1]", "Blogger"), + }; + Assert.That(result, Is.EqualTo(expected)); + } + + [Test] + public void ToQueryStringCollection_OnString_ThrowsException() + { + var exception = Assert.Throws(() => + QueryStringConverter.ToForm("invalid") + ); + Assert.That( + exception.Message, + Is.EqualTo( + "Only objects can be converted to query string collections. Given type is String." + ) + ); + } + + [Test] + public void ToQueryStringCollection_OnArray_ThrowsException() + { + var exception = Assert.Throws(() => + QueryStringConverter.ToForm(Array.Empty()) + ); + Assert.That( + exception.Message, + Is.EqualTo( + "Only objects can be converted to query string collections. Given type is Array." + ) + ); + } + + [Test] + public void ToQueryStringCollection_DeepObject_WithPrefix() + { + var obj = new + { + custom_session_id = "my-id", + system_prompt = "You are helpful", + variables = new { name = "Alice", age = 25 }, + }; + var result = QueryStringConverter.ToDeepObject("session_settings", obj); + var expected = new List> + { + new("session_settings[custom_session_id]", "my-id"), + new("session_settings[system_prompt]", "You are helpful"), + new("session_settings[variables][name]", "Alice"), + new("session_settings[variables][age]", "25"), + }; + Assert.That(result, Is.EqualTo(expected)); + } + + [Test] + public void ToQueryStringCollection_ExplodedForm_WithPrefix() + { + var obj = new { Name = "John", Tags = new[] { "Developer", "Blogger" } }; + var result = QueryStringConverter.ToExplodedForm("user", obj); + var expected = new List> + { + new("user[Name]", "John"), + new("user[Tags]", "Developer"), + new("user[Tags]", "Blogger"), + }; + Assert.That(result, Is.EqualTo(expected)); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs new file mode 100644 index 000000000000..48e5014db254 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/MultipartFormTests.cs @@ -0,0 +1,1121 @@ +using Contoso.Net.Core; +using global::System.Net.Http; +using global::System.Text; +using global::System.Text.Json.Serialization; +using NUnit.Framework; +using SystemTask = global::System.Threading.Tasks.Task; + +namespace Contoso.Net.Test.Core.RawClientTests; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class MultipartFormTests +{ + private static SimpleObject _simpleObject = new(); + + private static string _simpleFormEncoded = + "meta=data&Date=2023-10-01&Time=12:00:00&Duration=01:00:00&Id=1a1bb98f-47c6-407b-9481-78476affe52a&IsActive=true&Count=42&Initial=A&Values=data,2023-10-01,12:00:00,01:00:00,1a1bb98f-47c6-407b-9481-78476affe52a,true,42,A"; + + private static string _simpleExplodedFormEncoded = + "meta=data&Date=2023-10-01&Time=12:00:00&Duration=01:00:00&Id=1a1bb98f-47c6-407b-9481-78476affe52a&IsActive=true&Count=42&Initial=A&Values=data&Values=2023-10-01&Values=12:00:00&Values=01:00:00&Values=1a1bb98f-47c6-407b-9481-78476affe52a&Values=true&Values=42&Values=A"; + + private static ComplexObject _complexObject = new(); + + private static string _complexJson = """ + { + "meta": "data", + "Nested": { + "foo": "value" + }, + "NestedDictionary": { + "key": { + "foo": "value" + } + }, + "ListOfObjects": [ + { + "foo": "value" + }, + { + "foo": "value2" + } + ], + "Date": "2023-10-01", + "Time": "12:00:00", + "Duration": "01:00:00", + "Id": "1a1bb98f-47c6-407b-9481-78476affe52a", + "IsActive": true, + "Count": 42, + "Initial": "A" + } + """; + + [Test] + public async SystemTask ShouldAddStringPart() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringPart("string", partInput); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=string + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringParts() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringParts("strings", [partInput, partInput]); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask GivenNull_ShouldNotAddStringPart() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringPart("string", null); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringParts_WithNullsInList() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringParts("strings", [partInput, null, partInput]); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringPart_WithContentType() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringPart("string", partInput, "text/xml"); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/xml + Content-Disposition: form-data; name=string + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringPart_WithContentTypeAndCharset() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringPart("string", partInput, "text/xml; charset=utf-8"); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/xml; charset=utf-8 + Content-Disposition: form-data; name=string + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringParts_WithContentType() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringParts("strings", [partInput, partInput], "text/xml"); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/xml + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary} + Content-Type: text/xml + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddStringParts_WithContentTypeAndCharset() + { + const string partInput = "string content"; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddStringParts( + "strings", + [partInput, partInput], + "text/xml; charset=utf-8" + ); + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/xml; charset=utf-8 + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary} + Content-Type: text/xml; charset=utf-8 + Content-Disposition: form-data; name=strings + + {partInput} + --{boundary}-- + """; + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithFileName() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var file = new FileParameter { Stream = partInput, FileName = "test.txt" }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", file); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithoutFileName() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", partInput); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithContentType() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var file = new FileParameter + { + Stream = partInput, + FileName = "test.txt", + ContentType = "text/plain", + }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", file, "ignored-fallback-content-type"); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithContentTypeAndCharset() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var file = new FileParameter + { + Stream = partInput, + FileName = "test.txt", + ContentType = "text/plain; charset=utf-8", + }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", file, "ignored-fallback-content-type"); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain; charset=utf-8 + Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithFallbackContentType() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var file = new FileParameter { Stream = partInput, FileName = "test.txt" }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", file, "text/plain"); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain + Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameter_WithFallbackContentTypeAndCharset() + { + var (partInput, partExpectedString) = GetFileParameterTestData(); + var file = new FileParameter { Stream = partInput, FileName = "test.txt" }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", file, "text/plain; charset=utf-8"); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: text/plain; charset=utf-8 + Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt + + {partExpectedString} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameters() + { + var (partInput1, partExpectedString1) = GetFileParameterTestData(); + var (partInput2, partExpectedString2) = GetFileParameterTestData(); + var file1 = new FileParameter { Stream = partInput1, FileName = "test1.txt" }; + var file2 = new FileParameter { Stream = partInput2, FileName = "test2.txt" }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterParts("file", [file1, file2]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file; filename=test1.txt; filename*=utf-8''test1.txt + + {partExpectedString1} + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file; filename=test2.txt; filename*=utf-8''test2.txt + + {partExpectedString2} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFileParameters_WithNullsInList() + { + var (partInput1, partExpectedString1) = GetFileParameterTestData(); + var (partInput2, partExpectedString2) = GetFileParameterTestData(); + var file1 = new FileParameter { Stream = partInput1, FileName = "test1.txt" }; + var file2 = new FileParameter { Stream = partInput2, FileName = "test2.txt" }; + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterParts("file", [file1, null, file2]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file; filename=test1.txt; filename*=utf-8''test1.txt + + {partExpectedString1} + --{boundary} + Content-Type: application/octet-stream + Content-Disposition: form-data; name=file; filename=test2.txt; filename*=utf-8''test2.txt + + {partExpectedString2} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask GivenNull_ShouldNotAddFileParameter() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFileParameterPart("file", null); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddJsonPart_WithComplexObject() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddJsonPart("object", _complexObject); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/json + Content-Disposition: form-data; name=object + + {_complexJson} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddJsonPart_WithComplexObjectList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddJsonParts("objects", [_complexObject, _complexObject]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/json + Content-Disposition: form-data; name=objects + + {_complexJson} + --{boundary} + Content-Type: application/json + Content-Disposition: form-data; name=objects + + {_complexJson} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask GivenNull_ShouldNotAddJsonPart() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddJsonPart("object", null); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddJsonParts_WithNullsInList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddJsonParts("objects", [_complexObject, null]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/json + Content-Disposition: form-data; name=objects + + {_complexJson} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddJsonParts_WithContentType() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddJsonParts("objects", [new { }], "application/json-patch+json"); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $$""" + --{{boundary}} + Content-Type: application/json-patch+json + Content-Disposition: form-data; name=objects + + {} + --{{boundary}}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedParts_WithSimpleObject() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedPart("object", _simpleObject); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=object + + {EscapeFormEncodedString(_simpleFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedParts_WithSimpleObjectList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedParts("objects", [_simpleObject, _simpleObject]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleFormEncoded)} + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldNotAddFormEncodedParts_WithNull() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedParts("object", null); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldNotAddFormEncodedParts_WithNullsInList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedParts("objects", [_simpleObject, null]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedPart_WithContentType() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedPart( + "objects", + new { foo = "bar" }, + "application/x-www-form-urlencoded" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedPart_WithContentTypeAndCharset() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedPart( + "objects", + new { foo = "bar" }, + "application/x-www-form-urlencoded; charset=utf-8" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedParts_WithContentType() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedParts( + "objects", + [new { foo = "bar" }], + "application/x-www-form-urlencoded" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddFormEncodedParts_WithContentTypeAndCharset() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddFormEncodedParts( + "objects", + [new { foo = "bar" }], + "application/x-www-form-urlencoded; charset=utf-8" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedParts_WithSimpleObject() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedPart("object", _simpleObject); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=object + + {EscapeFormEncodedString(_simpleExplodedFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedParts_WithSimpleObjectList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedParts("objects", [_simpleObject, _simpleObject]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleExplodedFormEncoded)} + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleExplodedFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldNotAddExplodedFormEncodedParts_WithNull() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedPart("object", null); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldNotAddExplodedFormEncodedParts_WithNullsInList() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedParts("objects", [_simpleObject, null]); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + {EscapeFormEncodedString(_simpleExplodedFormEncoded)} + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedPart_WithContentType() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedPart( + "objects", + new { foo = "bar" }, + "application/x-www-form-urlencoded" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedPart_WithContentTypeAndCharset() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedPart( + "objects", + new { foo = "bar" }, + "application/x-www-form-urlencoded; charset=utf-8" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedParts_WithContentType() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedParts( + "objects", + [new { foo = "bar" }], + "application/x-www-form-urlencoded" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + [Test] + public async SystemTask ShouldAddExplodedFormEncodedParts_WithContentTypeAndCharset() + { + var multipartFormRequest = CreateMultipartFormRequest(); + multipartFormRequest.AddExplodedFormEncodedParts( + "objects", + [new { foo = "bar" }], + "application/x-www-form-urlencoded; charset=utf-8" + ); + + var httpContent = multipartFormRequest.CreateContent(); + Assert.That(httpContent, Is.InstanceOf()); + var multipartContent = (MultipartFormDataContent)httpContent; + + var boundary = GetBoundary(multipartContent); + var expected = $""" + --{boundary} + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Content-Disposition: form-data; name=objects + + foo=bar + --{boundary}-- + """; + + var actual = await multipartContent.ReadAsStringAsync(); + Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace); + } + + private static string EscapeFormEncodedString(string input) + { + return string.Join( + "&", + input + .Split('&') + .Select(x => x.Split('=')) + .Select(x => $"{Uri.EscapeDataString(x[0])}={Uri.EscapeDataString(x[1])}") + ); + } + + private static string GetBoundary(MultipartFormDataContent content) + { + return content + .Headers.ContentType?.Parameters.Single(p => + p.Name.Equals("boundary", StringComparison.OrdinalIgnoreCase) + ) + .Value?.Trim('"') + ?? throw new global::System.Exception("Boundary not found"); + } + + private static Contoso.Net.Core.MultipartFormRequest CreateMultipartFormRequest() + { + return new Contoso.Net.Core.MultipartFormRequest + { + BaseUrl = "https://localhost", + Method = HttpMethod.Post, + Path = "", + }; + } + + private static (Stream partInput, string partExpectedString) GetFileParameterTestData() + { + const string partExpectedString = "file content"; + var partInput = new MemoryStream(Encoding.Default.GetBytes(partExpectedString)); + return (partInput, partExpectedString); + } + + private class SimpleObject + { + [JsonPropertyName("meta")] + public string Meta { get; set; } = "data"; + public DateOnly Date { get; set; } = DateOnly.Parse("2023-10-01"); + public TimeOnly Time { get; set; } = TimeOnly.Parse("12:00:00"); + public TimeSpan Duration { get; set; } = TimeSpan.FromHours(1); + public Guid Id { get; set; } = Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a"); + public bool IsActive { get; set; } = true; + public int Count { get; set; } = 42; + public char Initial { get; set; } = 'A'; + public IEnumerable Values { get; set; } = + [ + "data", + DateOnly.Parse("2023-10-01"), + TimeOnly.Parse("12:00:00"), + TimeSpan.FromHours(1), + Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a"), + true, + 42, + 'A', + ]; + } + + private class ComplexObject + { + [JsonPropertyName("meta")] + public string Meta { get; set; } = "data"; + + public object Nested { get; set; } = new { foo = "value" }; + + public Dictionary NestedDictionary { get; set; } = + new() { { "key", new { foo = "value" } } }; + + public IEnumerable ListOfObjects { get; set; } = + new List { new { foo = "value" }, new { foo = "value2" } }; + + public DateOnly Date { get; set; } = DateOnly.Parse("2023-10-01"); + public TimeOnly Time { get; set; } = TimeOnly.Parse("12:00:00"); + public TimeSpan Duration { get; set; } = TimeSpan.FromHours(1); + public Guid Id { get; set; } = Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a"); + public bool IsActive { get; set; } = true; + public int Count { get; set; } = 42; + public char Initial { get; set; } = 'A'; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/QueryParameterTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/QueryParameterTests.cs new file mode 100644 index 000000000000..2e8454ec5e4e --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/QueryParameterTests.cs @@ -0,0 +1,108 @@ +using Contoso.Net.Core; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core.RawClientTests; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class QueryParameterTests +{ + [Test] + public void QueryParameters_BasicParameters() + { + var queryString = new QueryStringBuilder.Builder() + .Add("foo", "bar") + .Add("baz", "qux") + .Build(); + + Assert.That(queryString, Is.EqualTo("?foo=bar&baz=qux")); + } + + [Test] + public void QueryParameters_SpecialCharacterEscaping() + { + var queryString = new QueryStringBuilder.Builder() + .Add("email", "bob+test@example.com") + .Add("%Complete", "100") + .Add("space test", "hello world") + .Build(); + + Assert.That(queryString, Does.Contain("email=bob%2Btest%40example.com")); + Assert.That(queryString, Does.Contain("%25Complete=100")); + Assert.That(queryString, Does.Contain("space%20test=hello%20world")); + } + + [Test] + public void QueryParameters_MergeAdditionalParameters() + { + var queryString = new QueryStringBuilder.Builder() + .Add("sdk", "param") + .MergeAdditional(new List> { new("user", "value") }) + .Build(); + + Assert.That(queryString, Does.Contain("sdk=param")); + Assert.That(queryString, Does.Contain("user=value")); + } + + [Test] + public void QueryParameters_AdditionalOverridesSdk() + { + var queryString = new QueryStringBuilder.Builder() + .Add("foo", "sdk_value") + .MergeAdditional(new List> { new("foo", "user_override") }) + .Build(); + + Assert.That(queryString, Does.Contain("foo=user_override")); + Assert.That(queryString, Does.Not.Contain("sdk_value")); + } + + [Test] + public void QueryParameters_AdditionalMultipleValues() + { + var queryString = new QueryStringBuilder.Builder() + .Add("foo", "sdk_value") + .MergeAdditional( + new List> { new("foo", "user1"), new("foo", "user2") } + ) + .Build(); + + Assert.That(queryString, Does.Contain("foo=user1")); + Assert.That(queryString, Does.Contain("foo=user2")); + Assert.That(queryString, Does.Not.Contain("sdk_value")); + } + + [Test] + public void QueryParameters_OnlyAdditionalParameters() + { + var queryString = new QueryStringBuilder.Builder() + .MergeAdditional( + new List> { new("foo", "bar"), new("baz", "qux") } + ) + .Build(); + + Assert.That(queryString, Does.Contain("foo=bar")); + Assert.That(queryString, Does.Contain("baz=qux")); + } + + [Test] + public void QueryParameters_EmptyAdditionalParameters() + { + var queryString = new QueryStringBuilder.Builder() + .Add("foo", "bar") + .MergeAdditional(new List>()) + .Build(); + + Assert.That(queryString, Is.EqualTo("?foo=bar")); + } + + [Test] + public void QueryParameters_NullAdditionalParameters() + { + var queryString = new QueryStringBuilder.Builder() + .Add("foo", "bar") + .MergeAdditional(null) + .Build(); + + Assert.That(queryString, Is.EqualTo("?foo=bar")); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs new file mode 100644 index 000000000000..208ecdfee11b --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/RawClientTests/RetriesTests.cs @@ -0,0 +1,406 @@ +using Contoso.Net.Core; +using global::System.Net.Http; +using global::System.Text.Json; +using NUnit.Framework; +using WireMock.Server; +using SystemTask = global::System.Threading.Tasks.Task; +using WireMockRequest = WireMock.RequestBuilders.Request; +using WireMockResponse = WireMock.ResponseBuilders.Response; + +namespace Contoso.Net.Test.Core.RawClientTests; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class RetriesTests +{ + private const int MaxRetries = 3; + private WireMockServer _server; + private HttpClient _httpClient; + private RawClient _rawClient; + private string _baseUrl; + + [SetUp] + public void SetUp() + { + _server = WireMockServer.Start(); + _baseUrl = _server.Url ?? ""; + _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) }; + _rawClient = new RawClient( + new ClientOptions { HttpClient = _httpClient, MaxRetries = MaxRetries } + ) + { + BaseRetryDelay = 0, + }; + } + + [Test] + [TestCase(408)] + [TestCase(429)] + [TestCase(500)] + [TestCase(504)] + public async SystemTask SendRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode) + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("Retry") + .WillSetStateTo("Server Error") + .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("Retry") + .WhenStateIs("Server Error") + .WillSetStateTo("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("Retry") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + using (Assert.EnterMultipleScope()) + { + Assert.That(content, Is.EqualTo("Success")); + + Assert.That(_server.LogEntries, Has.Count.EqualTo(MaxRetries)); + } + } + + [Test] + [TestCase(400)] + [TestCase(409)] + public async SystemTask SendRequestAsync_ShouldRetry_OnNonRetryableStatusCodes(int statusCode) + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("Retry") + .WillSetStateTo("Server Error") + .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure")); + + var request = new JsonRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + Body = new { }, + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(statusCode)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Failure")); + + Assert.That(_server.LogEntries, Has.Count.EqualTo(1)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldNotRetry_WithStreamRequest() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("Retry") + .WillSetStateTo("Server Error") + .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); + + var request = new StreamRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + Body = new MemoryStream(), + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(429)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Failure")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(1)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest_WithStream() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("Retry") + .WillSetStateTo("Server Error") + .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure")); + + var request = new Contoso.Net.Core.MultipartFormRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + }; + request.AddFileParameterPart("file", new MemoryStream()); + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(429)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Failure")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(1)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_WithoutStream() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("Retry") + .WillSetStateTo("Server Error") + .RespondWith(WireMockResponse.Create().WithStatusCode(429)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("Retry") + .WhenStateIs("Server Error") + .WillSetStateTo("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(429)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("Retry") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new Contoso.Net.Core.MultipartFormRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + }; + request.AddJsonPart("object", new { }); + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(MaxRetries)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRespectRetryAfterHeader_WithSecondsValue() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfter") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse.Create().WithStatusCode(429).WithHeader("Retry-After", "1") + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfter") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRespectRetryAfterHeader_WithHttpDateValue() + { + var retryAfterDate = DateTimeOffset.UtcNow.AddSeconds(1).ToString("R"); + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfterDate") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse + .Create() + .WithStatusCode(429) + .WithHeader("Retry-After", retryAfterDate) + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RetryAfterDate") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldRespectXRateLimitResetHeader() + { + var resetTime = DateTimeOffset.UtcNow.AddSeconds(1).ToUnixTimeSeconds().ToString(); + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RateLimitReset") + .WillSetStateTo("Success") + .RespondWith( + WireMockResponse + .Create() + .WithStatusCode(429) + .WithHeader("X-RateLimit-Reset", resetTime) + ); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingGet()) + .InScenario("RateLimitReset") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new EmptyRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Get, + Path = "/test", + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + Assert.Multiple(() => + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + }); + } + + [Test] + public async SystemTask SendRequestAsync_ShouldPreserveJsonBody_OnRetry() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("RetryWithBody") + .WillSetStateTo("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(500)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("RetryWithBody") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new JsonRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + Body = new { key = "value" }, + }; + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + using (Assert.EnterMultipleScope()) + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + + // Verify the retried request preserved the JSON body (compare parsed to ignore formatting differences) + var retriedEntry = _server.LogEntries.ElementAt(1); + using var actualJson = JsonDocument.Parse(retriedEntry.RequestMessage.Body!); + Assert.That(actualJson.RootElement.GetProperty("key").GetString(), Is.EqualTo("value")); + } + } + + [Test] + public async SystemTask SendRequestAsync_ShouldPreserveMultipartBody_OnRetry() + { + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("RetryMultipart") + .WillSetStateTo("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(500)); + + _server + .Given(WireMockRequest.Create().WithPath("/test").UsingPost()) + .InScenario("RetryMultipart") + .WhenStateIs("Success") + .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success")); + + var request = new Contoso.Net.Core.MultipartFormRequest + { + BaseUrl = _baseUrl, + Method = HttpMethod.Post, + Path = "/test", + }; + request.AddJsonPart("object", new { key = "value" }); + + var response = await _rawClient.SendRequestAsync(request); + Assert.That(response.StatusCode, Is.EqualTo(200)); + + var content = await response.Raw.Content.ReadAsStringAsync(); + using (Assert.EnterMultipleScope()) + { + Assert.That(content, Is.EqualTo("Success")); + Assert.That(_server.LogEntries, Has.Count.EqualTo(2)); + + // Verify the retried request preserved the multipart body (check key/value presence to ignore formatting differences) + var retriedEntry = _server.LogEntries.ElementAt(1); + Assert.That(retriedEntry.RequestMessage.Body, Does.Contain("\"key\"")); + Assert.That(retriedEntry.RequestMessage.Body, Does.Contain("\"value\"")); + } + } + + [TearDown] + public void TearDown() + { + _server.Dispose(); + _httpClient.Dispose(); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/WithRawResponseTests.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/WithRawResponseTests.cs new file mode 100644 index 000000000000..3dec5c3aa383 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Core/WithRawResponseTests.cs @@ -0,0 +1,269 @@ +using Contoso.Net; +using Contoso.Net.Core; +using global::System.Net; +using global::System.Net.Http.Headers; +using NUnit.Framework; + +namespace Contoso.Net.Test.Core; + +[TestFixture] +public class WithRawResponseTests +{ + [Test] + public async global::System.Threading.Tasks.Task WithRawResponseTask_DirectAwait_ReturnsData() + { + // Arrange + var expectedData = "test-data"; + var task = CreateWithRawResponseTask(expectedData, HttpStatusCode.OK); + + // Act + var result = await task; + + // Assert + Assert.That(result, Is.EqualTo(expectedData)); + } + + [Test] + public async global::System.Threading.Tasks.Task WithRawResponseTask_WithRawResponse_ReturnsDataAndMetadata() + { + // Arrange + var expectedData = "test-data"; + var expectedStatusCode = HttpStatusCode.Created; + var task = CreateWithRawResponseTask(expectedData, expectedStatusCode); + + // Act + var result = await task.WithRawResponse(); + + // Assert + Assert.That(result.Data, Is.EqualTo(expectedData)); + Assert.That(result.RawResponse.StatusCode, Is.EqualTo(expectedStatusCode)); + Assert.That(result.RawResponse.Url, Is.Not.Null); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_TryGetValue_CaseInsensitive() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Headers.Add("X-Request-Id", "12345"); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act & Assert + Assert.That(headers.TryGetValue("X-Request-Id", out var value), Is.True); + Assert.That(value, Is.EqualTo("12345")); + + Assert.That(headers.TryGetValue("x-request-id", out value), Is.True); + Assert.That(value, Is.EqualTo("12345")); + + Assert.That(headers.TryGetValue("X-REQUEST-ID", out value), Is.True); + Assert.That(value, Is.EqualTo("12345")); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_TryGetValues_ReturnsMultipleValues() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Headers.Add("Set-Cookie", new[] { "cookie1=value1", "cookie2=value2" }); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var success = headers.TryGetValues("Set-Cookie", out var values); + + // Assert + Assert.That(success, Is.True); + Assert.That(values, Is.Not.Null); + Assert.That(values!.Count(), Is.EqualTo(2)); + Assert.That(values, Does.Contain("cookie1=value1")); + Assert.That(values, Does.Contain("cookie2=value2")); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_ContentType_ReturnsValue() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Content = new StringContent( + "{}", + global::System.Text.Encoding.UTF8, + "application/json" + ); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var contentType = headers.ContentType; + + // Assert + Assert.That(contentType, Is.Not.Null); + Assert.That(contentType, Does.Contain("application/json")); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_ContentLength_ReturnsValue() + { + // Arrange + var content = "test content"; + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Content = new StringContent(content); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var contentLength = headers.ContentLength; + + // Assert + Assert.That(contentLength, Is.Not.Null); + Assert.That(contentLength, Is.GreaterThan(0)); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_Contains_ReturnsTrueForExistingHeader() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Headers.Add("X-Custom-Header", "value"); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act & Assert + Assert.That(headers.Contains("X-Custom-Header"), Is.True); + Assert.That(headers.Contains("x-custom-header"), Is.True); + Assert.That(headers.Contains("NonExistent"), Is.False); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_Enumeration_IncludesAllHeaders() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + response.Headers.Add("X-Header-1", "value1"); + response.Headers.Add("X-Header-2", "value2"); + response.Content = new StringContent("test"); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var allHeaders = headers.ToList(); + + // Assert + Assert.That(allHeaders.Count, Is.GreaterThan(0)); + Assert.That(allHeaders.Any(h => h.Name == "X-Header-1"), Is.True); + Assert.That(allHeaders.Any(h => h.Name == "X-Header-2"), Is.True); + } + + [Test] + public async global::System.Threading.Tasks.Task WithRawResponseTask_ErrorStatusCode_StillReturnsMetadata() + { + // Arrange + var expectedData = "error-data"; + var task = CreateWithRawResponseTask(expectedData, HttpStatusCode.BadRequest); + + // Act + var result = await task.WithRawResponse(); + + // Assert + Assert.That(result.Data, Is.EqualTo(expectedData)); + Assert.That(result.RawResponse.StatusCode, Is.EqualTo(HttpStatusCode.BadRequest)); + } + + [Test] + public async global::System.Threading.Tasks.Task WithRawResponseTask_Url_IsPreserved() + { + // Arrange + var expectedUrl = new Uri("https://api.example.com/users/123"); + var task = CreateWithRawResponseTask("data", HttpStatusCode.OK, expectedUrl); + + // Act + var result = await task.WithRawResponse(); + + // Assert + Assert.That(result.RawResponse.Url, Is.EqualTo(expectedUrl)); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_TryGetValue_NonExistentHeader_ReturnsFalse() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var success = headers.TryGetValue("X-NonExistent", out var value); + + // Assert + Assert.That(success, Is.False); + Assert.That(value, Is.Null); + } + + [Test] + public async global::System.Threading.Tasks.Task ResponseHeaders_TryGetValues_NonExistentHeader_ReturnsFalse() + { + // Arrange + using var response = CreateHttpResponse(HttpStatusCode.OK); + var headers = ResponseHeaders.FromHttpResponseMessage(response); + + // Act + var success = headers.TryGetValues("X-NonExistent", out var values); + + // Assert + Assert.That(success, Is.False); + Assert.That(values, Is.Null); + } + + [Test] + public async global::System.Threading.Tasks.Task WithRawResponseTask_ImplicitConversion_ToTask() + { + // Arrange + var expectedData = "test-data"; + var task = CreateWithRawResponseTask(expectedData, HttpStatusCode.OK); + + // Act - implicitly convert to Task + global::System.Threading.Tasks.Task regularTask = task; + var result = await regularTask; + + // Assert + Assert.That(result, Is.EqualTo(expectedData)); + } + + [Test] + public void WithRawResponseTask_ImplicitConversion_AssignToTaskVariable() + { + // Arrange + var expectedData = "test-data"; + var wrappedTask = CreateWithRawResponseTask(expectedData, HttpStatusCode.OK); + + // Act - assign to Task variable + global::System.Threading.Tasks.Task regularTask = wrappedTask; + + // Assert + Assert.That(regularTask, Is.Not.Null); + Assert.That(regularTask, Is.InstanceOf>()); + } + + // Helper methods + + private static WithRawResponseTask CreateWithRawResponseTask( + T data, + HttpStatusCode statusCode, + Uri? url = null + ) + { + url ??= new Uri("https://api.example.com/test"); + using var httpResponse = CreateHttpResponse(statusCode); + httpResponse.RequestMessage = new HttpRequestMessage(HttpMethod.Get, url); + + var rawResponse = new RawResponse + { + StatusCode = statusCode, + Url = url, + Headers = ResponseHeaders.FromHttpResponseMessage(httpResponse), + }; + + var withRawResponse = new WithRawResponse { Data = data, RawResponse = rawResponse }; + + var task = global::System.Threading.Tasks.Task.FromResult(withRawResponse); + return new WithRawResponseTask(task); + } + + private static HttpResponseMessage CreateHttpResponse(HttpStatusCode statusCode) + { + return new HttpResponseMessage(statusCode) { Content = new StringContent("") }; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/TestClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/TestClient.cs new file mode 100644 index 000000000000..d60dc2e2ba10 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/TestClient.cs @@ -0,0 +1,6 @@ +using NUnit.Framework; + +namespace Contoso.Net.Test; + +[TestFixture] +public class TestClient; diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs new file mode 100644 index 000000000000..ce4dc98b39fb --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/BaseMockServerTest.cs @@ -0,0 +1,37 @@ +using Contoso.Net; +using NUnit.Framework; +using WireMock.Logging; +using WireMock.Server; +using WireMock.Settings; + +namespace Contoso.Net.Test.Unit.MockServer; + +public class BaseMockServerTest +{ + protected WireMockServer Server { get; set; } = null!; + + protected Contoso.Net.Contoso Client { get; set; } = null!; + + protected RequestOptions RequestOptions { get; set; } = new(); + + [OneTimeSetUp] + public void GlobalSetup() + { + // Start the WireMock server + Server = WireMockServer.Start( + new WireMockServerSettings { Logger = new WireMockConsoleLogger() } + ); + + // Initialize the Client + Client = new Contoso.Net.Contoso( + clientOptions: new ClientOptions { BaseUrl = Server.Urls[0], MaxRetries = 0 } + ); + } + + [OneTimeTearDown] + public void GlobalTeardown() + { + Server.Stop(); + Server.Dispose(); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs new file mode 100644 index 000000000000..a5277c200db0 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateTaskTest.cs @@ -0,0 +1,54 @@ +using Contoso.Net.Test.Utils; +using NUnit.Framework; + +namespace Contoso.Net.Test.Unit.MockServer; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class CreateTaskTest : BaseMockServerTest +{ + [global::NUnit.Framework.Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string requestJson = """ + { + "name": "name", + "email": "email", + "password": "password" + } + """; + + const string mockResponse = """ + { + "name": "name", + "email": "email" + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.CreateTaskAsync( + new global::Contoso.Net.Task + { + Id = "id", + Name = "name", + Email = "email", + Password = "password", + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs new file mode 100644 index 000000000000..29e7b043aa89 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/CreateUserTest.cs @@ -0,0 +1,54 @@ +using Contoso.Net.Test.Utils; +using NUnit.Framework; + +namespace Contoso.Net.Test.Unit.MockServer; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class CreateUserTest : BaseMockServerTest +{ + [global::NUnit.Framework.Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string requestJson = """ + { + "name": "name", + "email": "email", + "password": "password" + } + """; + + const string mockResponse = """ + { + "name": "name", + "email": "email" + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.CreateUserAsync( + new global::Contoso.Net.User + { + Id = "id", + Name = "name", + Email = "email", + Password = "password", + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs new file mode 100644 index 000000000000..24b6d6aa9dac --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateTaskTest.cs @@ -0,0 +1,99 @@ +using Contoso.Net.Test.Unit.MockServer; +using Contoso.Net.Test.Utils; +using NUnit.Framework; + +namespace Contoso.Net.Test.Unit.MockServer.System; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class CreateTaskTest : BaseMockServerTest +{ + [global::NUnit.Framework.Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string requestJson = """ + { + "name": "name", + "user": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + }, + "owner": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + } + """; + + const string mockResponse = """ + { + "name": "name", + "user": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + }, + "owner": { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.System.CreateTaskAsync( + new global::Contoso.Net.System.Task + { + Name = "name", + User = new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, + Owner = new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs new file mode 100644 index 000000000000..2f50e8c98fbf --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/CreateUserTest.cs @@ -0,0 +1,64 @@ +using Contoso.Net.Test.Unit.MockServer; +using Contoso.Net.Test.Utils; +using NUnit.Framework; + +namespace Contoso.Net.Test.Unit.MockServer.System; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class CreateUserTest : BaseMockServerTest +{ + [global::NUnit.Framework.Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string requestJson = """ + { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + """; + + const string mockResponse = """ + { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/users") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.System.CreateUserAsync( + new global::Contoso.Net.System.User + { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA", + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs new file mode 100644 index 000000000000..7f04355acd72 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Unit/MockServer/System/GetUserTest.cs @@ -0,0 +1,37 @@ +using Contoso.Net.Test.Unit.MockServer; +using Contoso.Net.Test.Utils; +using NUnit.Framework; + +namespace Contoso.Net.Test.Unit.MockServer.System; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetUserTest : BaseMockServerTest +{ + [global::NUnit.Framework.Test] + public async global::System.Threading.Tasks.Task MockServerTest() + { + const string mockResponse = """ + { + "line1": "line1", + "line2": "line2", + "city": "city", + "state": "state", + "zip": "zip", + "country": "USA" + } + """; + + Server + .Given(WireMock.RequestBuilders.Request.Create().WithPath("/users/userId").UsingGet()) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.System.GetUserAsync("userId"); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs new file mode 100644 index 000000000000..1827aca41e05 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/AdditionalPropertiesComparer.cs @@ -0,0 +1,126 @@ +using System.Text.Json; +using Contoso.Net; +using Contoso.Net.Core; +using NUnit.Framework.Constraints; + +namespace NUnit.Framework; + +/// +/// Extensions for EqualConstraint to handle AdditionalProperties values. +/// +public static class AdditionalPropertiesComparerExtensions +{ + /// + /// Modifies the EqualConstraint to handle AdditionalProperties instances by comparing their + /// serialized JSON representations. This handles the type mismatch between native C# types + /// and JsonElement values that occur when comparing manually constructed objects with + /// deserialized objects. + /// + /// The EqualConstraint to modify. + /// The same constraint instance for method chaining. + public static EqualConstraint UsingAdditionalPropertiesComparer(this EqualConstraint constraint) + { + constraint.Using( + (x, y) => + { + if (x.Count != y.Count) + { + return false; + } + + foreach (var key in x.Keys) + { + if (!y.ContainsKey(key)) + { + return false; + } + + var xElement = JsonUtils.SerializeToElement(x[key]); + var yElement = JsonUtils.SerializeToElement(y[key]); + + if (!JsonElementsAreEqual(xElement, yElement)) + { + return false; + } + } + + return true; + } + ); + + return constraint; + } + + private static bool JsonElementsAreEqual(JsonElement x, JsonElement y) + { + if (x.ValueKind != y.ValueKind) + { + return false; + } + + return x.ValueKind switch + { + JsonValueKind.Object => CompareJsonObjects(x, y), + JsonValueKind.Array => CompareJsonArrays(x, y), + JsonValueKind.String => x.GetString() == y.GetString(), + JsonValueKind.Number => x.GetDecimal() == y.GetDecimal(), + JsonValueKind.True => true, + JsonValueKind.False => true, + JsonValueKind.Null => true, + _ => false, + }; + } + + private static bool CompareJsonObjects(JsonElement x, JsonElement y) + { + var xProps = new Dictionary(); + var yProps = new Dictionary(); + + foreach (var prop in x.EnumerateObject()) + xProps[prop.Name] = prop.Value; + + foreach (var prop in y.EnumerateObject()) + yProps[prop.Name] = prop.Value; + + if (xProps.Count != yProps.Count) + { + return false; + } + + foreach (var key in xProps.Keys) + { + if (!yProps.ContainsKey(key)) + { + return false; + } + + if (!JsonElementsAreEqual(xProps[key], yProps[key])) + { + return false; + } + } + + return true; + } + + private static bool CompareJsonArrays(JsonElement x, JsonElement y) + { + var xArray = x.EnumerateArray().ToList(); + var yArray = y.EnumerateArray().ToList(); + + if (xArray.Count != yArray.Count) + { + return false; + } + + for (var i = 0; i < xArray.Count; i++) + { + if (!JsonElementsAreEqual(xArray[i], yArray[i])) + { + return false; + } + } + + return true; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs new file mode 100644 index 000000000000..f546f6476527 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonAssert.cs @@ -0,0 +1,19 @@ +using Contoso.Net.Core; +using global::System.Text.Json; +using NUnit.Framework; + +namespace Contoso.Net.Test.Utils; + +internal static class JsonAssert +{ + /// + /// Asserts that the serialized JSON of an object equals the expected JSON string. + /// Uses JsonElement comparison for reliable deep equality of collections and union types. + /// + internal static void AreEqual(object actual, string expectedJson) + { + var actualElement = JsonUtils.SerializeToElement(actual); + var expectedElement = JsonUtils.Deserialize(expectedJson); + Assert.That(actualElement, Is.EqualTo(expectedElement).UsingJsonElementComparer()); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonElementComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonElementComparer.cs new file mode 100644 index 000000000000..a37ef402c1ac --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/JsonElementComparer.cs @@ -0,0 +1,236 @@ +using global::System.Text.Json; +using NUnit.Framework.Constraints; + +namespace NUnit.Framework; + +/// +/// Extensions for EqualConstraint to handle JsonElement objects. +/// +public static class JsonElementComparerExtensions +{ + /// + /// Extension method for comparing JsonElement objects in NUnit tests. + /// Property order doesn't matter, but array order does matter. + /// Includes special handling for DateTime string formats. + /// + /// The Is.EqualTo() constraint instance. + /// A constraint that can compare JsonElements with detailed diffs. + public static EqualConstraint UsingJsonElementComparer(this EqualConstraint constraint) + { + return constraint.Using(new JsonElementComparer()); + } +} + +/// +/// Equality comparer for JsonElement with detailed reporting. +/// Property order doesn't matter, but array order does matter. +/// Now includes special handling for DateTime string formats with improved null handling. +/// +public class JsonElementComparer : IEqualityComparer +{ + private string _failurePath = string.Empty; + + /// + public bool Equals(JsonElement x, JsonElement y) + { + _failurePath = string.Empty; + return CompareJsonElements(x, y, string.Empty); + } + + /// + public int GetHashCode(JsonElement obj) + { + return JsonSerializer.Serialize(obj).GetHashCode(); + } + + private bool CompareJsonElements(JsonElement x, JsonElement y, string path) + { + // If value kinds don't match, they're not equivalent + if (x.ValueKind != y.ValueKind) + { + _failurePath = $"{path}: Expected {x.ValueKind} but got {y.ValueKind}"; + return false; + } + + switch (x.ValueKind) + { + case JsonValueKind.Object: + return CompareJsonObjects(x, y, path); + + case JsonValueKind.Array: + return CompareJsonArraysInOrder(x, y, path); + + case JsonValueKind.String: + string? xStr = x.GetString(); + string? yStr = y.GetString(); + + // Handle null strings + if (xStr is null && yStr is null) + return true; + + if (xStr is null || yStr is null) + { + _failurePath = + $"{path}: Expected {(xStr is null ? "null" : $"\"{xStr}\"")} but got {(yStr is null ? "null" : $"\"{yStr}\"")}"; + return false; + } + + // Check if they are identical strings + if (xStr == yStr) + return true; + + // Try to handle DateTime strings + if (IsLikelyDateTimeString(xStr) && IsLikelyDateTimeString(yStr)) + { + if (AreEquivalentDateTimeStrings(xStr, yStr)) + return true; + } + + _failurePath = $"{path}: Expected \"{xStr}\" but got \"{yStr}\""; + return false; + + case JsonValueKind.Number: + if (x.GetDecimal() != y.GetDecimal()) + { + _failurePath = $"{path}: Expected {x.GetDecimal()} but got {y.GetDecimal()}"; + return false; + } + + return true; + + case JsonValueKind.True: + case JsonValueKind.False: + if (x.GetBoolean() != y.GetBoolean()) + { + _failurePath = $"{path}: Expected {x.GetBoolean()} but got {y.GetBoolean()}"; + return false; + } + + return true; + + case JsonValueKind.Null: + return true; + + default: + _failurePath = $"{path}: Unsupported JsonValueKind {x.ValueKind}"; + return false; + } + } + + private bool IsLikelyDateTimeString(string? str) + { + // Simple heuristic to identify likely ISO date time strings + return str is not null + && (str.Contains("T") && (str.EndsWith("Z") || str.Contains("+") || str.Contains("-"))); + } + + private bool AreEquivalentDateTimeStrings(string str1, string str2) + { + // Try to parse both as DateTime + if (DateTime.TryParse(str1, out DateTime dt1) && DateTime.TryParse(str2, out DateTime dt2)) + { + return dt1 == dt2; + } + + return false; + } + + private bool CompareJsonObjects(JsonElement x, JsonElement y, string path) + { + // Create dictionaries for both JSON objects + var xProps = new Dictionary(); + var yProps = new Dictionary(); + + foreach (var prop in x.EnumerateObject()) + xProps[prop.Name] = prop.Value; + + foreach (var prop in y.EnumerateObject()) + yProps[prop.Name] = prop.Value; + + // Check if all properties in x exist in y + foreach (var key in xProps.Keys) + { + if (!yProps.ContainsKey(key)) + { + _failurePath = $"{path}: Missing property '{key}'"; + return false; + } + } + + // Check if y has extra properties + foreach (var key in yProps.Keys) + { + if (!xProps.ContainsKey(key)) + { + _failurePath = $"{path}: Unexpected property '{key}'"; + return false; + } + } + + // Compare each property value + foreach (var key in xProps.Keys) + { + var propPath = string.IsNullOrEmpty(path) ? key : $"{path}.{key}"; + if (!CompareJsonElements(xProps[key], yProps[key], propPath)) + { + return false; + } + } + + return true; + } + + private bool CompareJsonArraysInOrder(JsonElement x, JsonElement y, string path) + { + var xArray = x.EnumerateArray(); + var yArray = y.EnumerateArray(); + + // Count x elements + var xCount = 0; + var xElements = new List(); + foreach (var item in xArray) + { + xElements.Add(item); + xCount++; + } + + // Count y elements + var yCount = 0; + var yElements = new List(); + foreach (var item in yArray) + { + yElements.Add(item); + yCount++; + } + + // Check if counts match + if (xCount != yCount) + { + _failurePath = $"{path}: Expected {xCount} items but found {yCount}"; + return false; + } + + // Compare elements in order + for (var i = 0; i < xCount; i++) + { + var itemPath = $"{path}[{i}]"; + if (!CompareJsonElements(xElements[i], yElements[i], itemPath)) + { + return false; + } + } + + return true; + } + + /// + public override string ToString() + { + if (!string.IsNullOrEmpty(_failurePath)) + { + return $"JSON comparison failed at {_failurePath}"; + } + + return "JsonElementEqualityComparer"; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/NUnitExtensions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/NUnitExtensions.cs new file mode 100644 index 000000000000..170795cb2c3e --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/NUnitExtensions.cs @@ -0,0 +1,30 @@ +using NUnit.Framework.Constraints; + +namespace NUnit.Framework; + +/// +/// Extensions for NUnit constraints. +/// +public static class NUnitExtensions +{ + /// + /// Modifies the EqualConstraint to use our own set of default comparers. + /// + /// + /// + public static EqualConstraint UsingDefaults(this EqualConstraint constraint) => + constraint + .UsingPropertiesComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingReadOnlyMemoryComparer() + .UsingOneOfComparer() + .UsingJsonElementComparer() + .UsingOptionalComparer() + .UsingAdditionalPropertiesComparer(); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OneOfComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OneOfComparer.cs new file mode 100644 index 000000000000..767439174363 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OneOfComparer.cs @@ -0,0 +1,86 @@ +using NUnit.Framework.Constraints; +using OneOf; + +namespace NUnit.Framework; + +/// +/// Extensions for EqualConstraint to handle OneOf values. +/// +public static class EqualConstraintExtensions +{ + /// + /// Modifies the EqualConstraint to handle OneOf instances by comparing their inner values. + /// This works alongside other comparison modifiers like UsingPropertiesComparer. + /// + /// The EqualConstraint to modify. + /// The same constraint instance for method chaining. + public static EqualConstraint UsingOneOfComparer(this EqualConstraint constraint) + { + // Register a comparer factory for IOneOf types + constraint.Using( + (x, y) => + { + // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (x.Value is null && y.Value is null) + { + return true; + } + + if (x.Value is null) + { + return false; + } + + var propertiesComparer = new NUnitEqualityComparer(); + var tolerance = Tolerance.Default; + propertiesComparer.CompareProperties = true; + // Add OneOf comparer to handle nested OneOf values (e.g., in Lists) + propertiesComparer.ExternalComparers.Add( + new OneOfEqualityAdapter(propertiesComparer) + ); + return propertiesComparer.AreEqual(x.Value, y.Value, ref tolerance); + } + ); + + return constraint; + } + + /// + /// EqualityAdapter for comparing IOneOf instances within NUnitEqualityComparer. + /// This enables recursive comparison of nested OneOf values. + /// + private class OneOfEqualityAdapter : EqualityAdapter + { + private readonly NUnitEqualityComparer _comparer; + + public OneOfEqualityAdapter(NUnitEqualityComparer comparer) + { + _comparer = comparer; + } + + public override bool CanCompare(object? x, object? y) + { + return x is IOneOf && y is IOneOf; + } + + public override bool AreEqual(object? x, object? y) + { + var oneOfX = (IOneOf?)x; + var oneOfY = (IOneOf?)y; + + // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (oneOfX?.Value is null && oneOfY?.Value is null) + { + return true; + } + + if (oneOfX?.Value is null || oneOfY?.Value is null) + { + return false; + } + + var tolerance = Tolerance.Default; + return _comparer.AreEqual(oneOfX.Value, oneOfY.Value, ref tolerance); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs new file mode 100644 index 000000000000..6a24fc4368c1 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/OptionalComparer.cs @@ -0,0 +1,104 @@ +using Contoso.Net.Core; +using NUnit.Framework.Constraints; +using OneOf; + +namespace NUnit.Framework; + +/// +/// Extensions for EqualConstraint to handle Optional values. +/// +public static class OptionalComparerExtensions +{ + /// + /// Modifies the EqualConstraint to handle Optional instances by comparing their IsDefined state and inner values. + /// This works alongside other comparison modifiers like UsingPropertiesComparer. + /// + /// The EqualConstraint to modify. + /// The same constraint instance for method chaining. + public static EqualConstraint UsingOptionalComparer(this EqualConstraint constraint) + { + // Register a comparer factory for IOptional types + constraint.Using( + (x, y) => + { + // Both must have the same IsDefined state + if (x.IsDefined != y.IsDefined) + { + return false; + } + + // If both are undefined, they're equal + if (!x.IsDefined) + { + return true; + } + + // Both are defined, compare their boxed values + var xValue = x.GetBoxedValue(); + var yValue = y.GetBoxedValue(); + + // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (xValue is null && yValue is null) + { + return true; + } + + if (xValue is null || yValue is null) + { + return false; + } + + // Use NUnit's property comparer for the inner values + var propertiesComparer = new NUnitEqualityComparer(); + var tolerance = Tolerance.Default; + propertiesComparer.CompareProperties = true; + // Add OneOf comparer to handle nested OneOf values (e.g., in Lists within Optional) + propertiesComparer.ExternalComparers.Add( + new OneOfEqualityAdapter(propertiesComparer) + ); + return propertiesComparer.AreEqual(xValue, yValue, ref tolerance); + } + ); + + return constraint; + } + + /// + /// EqualityAdapter for comparing IOneOf instances within NUnitEqualityComparer. + /// This enables recursive comparison of nested OneOf values within Optional types. + /// + private class OneOfEqualityAdapter : EqualityAdapter + { + private readonly NUnitEqualityComparer _comparer; + + public OneOfEqualityAdapter(NUnitEqualityComparer comparer) + { + _comparer = comparer; + } + + public override bool CanCompare(object? x, object? y) + { + return x is IOneOf && y is IOneOf; + } + + public override bool AreEqual(object? x, object? y) + { + var oneOfX = (IOneOf?)x; + var oneOfY = (IOneOf?)y; + + // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract + if (oneOfX?.Value is null && oneOfY?.Value is null) + { + return true; + } + + if (oneOfX?.Value is null || oneOfY?.Value is null) + { + return false; + } + + var tolerance = Tolerance.Default; + return _comparer.AreEqual(oneOfX.Value, oneOfY.Value, ref tolerance); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/ReadOnlyMemoryComparer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/ReadOnlyMemoryComparer.cs new file mode 100644 index 000000000000..fc0b595a5e54 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net.Test/Utils/ReadOnlyMemoryComparer.cs @@ -0,0 +1,87 @@ +using NUnit.Framework.Constraints; + +namespace NUnit.Framework; + +/// +/// Extensions for NUnit constraints. +/// +public static class ReadOnlyMemoryComparerExtensions +{ + /// + /// Extension method for comparing ReadOnlyMemory<T> in NUnit tests. + /// + /// The type of elements in the ReadOnlyMemory. + /// The Is.EqualTo() constraint instance. + /// A constraint that can compare ReadOnlyMemory<T>. + public static EqualConstraint UsingReadOnlyMemoryComparer(this EqualConstraint constraint) + where T : IComparable + { + return constraint.Using(new ReadOnlyMemoryComparer()); + } +} + +/// +/// Comparer for ReadOnlyMemory<T>. Compares sequences by value. +/// +/// +/// The type of elements in the ReadOnlyMemory. +/// +public class ReadOnlyMemoryComparer : IComparer> + where T : IComparable +{ + /// + public int Compare(ReadOnlyMemory x, ReadOnlyMemory y) + { + // Check if sequences are equal + var xSpan = x.Span; + var ySpan = y.Span; + + // Optimized case for IEquatable implementations + if (typeof(IEquatable).IsAssignableFrom(typeof(T))) + { + var areEqual = xSpan.SequenceEqual(ySpan); + if (areEqual) + { + return 0; // Sequences are equal + } + } + else + { + // Manual equality check for non-IEquatable types + if (xSpan.Length == ySpan.Length) + { + var areEqual = true; + for (var i = 0; i < xSpan.Length; i++) + { + if (!EqualityComparer.Default.Equals(xSpan[i], ySpan[i])) + { + areEqual = false; + break; + } + } + + if (areEqual) + { + return 0; // Sequences are equal + } + } + } + + // For non-equal sequences, we need to return a consistent ordering + // First compare lengths + if (x.Length != y.Length) + return x.Length.CompareTo(y.Length); + + // Same length but different content - compare first differing element + for (var i = 0; i < x.Length; i++) + { + if (!EqualityComparer.Default.Equals(xSpan[i], ySpan[i])) + { + return xSpan[i].CompareTo(ySpan[i]); + } + } + + // Should never reach here if not equal + return 0; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.Custom.props b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.Custom.props new file mode 100644 index 000000000000..17a84cada530 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.Custom.props @@ -0,0 +1,20 @@ + + + + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.csproj b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.csproj new file mode 100644 index 000000000000..d594c63b2b63 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.Net.csproj @@ -0,0 +1,58 @@ + + + net462;net8.0;netstandard2.0 + enable + 12 + enable + 0.0.1 + $(Version) + $(Version) + README.md + https://github.com/csharp-namespace-collision/fern + true + + + + false + + + $(DefineConstants);USE_PORTABLE_DATE_ONLY + true + + + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + + + <_Parameter1>Contoso.Net.Test + + + + + diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs new file mode 100644 index 000000000000..55f315c25b1c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Contoso.cs @@ -0,0 +1,211 @@ +using System.Text.Json; +using Contoso.Net.Core; +using Contoso.Net.System; + +namespace Contoso.Net; + +public partial class Contoso : IContoso +{ + private readonly RawClient _client; + + public Contoso(ClientOptions? clientOptions = null) + { + clientOptions ??= new ClientOptions(); + var platformHeaders = new Headers( + new Dictionary() + { + { "X-Fern-Language", "C#" }, + { "X-Fern-SDK-Name", "Contoso.Net" }, + { "X-Fern-SDK-Version", Version.Current }, + { "User-Agent", "Ferncsharp-namespace-collision/0.0.1" }, + } + ); + foreach (var header in platformHeaders) + { + if (!clientOptions.Headers.ContainsKey(header.Key)) + { + clientOptions.Headers[header.Key] = header.Value; + } + } + _client = new RawClient(clientOptions); + System = new SystemClient(_client); + } + + public ISystemClient System { get; } + + private async global::System.Threading.Tasks.Task> CreateUserAsyncCore( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/users", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new ContosoApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new ContosoApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + + private async global::System.Threading.Tasks.Task> CreateTaskAsyncCore( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/users", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new ContosoApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new ContosoApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + + /// + /// await client.CreateUserAsync( + /// new global::Contoso.Net.User + /// { + /// Id = "id", + /// Name = "name", + /// Email = "email", + /// Password = "password", + /// } + /// ); + /// + public WithRawResponseTask CreateUserAsync( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + CreateUserAsyncCore(request, options, cancellationToken) + ); + } + + /// + /// await client.CreateTaskAsync( + /// new global::Contoso.Net.Task + /// { + /// Id = "id", + /// Name = "name", + /// Email = "email", + /// Password = "password", + /// } + /// ); + /// + public WithRawResponseTask CreateTaskAsync( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + CreateTaskAsyncCore(request, options, cancellationToken) + ); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ApiResponse.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ApiResponse.cs new file mode 100644 index 000000000000..cfd127665300 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ApiResponse.cs @@ -0,0 +1,13 @@ +using global::System.Net.Http; + +namespace Contoso.Net.Core; + +/// +/// The response object returned from the API. +/// +internal record ApiResponse +{ + internal required int StatusCode { get; init; } + + internal required HttpResponseMessage Raw { get; init; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/BaseRequest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/BaseRequest.cs new file mode 100644 index 000000000000..4e03dcb80f17 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/BaseRequest.cs @@ -0,0 +1,67 @@ +using global::System.Net.Http; +using global::System.Net.Http.Headers; +using global::System.Text; + +namespace Contoso.Net.Core; + +internal abstract record BaseRequest +{ + internal string? BaseUrl { get; init; } + + internal required HttpMethod Method { get; init; } + + internal required string Path { get; init; } + + internal string? ContentType { get; init; } + + /// + /// The query string for this request (including the leading '?' if non-empty). + /// + internal string? QueryString { get; init; } + + internal Dictionary Headers { get; init; } = + new(StringComparer.OrdinalIgnoreCase); + + internal IRequestOptions? Options { get; init; } + + internal abstract HttpContent? CreateContent(); + + protected static ( + Encoding encoding, + string? charset, + string mediaType + ) ParseContentTypeOrDefault( + string? contentType, + Encoding encodingFallback, + string mediaTypeFallback + ) + { + var encoding = encodingFallback; + var mediaType = mediaTypeFallback; + string? charset = null; + if (string.IsNullOrEmpty(contentType)) + { + return (encoding, charset, mediaType); + } + + if (!MediaTypeHeaderValue.TryParse(contentType, out var mediaTypeHeaderValue)) + { + return (encoding, charset, mediaType); + } + + if (!string.IsNullOrEmpty(mediaTypeHeaderValue.CharSet)) + { + charset = mediaTypeHeaderValue.CharSet; + encoding = Encoding.GetEncoding(mediaTypeHeaderValue.CharSet); + } + + if (!string.IsNullOrEmpty(mediaTypeHeaderValue.MediaType)) + { + mediaType = mediaTypeHeaderValue.MediaType; + } + + return (encoding, charset, mediaType); + } + + protected static Encoding Utf8NoBom => EncodingCache.Utf8NoBom; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/CollectionItemSerializer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/CollectionItemSerializer.cs new file mode 100644 index 000000000000..aa2f6ce3421d --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/CollectionItemSerializer.cs @@ -0,0 +1,89 @@ +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Contoso.Net.Core; + +/// +/// Json collection converter. +/// +/// Type of item to convert. +/// Converter to use for individual items. +internal class CollectionItemSerializer + : JsonConverter> + where TConverterType : JsonConverter +{ + /// + /// Reads a json string and deserializes it into an object. + /// + /// Json reader. + /// Type to convert. + /// Serializer options. + /// Created object. + public override IEnumerable? Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + if (reader.TokenType == JsonTokenType.Null) + { + return default; + } + + var jsonSerializerOptions = new JsonSerializerOptions(options); + jsonSerializerOptions.Converters.Clear(); + jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); + + var returnValue = new List(); + + while (reader.TokenType != JsonTokenType.EndArray) + { + if (reader.TokenType != JsonTokenType.StartArray) + { + var item = (TDatatype)( + JsonSerializer.Deserialize(ref reader, typeof(TDatatype), jsonSerializerOptions) + ?? throw new global::System.Exception( + $"Failed to deserialize collection item of type {typeof(TDatatype)}" + ) + ); + returnValue.Add(item); + } + + reader.Read(); + } + + return returnValue; + } + + /// + /// Writes a json string. + /// + /// Json writer. + /// Value to write. + /// Serializer options. + public override void Write( + Utf8JsonWriter writer, + IEnumerable? value, + JsonSerializerOptions options + ) + { + if (value is null) + { + writer.WriteNullValue(); + return; + } + + var jsonSerializerOptions = new JsonSerializerOptions(options); + jsonSerializerOptions.Converters.Clear(); + jsonSerializerOptions.Converters.Add(Activator.CreateInstance()); + + writer.WriteStartArray(); + + foreach (var data in value) + { + JsonSerializer.Serialize(writer, data, jsonSerializerOptions); + } + + writer.WriteEndArray(); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Constants.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Constants.cs new file mode 100644 index 000000000000..12aae45ef35a --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Constants.cs @@ -0,0 +1,7 @@ +namespace Contoso.Net.Core; + +internal static class Constants +{ + public const string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"; + public const string DateFormat = "yyyy-MM-dd"; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateOnlyConverter.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateOnlyConverter.cs new file mode 100644 index 000000000000..65e5c7b0b8b6 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateOnlyConverter.cs @@ -0,0 +1,747 @@ +// ReSharper disable All +#pragma warning disable + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using global::System.Diagnostics; +using global::System.Diagnostics.CodeAnalysis; +using global::System.Globalization; +using global::System.Runtime.CompilerServices; +using global::System.Runtime.InteropServices; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +// ReSharper disable SuggestVarOrType_SimpleTypes +// ReSharper disable SuggestVarOrType_BuiltInTypes + +namespace Contoso.Net.Core +{ + /// + /// Custom converter for handling the data type with the System.Text.Json library. + /// + /// + /// This class backported from: + /// + /// System.Text.Json.Serialization.Converters.DateOnlyConverter + /// + public sealed class DateOnlyConverter : JsonConverter + { + private const int FormatLength = 10; // YYYY-MM-DD + + private const int MaxEscapedFormatLength = + FormatLength * JsonConstants.MaxExpansionFactorWhileEscaping; + + /// + public override DateOnly Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + if (reader.TokenType != JsonTokenType.String) + { + ThrowHelper.ThrowInvalidOperationException_ExpectedString(reader.TokenType); + } + + return ReadCore(ref reader); + } + + /// + public override DateOnly ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); + return ReadCore(ref reader); + } + + private static DateOnly ReadCore(ref Utf8JsonReader reader) + { + if ( + !JsonHelpers.IsInRangeInclusive( + reader.ValueLength(), + FormatLength, + MaxEscapedFormatLength + ) + ) + { + ThrowHelper.ThrowFormatException(DataType.DateOnly); + } + + scoped ReadOnlySpan source; + if (!reader.HasValueSequence && !reader.ValueIsEscaped) + { + source = reader.ValueSpan; + } + else + { + Span stackSpan = stackalloc byte[MaxEscapedFormatLength]; + int bytesWritten = reader.CopyString(stackSpan); + source = stackSpan.Slice(0, bytesWritten); + } + + if (!JsonHelpers.TryParseAsIso(source, out DateOnly value)) + { + ThrowHelper.ThrowFormatException(DataType.DateOnly); + } + + return value; + } + + /// + public override void Write( + Utf8JsonWriter writer, + DateOnly value, + JsonSerializerOptions options + ) + { +#if NET8_0_OR_GREATER + Span buffer = stackalloc byte[FormatLength]; +#else + Span buffer = stackalloc char[FormatLength]; +#endif + // ReSharper disable once RedundantAssignment + bool formattedSuccessfully = value.TryFormat( + buffer, + out int charsWritten, + "O".AsSpan(), + CultureInfo.InvariantCulture + ); + Debug.Assert(formattedSuccessfully && charsWritten == FormatLength); + writer.WriteStringValue(buffer); + } + + /// + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + DateOnly value, + JsonSerializerOptions options + ) + { +#if NET8_0_OR_GREATER + Span buffer = stackalloc byte[FormatLength]; +#else + Span buffer = stackalloc char[FormatLength]; +#endif + // ReSharper disable once RedundantAssignment + bool formattedSuccessfully = value.TryFormat( + buffer, + out int charsWritten, + "O".AsSpan(), + CultureInfo.InvariantCulture + ); + Debug.Assert(formattedSuccessfully && charsWritten == FormatLength); + writer.WritePropertyName(buffer); + } + } + + internal static class JsonConstants + { + // The maximum number of fraction digits the Json DateTime parser allows + public const int DateTimeParseNumFractionDigits = 16; + + // In the worst case, an ASCII character represented as a single utf-8 byte could expand 6x when escaped. + public const int MaxExpansionFactorWhileEscaping = 6; + + // The largest fraction expressible by TimeSpan and DateTime formats + public const int MaxDateTimeFraction = 9_999_999; + + // TimeSpan and DateTime formats allow exactly up to many digits for specifying the fraction after the seconds. + public const int DateTimeNumFractionDigits = 7; + + public const byte UtcOffsetToken = (byte)'Z'; + + public const byte TimePrefix = (byte)'T'; + + public const byte Period = (byte)'.'; + + public const byte Hyphen = (byte)'-'; + + public const byte Colon = (byte)':'; + + public const byte Plus = (byte)'+'; + } + + // ReSharper disable SuggestVarOrType_Elsewhere + // ReSharper disable SuggestVarOrType_SimpleTypes + // ReSharper disable SuggestVarOrType_BuiltInTypes + + internal static class JsonHelpers + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsInRangeInclusive(int value, int lowerBound, int upperBound) => + (uint)(value - lowerBound) <= (uint)(upperBound - lowerBound); + + public static bool IsDigit(byte value) => (uint)(value - '0') <= '9' - '0'; + + [StructLayout(LayoutKind.Auto)] + private struct DateTimeParseData + { + public int Year; + public int Month; + public int Day; + public bool IsCalendarDateOnly; + public int Hour; + public int Minute; + public int Second; + public int Fraction; // This value should never be greater than 9_999_999. + public int OffsetHours; + public int OffsetMinutes; + + // ReSharper disable once NotAccessedField.Local + public byte OffsetToken; + } + + public static bool TryParseAsIso(ReadOnlySpan source, out DateOnly value) + { + if ( + TryParseDateTimeOffset(source, out DateTimeParseData parseData) + && parseData.IsCalendarDateOnly + && TryCreateDateTime(parseData, DateTimeKind.Unspecified, out DateTime dateTime) + ) + { + value = DateOnly.FromDateTime(dateTime); + return true; + } + + value = default; + return false; + } + + /// + /// ISO 8601 date time parser (ISO 8601-1:2019). + /// + /// The date/time to parse in UTF-8 format. + /// The parsed for the given . + /// + /// Supports extended calendar date (5.2.2.1) and complete (5.4.2.1) calendar date/time of day + /// representations with optional specification of seconds and fractional seconds. + /// + /// Times can be explicitly specified as UTC ("Z" - 5.3.3) or offsets from UTC ("+/-hh:mm" 5.3.4.2). + /// If unspecified they are considered to be local per spec. + /// + /// Examples: (TZD is either "Z" or hh:mm offset from UTC) + /// + /// YYYY-MM-DD (e.g. 1997-07-16) + /// YYYY-MM-DDThh:mm (e.g. 1997-07-16T19:20) + /// YYYY-MM-DDThh:mm:ss (e.g. 1997-07-16T19:20:30) + /// YYYY-MM-DDThh:mm:ss.s (e.g. 1997-07-16T19:20:30.45) + /// YYYY-MM-DDThh:mmTZD (e.g. 1997-07-16T19:20+01:00) + /// YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:3001:00) + /// YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45Z) + /// + /// Generally speaking we always require the "extended" option when one exists (3.1.3.5). + /// The extended variants have separator characters between components ('-', ':', '.', etc.). + /// Spaces are not permitted. + /// + /// "true" if successfully parsed. + private static bool TryParseDateTimeOffset( + ReadOnlySpan source, + out DateTimeParseData parseData + ) + { + parseData = default; + + // too short datetime + Debug.Assert(source.Length >= 10); + + // Parse the calendar date + // ----------------------- + // ISO 8601-1:2019 5.2.2.1b "Calendar date complete extended format" + // [dateX] = [year]["-"][month]["-"][day] + // [year] = [YYYY] [0000 - 9999] (4.3.2) + // [month] = [MM] [01 - 12] (4.3.3) + // [day] = [DD] [01 - 28, 29, 30, 31] (4.3.4) + // + // Note: 5.2.2.2 "Representations with reduced precision" allows for + // just [year]["-"][month] (a) and just [year] (b), but we currently + // don't permit it. + + { + uint digit1 = source[0] - (uint)'0'; + uint digit2 = source[1] - (uint)'0'; + uint digit3 = source[2] - (uint)'0'; + uint digit4 = source[3] - (uint)'0'; + + if (digit1 > 9 || digit2 > 9 || digit3 > 9 || digit4 > 9) + { + return false; + } + + parseData.Year = (int)(digit1 * 1000 + digit2 * 100 + digit3 * 10 + digit4); + } + + if ( + source[4] != JsonConstants.Hyphen + || !TryGetNextTwoDigits(source.Slice(start: 5, length: 2), ref parseData.Month) + || source[7] != JsonConstants.Hyphen + || !TryGetNextTwoDigits(source.Slice(start: 8, length: 2), ref parseData.Day) + ) + { + return false; + } + + // We now have YYYY-MM-DD [dateX] + // ReSharper disable once ConvertIfStatementToSwitchStatement + if (source.Length == 10) + { + parseData.IsCalendarDateOnly = true; + return true; + } + + // Parse the time of day + // --------------------- + // + // ISO 8601-1:2019 5.3.1.2b "Local time of day complete extended format" + // [timeX] = ["T"][hour][":"][min][":"][sec] + // [hour] = [hh] [00 - 23] (4.3.8a) + // [minute] = [mm] [00 - 59] (4.3.9a) + // [sec] = [ss] [00 - 59, 60 with a leap second] (4.3.10a) + // + // ISO 8601-1:2019 5.3.3 "UTC of day" + // [timeX]["Z"] + // + // ISO 8601-1:2019 5.3.4.2 "Local time of day with the time shift between + // local timescale and UTC" (Extended format) + // + // [shiftX] = ["+"|"-"][hour][":"][min] + // + // Notes: + // + // "T" is optional per spec, but _only_ when times are used alone. In our + // case, we're reading out a complete date & time and as such require "T". + // (5.4.2.1b). + // + // For [timeX] We allow seconds to be omitted per 5.3.1.3a "Representations + // with reduced precision". 5.3.1.3b allows just specifying the hour, but + // we currently don't permit this. + // + // Decimal fractions are allowed for hours, minutes and seconds (5.3.14). + // We only allow fractions for seconds currently. Lower order components + // can't follow, i.e. you can have T23.3, but not T23.3:04. There must be + // one digit, but the max number of digits is implementation defined. We + // currently allow up to 16 digits of fractional seconds only. While we + // support 16 fractional digits we only parse the first seven, anything + // past that is considered a zero. This is to stay compatible with the + // DateTime implementation which is limited to this resolution. + + if (source.Length < 16) + { + // Source does not have enough characters for YYYY-MM-DDThh:mm + return false; + } + + // Parse THH:MM (e.g. "T10:32") + if ( + source[10] != JsonConstants.TimePrefix + || source[13] != JsonConstants.Colon + || !TryGetNextTwoDigits(source.Slice(start: 11, length: 2), ref parseData.Hour) + || !TryGetNextTwoDigits(source.Slice(start: 14, length: 2), ref parseData.Minute) + ) + { + return false; + } + + // We now have YYYY-MM-DDThh:mm + Debug.Assert(source.Length >= 16); + if (source.Length == 16) + { + return true; + } + + byte curByte = source[16]; + int sourceIndex = 17; + + // Either a TZD ['Z'|'+'|'-'] or a seconds separator [':'] is valid at this point + switch (curByte) + { + case JsonConstants.UtcOffsetToken: + parseData.OffsetToken = JsonConstants.UtcOffsetToken; + return sourceIndex == source.Length; + case JsonConstants.Plus: + case JsonConstants.Hyphen: + parseData.OffsetToken = curByte; + return ParseOffset(ref parseData, source.Slice(sourceIndex)); + case JsonConstants.Colon: + break; + default: + return false; + } + + // Try reading the seconds + if ( + source.Length < 19 + || !TryGetNextTwoDigits(source.Slice(start: 17, length: 2), ref parseData.Second) + ) + { + return false; + } + + // We now have YYYY-MM-DDThh:mm:ss + Debug.Assert(source.Length >= 19); + if (source.Length == 19) + { + return true; + } + + curByte = source[19]; + sourceIndex = 20; + + // Either a TZD ['Z'|'+'|'-'] or a seconds decimal fraction separator ['.'] is valid at this point + switch (curByte) + { + case JsonConstants.UtcOffsetToken: + parseData.OffsetToken = JsonConstants.UtcOffsetToken; + return sourceIndex == source.Length; + case JsonConstants.Plus: + case JsonConstants.Hyphen: + parseData.OffsetToken = curByte; + return ParseOffset(ref parseData, source.Slice(sourceIndex)); + case JsonConstants.Period: + break; + default: + return false; + } + + // Source does not have enough characters for second fractions (i.e. ".s") + // YYYY-MM-DDThh:mm:ss.s + if (source.Length < 21) + { + return false; + } + + // Parse fraction. This value should never be greater than 9_999_999 + int numDigitsRead = 0; + int fractionEnd = Math.Min( + sourceIndex + JsonConstants.DateTimeParseNumFractionDigits, + source.Length + ); + + while (sourceIndex < fractionEnd && IsDigit(curByte = source[sourceIndex])) + { + if (numDigitsRead < JsonConstants.DateTimeNumFractionDigits) + { + parseData.Fraction = parseData.Fraction * 10 + (int)(curByte - (uint)'0'); + numDigitsRead++; + } + + sourceIndex++; + } + + if (parseData.Fraction != 0) + { + while (numDigitsRead < JsonConstants.DateTimeNumFractionDigits) + { + parseData.Fraction *= 10; + numDigitsRead++; + } + } + + // We now have YYYY-MM-DDThh:mm:ss.s + Debug.Assert(sourceIndex <= source.Length); + if (sourceIndex == source.Length) + { + return true; + } + + curByte = source[sourceIndex++]; + + // TZD ['Z'|'+'|'-'] is valid at this point + switch (curByte) + { + case JsonConstants.UtcOffsetToken: + parseData.OffsetToken = JsonConstants.UtcOffsetToken; + return sourceIndex == source.Length; + case JsonConstants.Plus: + case JsonConstants.Hyphen: + parseData.OffsetToken = curByte; + return ParseOffset(ref parseData, source.Slice(sourceIndex)); + default: + return false; + } + + static bool ParseOffset(ref DateTimeParseData parseData, ReadOnlySpan offsetData) + { + // Parse the hours for the offset + if ( + offsetData.Length < 2 + || !TryGetNextTwoDigits(offsetData.Slice(0, 2), ref parseData.OffsetHours) + ) + { + return false; + } + + // We now have YYYY-MM-DDThh:mm:ss.s+|-hh + + if (offsetData.Length == 2) + { + // Just hours offset specified + return true; + } + + // Ensure we have enough for ":mm" + return offsetData.Length == 5 + && offsetData[2] == JsonConstants.Colon + && TryGetNextTwoDigits(offsetData.Slice(3), ref parseData.OffsetMinutes); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + // ReSharper disable once RedundantAssignment + private static bool TryGetNextTwoDigits(ReadOnlySpan source, ref int value) + { + Debug.Assert(source.Length == 2); + + uint digit1 = source[0] - (uint)'0'; + uint digit2 = source[1] - (uint)'0'; + + if (digit1 > 9 || digit2 > 9) + { + value = 0; + return false; + } + + value = (int)(digit1 * 10 + digit2); + return true; + } + + // The following methods are borrowed verbatim from src/Common/src/CoreLib/System/Buffers/Text/Utf8Parser/Utf8Parser.Date.Helpers.cs + + /// + /// Overflow-safe DateTime factory. + /// + private static bool TryCreateDateTime( + DateTimeParseData parseData, + DateTimeKind kind, + out DateTime value + ) + { + if (parseData.Year == 0) + { + value = default; + return false; + } + + Debug.Assert(parseData.Year <= 9999); // All of our callers to date parse the year from fixed 4-digit fields so this value is trusted. + + if ((uint)parseData.Month - 1 >= 12) + { + value = default; + return false; + } + + uint dayMinusOne = (uint)parseData.Day - 1; + if ( + dayMinusOne >= 28 + && dayMinusOne >= DateTime.DaysInMonth(parseData.Year, parseData.Month) + ) + { + value = default; + return false; + } + + if ((uint)parseData.Hour > 23) + { + value = default; + return false; + } + + if ((uint)parseData.Minute > 59) + { + value = default; + return false; + } + + // This needs to allow leap seconds when appropriate. + // See https://github.com/dotnet/runtime/issues/30135. + if ((uint)parseData.Second > 59) + { + value = default; + return false; + } + + Debug.Assert(parseData.Fraction is >= 0 and <= JsonConstants.MaxDateTimeFraction); // All of our callers to date parse the fraction from fixed 7-digit fields so this value is trusted. + + ReadOnlySpan days = DateTime.IsLeapYear(parseData.Year) + ? DaysToMonth366 + : DaysToMonth365; + int yearMinusOne = parseData.Year - 1; + int totalDays = + yearMinusOne * 365 + + yearMinusOne / 4 + - yearMinusOne / 100 + + yearMinusOne / 400 + + days[parseData.Month - 1] + + parseData.Day + - 1; + long ticks = totalDays * TimeSpan.TicksPerDay; + int totalSeconds = parseData.Hour * 3600 + parseData.Minute * 60 + parseData.Second; + ticks += totalSeconds * TimeSpan.TicksPerSecond; + ticks += parseData.Fraction; + value = new DateTime(ticks: ticks, kind: kind); + return true; + } + + private static ReadOnlySpan DaysToMonth365 => + [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + private static ReadOnlySpan DaysToMonth366 => + [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]; + } + + internal static class ThrowHelper + { + private const string ExceptionSourceValueToRethrowAsJsonException = + "System.Text.Json.Rethrowable"; + + [DoesNotReturn] + public static void ThrowInvalidOperationException_ExpectedString(JsonTokenType tokenType) + { + throw GetInvalidOperationException("string", tokenType); + } + + public static void ThrowFormatException(DataType dataType) + { + throw new FormatException(SR.Format(SR.UnsupportedFormat, dataType)) + { + Source = ExceptionSourceValueToRethrowAsJsonException, + }; + } + + private static global::System.Exception GetInvalidOperationException( + string message, + JsonTokenType tokenType + ) + { + return GetInvalidOperationException(SR.Format(SR.InvalidCast, tokenType, message)); + } + + private static InvalidOperationException GetInvalidOperationException(string message) + { + return new InvalidOperationException(message) + { + Source = ExceptionSourceValueToRethrowAsJsonException, + }; + } + } + + internal static class Utf8JsonReaderExtensions + { + internal static int ValueLength(this Utf8JsonReader reader) => + reader.HasValueSequence + ? checked((int)reader.ValueSequence.Length) + : reader.ValueSpan.Length; + } + + internal enum DataType + { + TimeOnly, + DateOnly, + } + + [SuppressMessage("ReSharper", "InconsistentNaming")] + internal static class SR + { + private static readonly bool s_usingResourceKeys = + AppContext.TryGetSwitch( + "System.Resources.UseSystemResourceKeys", + out bool usingResourceKeys + ) && usingResourceKeys; + + public static string UnsupportedFormat => Strings.UnsupportedFormat; + + public static string InvalidCast => Strings.InvalidCast; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static string Format(string resourceFormat, object? p1) => + s_usingResourceKeys + ? string.Join(", ", resourceFormat, p1) + : string.Format(resourceFormat, p1); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal static string Format(string resourceFormat, object? p1, object? p2) => + s_usingResourceKeys + ? string.Join(", ", resourceFormat, p1, p2) + : string.Format(resourceFormat, p1, p2); + } + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute( + "System.Resources.Tools.StronglyTypedResourceBuilder", + "17.0.0.0" + )] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings + { + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute( + "Microsoft.Performance", + "CA1811:AvoidUncalledPrivateCode" + )] + internal Strings() { } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute( + global::System.ComponentModel.EditorBrowsableState.Advanced + )] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = + new global::System.Resources.ResourceManager( + "System.Text.Json.Resources.Strings", + typeof(Strings).Assembly + ); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute( + global::System.ComponentModel.EditorBrowsableState.Advanced + )] + internal static global::System.Globalization.CultureInfo Culture + { + get { return resourceCulture; } + set { resourceCulture = value; } + } + + /// + /// Looks up a localized string similar to Cannot get the value of a token type '{0}' as a {1}.. + /// + internal static string InvalidCast + { + get { return ResourceManager.GetString("InvalidCast", resourceCulture); } + } + + /// + /// Looks up a localized string similar to The JSON value is not in a supported {0} format.. + /// + internal static string UnsupportedFormat + { + get { return ResourceManager.GetString("UnsupportedFormat", resourceCulture); } + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateTimeSerializer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateTimeSerializer.cs new file mode 100644 index 000000000000..0c6aca875b4b --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/DateTimeSerializer.cs @@ -0,0 +1,22 @@ +using global::System.Globalization; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Contoso.Net.Core; + +internal class DateTimeSerializer : JsonConverter +{ + public override DateTime Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + return DateTime.Parse(reader.GetString()!, null, DateTimeStyles.RoundtripKind); + } + + public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) + { + writer.WriteStringValue(value.ToString(Constants.DateTimeFormat)); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EmptyRequest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EmptyRequest.cs new file mode 100644 index 000000000000..014b836ccd23 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EmptyRequest.cs @@ -0,0 +1,11 @@ +using global::System.Net.Http; + +namespace Contoso.Net.Core; + +/// +/// The request object to send without a request body. +/// +internal record EmptyRequest : BaseRequest +{ + internal override HttpContent? CreateContent() => null; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EncodingCache.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EncodingCache.cs new file mode 100644 index 000000000000..07b2c6c4b796 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/EncodingCache.cs @@ -0,0 +1,11 @@ +using global::System.Text; + +namespace Contoso.Net.Core; + +internal static class EncodingCache +{ + internal static readonly Encoding Utf8NoBom = new UTF8Encoding( + encoderShouldEmitUTF8Identifier: false, + throwOnInvalidBytes: true + ); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Extensions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Extensions.cs new file mode 100644 index 000000000000..ae342c6f96fb --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Extensions.cs @@ -0,0 +1,55 @@ +using global::System.Diagnostics.CodeAnalysis; +using global::System.Runtime.Serialization; + +namespace Contoso.Net.Core; + +internal static class Extensions +{ + public static string Stringify(this Enum value) + { + var field = value.GetType().GetField(value.ToString()); + if (field is not null) + { + var attribute = (EnumMemberAttribute?) + global::System.Attribute.GetCustomAttribute(field, typeof(EnumMemberAttribute)); + return attribute?.Value ?? value.ToString(); + } + return value.ToString(); + } + + /// + /// Asserts that a condition is true, throwing an exception with the specified message if it is false. + /// + /// The condition to assert. + /// The exception message if the assertion fails. + /// Thrown when the condition is false. + internal static void Assert(this object value, bool condition, string message) + { + if (!condition) + { + throw new global::System.Exception(message); + } + } + + /// + /// Asserts that a value is not null, throwing an exception with the specified message if it is null. + /// + /// The type of the value to assert. + /// The value to assert is not null. + /// The exception message if the assertion fails. + /// The non-null value. + /// Thrown when the value is null. + internal static TValue Assert( + this object _unused, + [NotNull] TValue? value, + string message + ) + where TValue : class + { + if (value is null) + { + throw new global::System.Exception(message); + } + return value; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/FormUrlEncoder.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/FormUrlEncoder.cs new file mode 100644 index 000000000000..6a60b747ff44 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/FormUrlEncoder.cs @@ -0,0 +1,33 @@ +using global::System.Net.Http; + +namespace Contoso.Net.Core; + +/// +/// Encodes an object into a form URL-encoded content. +/// +public static class FormUrlEncoder +{ + /// + /// Encodes an object into a form URL-encoded content using Deep Object notation. + /// + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + internal static FormUrlEncodedContent EncodeAsDeepObject(object value) => + new(QueryStringConverter.ToDeepObject(value)); + + /// + /// Encodes an object into a form URL-encoded content using Exploded Form notation. + /// + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + internal static FormUrlEncodedContent EncodeAsExplodedForm(object value) => + new(QueryStringConverter.ToExplodedForm(value)); + + /// + /// Encodes an object into a form URL-encoded content using Form notation without exploding parameters. + /// + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + internal static FormUrlEncodedContent EncodeAsForm(object value) => + new(QueryStringConverter.ToForm(value)); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeaderValue.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeaderValue.cs new file mode 100644 index 000000000000..9b64729da1bc --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeaderValue.cs @@ -0,0 +1,52 @@ +namespace Contoso.Net.Core; + +internal sealed class HeaderValue +{ + private readonly Func> _resolver; + + public HeaderValue(string value) + { + _resolver = () => new global::System.Threading.Tasks.ValueTask(value); + } + + public HeaderValue(Func value) + { + _resolver = () => new global::System.Threading.Tasks.ValueTask(value()); + } + + public HeaderValue(Func> value) + { + _resolver = value; + } + + public HeaderValue(Func> value) + { + _resolver = () => new global::System.Threading.Tasks.ValueTask(value()); + } + + public static implicit operator HeaderValue(string value) => new(value); + + public static implicit operator HeaderValue(Func value) => new(value); + + public static implicit operator HeaderValue( + Func> value + ) => new(value); + + public static implicit operator HeaderValue( + Func> value + ) => new(value); + + public static HeaderValue FromString(string value) => new(value); + + public static HeaderValue FromFunc(Func value) => new(value); + + public static HeaderValue FromValueTaskFunc( + Func> value + ) => new(value); + + public static HeaderValue FromTaskFunc( + Func> value + ) => new(value); + + internal global::System.Threading.Tasks.ValueTask ResolveAsync() => _resolver(); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Headers.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Headers.cs new file mode 100644 index 000000000000..d69251c03fd9 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Headers.cs @@ -0,0 +1,28 @@ +namespace Contoso.Net.Core; + +/// +/// Represents the headers sent with the request. +/// +internal sealed class Headers : Dictionary +{ + internal Headers() { } + + /// + /// Initializes a new instance of the Headers class with the specified value. + /// + /// + internal Headers(Dictionary value) + { + foreach (var kvp in value) + { + this[kvp.Key] = kvp.Value; + } + } + + /// + /// Initializes a new instance of the Headers class with the specified value. + /// + /// + internal Headers(IEnumerable> value) + : base(value.ToDictionary(e => e.Key, e => e.Value)) { } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeadersBuilder.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeadersBuilder.cs new file mode 100644 index 000000000000..54f43120a86d --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HeadersBuilder.cs @@ -0,0 +1,197 @@ +namespace Contoso.Net.Core; + +/// +/// Fluent builder for constructing HTTP headers with support for merging from multiple sources. +/// Provides a clean API for building headers with proper precedence handling. +/// +internal static class HeadersBuilder +{ + /// + /// Fluent builder for constructing HTTP headers. + /// + public sealed class Builder + { + private readonly Dictionary _headers; + + /// + /// Initializes a new instance with default capacity. + /// Uses case-insensitive header name comparison. + /// + public Builder() + { + _headers = new Dictionary(StringComparer.OrdinalIgnoreCase); + } + + /// + /// Initializes a new instance with the specified initial capacity. + /// Uses case-insensitive header name comparison. + /// + public Builder(int capacity) + { + _headers = new Dictionary( + capacity, + StringComparer.OrdinalIgnoreCase + ); + } + + /// + /// Adds a header with the specified key and value. + /// If a header with the same key already exists, it will be overwritten. + /// Null values are ignored. + /// + /// The header name. + /// The header value. Null values are ignored. + /// This builder instance for method chaining. + public Builder Add(string key, string? value) + { + if (value is not null) + { + _headers[key] = (value); + } + return this; + } + + /// + /// Adds a header with the specified key and object value. + /// The value will be converted to string using ValueConvert for consistent serialization. + /// If a header with the same key already exists, it will be overwritten. + /// Null values are ignored. + /// + /// The header name. + /// The header value. Null values are ignored. + /// This builder instance for method chaining. + public Builder Add(string key, object? value) + { + if (value is null) + { + return this; + } + + // Use ValueConvert for consistent serialization across headers, query params, and path params + var stringValue = ValueConvert.ToString(value); + if (stringValue is not null) + { + _headers[key] = (stringValue); + } + return this; + } + + /// + /// Adds multiple headers from a Headers dictionary. + /// HeaderValue instances are stored and will be resolved when BuildAsync() is called. + /// Overwrites any existing headers with the same key. + /// Null entries are ignored. + /// + /// The headers to add. Null is treated as empty. + /// This builder instance for method chaining. + public Builder Add(Headers? headers) + { + if (headers is null) + { + return this; + } + + foreach (var header in headers) + { + _headers[header.Key] = header.Value; + } + + return this; + } + + /// + /// Adds multiple headers from a Headers dictionary, excluding the Authorization header. + /// This is useful for endpoints that don't require authentication, to avoid triggering + /// lazy auth token resolution. + /// HeaderValue instances are stored and will be resolved when BuildAsync() is called. + /// Overwrites any existing headers with the same key. + /// Null entries are ignored. + /// + /// The headers to add. Null is treated as empty. + /// This builder instance for method chaining. + public Builder AddWithoutAuth(Headers? headers) + { + if (headers is null) + { + return this; + } + + foreach (var header in headers) + { + if (header.Key.Equals("Authorization", StringComparison.OrdinalIgnoreCase)) + { + continue; + } + _headers[header.Key] = header.Value; + } + + return this; + } + + /// + /// Adds multiple headers from a key-value pair collection. + /// Overwrites any existing headers with the same key. + /// Null values are ignored. + /// + /// The headers to add. Null is treated as empty. + /// This builder instance for method chaining. + public Builder Add(IEnumerable>? headers) + { + if (headers is null) + { + return this; + } + + foreach (var header in headers) + { + if (header.Value is not null) + { + _headers[header.Key] = (header.Value); + } + } + + return this; + } + + /// + /// Adds multiple headers from a dictionary. + /// Overwrites any existing headers with the same key. + /// + /// The headers to add. Null is treated as empty. + /// This builder instance for method chaining. + public Builder Add(Dictionary? headers) + { + if (headers is null) + { + return this; + } + + foreach (var header in headers) + { + _headers[header.Key] = (header.Value); + } + + return this; + } + + /// + /// Asynchronously builds the final headers dictionary containing all merged headers. + /// Resolves all HeaderValue instances that may contain async operations. + /// Returns a case-insensitive dictionary. + /// + /// A task that represents the asynchronous operation, containing a case-insensitive dictionary of headers. + public async global::System.Threading.Tasks.Task> BuildAsync() + { + var headers = new Dictionary(StringComparer.OrdinalIgnoreCase); + foreach (var kvp in _headers) + { + var value = await kvp.Value.ResolveAsync().ConfigureAwait(false); + if (value is not null) + { + headers[kvp.Key] = value; + } + } + return headers; + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpContentExtensions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpContentExtensions.cs new file mode 100644 index 000000000000..3ca9e2168951 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpContentExtensions.cs @@ -0,0 +1,20 @@ +#if !NET5_0_OR_GREATER +namespace Contoso.Net.Core; + +/// +/// Polyfill extension providing a ReadAsStringAsync(CancellationToken) overload +/// for target frameworks older than .NET 5, where only the parameterless +/// ReadAsStringAsync() is available. +/// +internal static class HttpContentExtensions +{ + internal static Task ReadAsStringAsync( + this HttpContent httpContent, + CancellationToken cancellationToken + ) + { + cancellationToken.ThrowIfCancellationRequested(); + return httpContent.ReadAsStringAsync(); + } +} +#endif diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpMethodExtensions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpMethodExtensions.cs new file mode 100644 index 000000000000..68ccde231c27 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/HttpMethodExtensions.cs @@ -0,0 +1,8 @@ +using global::System.Net.Http; + +namespace Contoso.Net.Core; + +internal static class HttpMethodExtensions +{ + public static readonly HttpMethod Patch = new("PATCH"); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IIsRetryableContent.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IIsRetryableContent.cs new file mode 100644 index 000000000000..1a9f9c1b8b87 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IIsRetryableContent.cs @@ -0,0 +1,6 @@ +namespace Contoso.Net.Core; + +public interface IIsRetryableContent +{ + public bool IsRetryable { get; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IRequestOptions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IRequestOptions.cs new file mode 100644 index 000000000000..2a50149e2356 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/IRequestOptions.cs @@ -0,0 +1,83 @@ +namespace Contoso.Net.Core; + +internal interface IRequestOptions +{ + /// + /// The Base URL for the API. + /// + public string? BaseUrl { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// The http client used to make requests. + /// + public HttpClient? HttpClient { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// Additional headers to be sent with the request. + /// Headers previously set with matching keys will be overwritten. + /// + public IEnumerable> AdditionalHeaders { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// The max number of retries to attempt. + /// + public int? MaxRetries { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// The timeout for the request. + /// + public TimeSpan? Timeout { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// Additional query parameters sent with the request. + /// + public IEnumerable> AdditionalQueryParameters { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// Additional body properties sent with the request. + /// This is only applied to JSON requests. + /// + public object? AdditionalBodyProperties { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonAccessAttribute.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonAccessAttribute.cs new file mode 100644 index 000000000000..30d7c1b1bda6 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonAccessAttribute.cs @@ -0,0 +1,15 @@ +namespace Contoso.Net.Core; + +[global::System.AttributeUsage( + global::System.AttributeTargets.Property | global::System.AttributeTargets.Field +)] +internal class JsonAccessAttribute(JsonAccessType accessType) : global::System.Attribute +{ + internal JsonAccessType AccessType { get; init; } = accessType; +} + +internal enum JsonAccessType +{ + ReadOnly, + WriteOnly, +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonConfiguration.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonConfiguration.cs new file mode 100644 index 000000000000..a8d4fcde87be --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonConfiguration.cs @@ -0,0 +1,275 @@ +using global::System.Reflection; +using global::System.Text.Encodings.Web; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; +using global::System.Text.Json.Serialization; +using global::System.Text.Json.Serialization.Metadata; + +namespace Contoso.Net.Core; + +internal static partial class JsonOptions +{ + internal static readonly JsonSerializerOptions JsonSerializerOptions; + internal static readonly JsonSerializerOptions JsonSerializerOptionsRelaxedEscaping; + + static JsonOptions() + { + var options = new JsonSerializerOptions + { + Converters = + { + new DateTimeSerializer(), +#if USE_PORTABLE_DATE_ONLY + new DateOnlyConverter(), +#endif + new OneOfSerializer(), + new OptionalJsonConverterFactory(), + }, +#if DEBUG + WriteIndented = true, +#endif + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = new DefaultJsonTypeInfoResolver + { + Modifiers = + { + NullableOptionalModifier, + JsonAccessAndIgnoreModifier, + HandleExtensionDataFields, + }, + }, + }; + ConfigureJsonSerializerOptions(options); + JsonSerializerOptions = options; + + var relaxedOptions = new JsonSerializerOptions(options) + { + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, + }; + JsonSerializerOptionsRelaxedEscaping = relaxedOptions; + } + + private static void NullableOptionalModifier(JsonTypeInfo typeInfo) + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (var property in typeInfo.Properties) + { + var propertyInfo = property.AttributeProvider as global::System.Reflection.PropertyInfo; + + if (propertyInfo is null) + continue; + + // Check for ReadOnly JsonAccessAttribute - it overrides Optional/Nullable behavior + var jsonAccessAttribute = propertyInfo.GetCustomAttribute(); + if (jsonAccessAttribute?.AccessType == JsonAccessType.ReadOnly) + { + // ReadOnly means "never serialize", which completely overrides Optional/Nullable. + // Skip Optional/Nullable processing since JsonAccessAndIgnoreModifier + // will set ShouldSerialize = false anyway. + continue; + } + // Note: WriteOnly doesn't conflict with Optional/Nullable since it only + // affects deserialization (Set), not serialization (ShouldSerialize) + + var isOptionalType = + property.PropertyType.IsGenericType + && property.PropertyType.GetGenericTypeDefinition() == typeof(Optional<>); + + var hasOptionalAttribute = + propertyInfo.GetCustomAttribute() is not null; + var hasNullableAttribute = + propertyInfo.GetCustomAttribute() is not null; + + if (isOptionalType && hasOptionalAttribute) + { + var originalGetter = property.Get; + if (originalGetter is not null) + { + var capturedIsNullable = hasNullableAttribute; + + property.ShouldSerialize = (obj, value) => + { + var optionalValue = originalGetter(obj); + if (optionalValue is not IOptional optional) + return false; + + if (!optional.IsDefined) + return false; + + if (!capturedIsNullable) + { + var innerValue = optional.GetBoxedValue(); + if (innerValue is null) + return false; + } + + return true; + }; + } + } + else if (hasNullableAttribute) + { + // Force serialization of nullable properties even when null + property.ShouldSerialize = (obj, value) => true; + } + } + } + + private static void JsonAccessAndIgnoreModifier(JsonTypeInfo typeInfo) + { + if (typeInfo.Kind != JsonTypeInfoKind.Object) + return; + + foreach (var propertyInfo in typeInfo.Properties) + { + var jsonAccessAttribute = propertyInfo + .AttributeProvider?.GetCustomAttributes(typeof(JsonAccessAttribute), true) + .OfType() + .FirstOrDefault(); + + if (jsonAccessAttribute is not null) + { + propertyInfo.IsRequired = false; + switch (jsonAccessAttribute.AccessType) + { + case JsonAccessType.ReadOnly: + propertyInfo.ShouldSerialize = (_, _) => false; + break; + case JsonAccessType.WriteOnly: + propertyInfo.Set = null; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + + var jsonIgnoreAttribute = propertyInfo + .AttributeProvider?.GetCustomAttributes(typeof(JsonIgnoreAttribute), true) + .OfType() + .FirstOrDefault(); + + if (jsonIgnoreAttribute is not null) + { + propertyInfo.IsRequired = false; + } + } + } + + private static void HandleExtensionDataFields(JsonTypeInfo typeInfo) + { + if ( + typeInfo.Kind == JsonTypeInfoKind.Object + && typeInfo.Properties.All(prop => !prop.IsExtensionData) + ) + { + var extensionProp = typeInfo + .Type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic) + .FirstOrDefault(prop => + prop.GetCustomAttribute() is not null + ); + + if (extensionProp is not null) + { + var jsonPropertyInfo = typeInfo.CreateJsonPropertyInfo( + extensionProp.FieldType, + extensionProp.Name + ); + jsonPropertyInfo.Get = extensionProp.GetValue; + jsonPropertyInfo.Set = extensionProp.SetValue; + jsonPropertyInfo.IsExtensionData = true; + typeInfo.Properties.Add(jsonPropertyInfo); + } + } + } + + static partial void ConfigureJsonSerializerOptions(JsonSerializerOptions defaultOptions); +} + +internal static class JsonUtils +{ + internal static string Serialize(T obj) => + JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptions); + + internal static string Serialize(object obj, global::System.Type type) => + JsonSerializer.Serialize(obj, type, JsonOptions.JsonSerializerOptions); + + internal static string SerializeRelaxedEscaping(T obj) => + JsonSerializer.Serialize(obj, JsonOptions.JsonSerializerOptionsRelaxedEscaping); + + internal static string SerializeRelaxedEscaping(object obj, global::System.Type type) => + JsonSerializer.Serialize(obj, type, JsonOptions.JsonSerializerOptionsRelaxedEscaping); + + internal static JsonElement SerializeToElement(T obj) => + JsonSerializer.SerializeToElement(obj, JsonOptions.JsonSerializerOptions); + + internal static JsonElement SerializeToElement(object obj, global::System.Type type) => + JsonSerializer.SerializeToElement(obj, type, JsonOptions.JsonSerializerOptions); + + internal static JsonDocument SerializeToDocument(T obj) => + JsonSerializer.SerializeToDocument(obj, JsonOptions.JsonSerializerOptions); + + internal static JsonNode? SerializeToNode(T obj) => + JsonSerializer.SerializeToNode(obj, JsonOptions.JsonSerializerOptions); + + internal static byte[] SerializeToUtf8Bytes(T obj) => + JsonSerializer.SerializeToUtf8Bytes(obj, JsonOptions.JsonSerializerOptions); + + internal static string SerializeWithAdditionalProperties( + T obj, + object? additionalProperties = null + ) + { + if (additionalProperties is null) + { + return Serialize(obj); + } + var additionalPropertiesJsonNode = SerializeToNode(additionalProperties); + if (additionalPropertiesJsonNode is not JsonObject additionalPropertiesJsonObject) + { + throw new InvalidOperationException( + "The additional properties must serialize to a JSON object." + ); + } + var jsonNode = SerializeToNode(obj); + if (jsonNode is not JsonObject jsonObject) + { + throw new InvalidOperationException( + "The serialized object must be a JSON object to add properties." + ); + } + MergeJsonObjects(jsonObject, additionalPropertiesJsonObject); + return jsonObject.ToJsonString(JsonOptions.JsonSerializerOptions); + } + + private static void MergeJsonObjects(JsonObject baseObject, JsonObject overrideObject) + { + foreach (var property in overrideObject) + { + if (!baseObject.TryGetPropertyValue(property.Key, out JsonNode? existingValue)) + { + baseObject[property.Key] = property.Value is not null + ? JsonNode.Parse(property.Value.ToJsonString()) + : null; + continue; + } + if ( + existingValue is JsonObject nestedBaseObject + && property.Value is JsonObject nestedOverrideObject + ) + { + // If both values are objects, recursively merge them. + MergeJsonObjects(nestedBaseObject, nestedOverrideObject); + continue; + } + // Otherwise, the overrideObject takes precedence. + baseObject[property.Key] = property.Value is not null + ? JsonNode.Parse(property.Value.ToJsonString()) + : null; + } + } + + internal static T Deserialize(string json) => + JsonSerializer.Deserialize(json, JsonOptions.JsonSerializerOptions)!; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonRequest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonRequest.cs new file mode 100644 index 000000000000..6d3eec0c3b41 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/JsonRequest.cs @@ -0,0 +1,36 @@ +using global::System.Net.Http; + +namespace Contoso.Net.Core; + +/// +/// The request object to be sent for JSON APIs. +/// +internal record JsonRequest : BaseRequest +{ + internal object? Body { get; init; } + + internal override HttpContent? CreateContent() + { + if (Body is null && Options?.AdditionalBodyProperties is null) + { + return null; + } + + var (encoding, charset, mediaType) = ParseContentTypeOrDefault( + ContentType, + Utf8NoBom, + "application/json" + ); + var content = new StringContent( + JsonUtils.SerializeWithAdditionalProperties(Body, Options?.AdditionalBodyProperties), + encoding, + mediaType + ); + if (string.IsNullOrEmpty(charset) && content.Headers.ContentType is not null) + { + content.Headers.ContentType.CharSet = ""; + } + + return content; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/MultipartFormRequest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/MultipartFormRequest.cs new file mode 100644 index 000000000000..c2532486f07c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/MultipartFormRequest.cs @@ -0,0 +1,294 @@ +using global::System.Net.Http; +using global::System.Net.Http.Headers; + +namespace Contoso.Net.Core; + +/// +/// The request object to be sent for multipart form data. +/// +internal record MultipartFormRequest : BaseRequest +{ + private readonly List> _partAdders = []; + + internal void AddJsonPart(string name, object? value) => AddJsonPart(name, value, null); + + internal void AddJsonPart(string name, object? value, string? contentType) + { + if (value is null) + { + return; + } + + _partAdders.Add(form => + { + var (encoding, charset, mediaType) = ParseContentTypeOrDefault( + contentType, + Utf8NoBom, + "application/json" + ); + var content = new StringContent(JsonUtils.Serialize(value), encoding, mediaType); + if (string.IsNullOrEmpty(charset) && content.Headers.ContentType is not null) + { + content.Headers.ContentType.CharSet = ""; + } + + form.Add(content, name); + }); + } + + internal void AddJsonParts(string name, IEnumerable? value) => + AddJsonParts(name, value, null); + + internal void AddJsonParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddJsonPart(name, item, contentType); + } + } + + internal void AddJsonParts(string name, IEnumerable? value) => + AddJsonParts(name, value, null); + + internal void AddJsonParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddJsonPart(name, item, contentType); + } + } + + internal void AddStringPart(string name, object? value) => AddStringPart(name, value, null); + + internal void AddStringPart(string name, object? value, string? contentType) + { + if (value is null) + { + return; + } + + AddStringPart(name, ValueConvert.ToString(value), contentType); + } + + internal void AddStringPart(string name, string? value) => AddStringPart(name, value, null); + + internal void AddStringPart(string name, string? value, string? contentType) + { + if (value is null) + { + return; + } + + _partAdders.Add(form => + { + var (encoding, charset, mediaType) = ParseContentTypeOrDefault( + contentType, + Utf8NoBom, + "text/plain" + ); + var content = new StringContent(value, encoding, mediaType); + if (string.IsNullOrEmpty(charset) && content.Headers.ContentType is not null) + { + content.Headers.ContentType.CharSet = ""; + } + + form.Add(content, name); + }); + } + + internal void AddStringParts(string name, IEnumerable? value) => + AddStringParts(name, value, null); + + internal void AddStringParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + AddStringPart(name, ValueConvert.ToString(value), contentType); + } + + internal void AddStringParts(string name, IEnumerable? value) => + AddStringParts(name, value, null); + + internal void AddStringParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddStringPart(name, item, contentType); + } + } + + internal void AddStreamPart(string name, Stream? stream, string? fileName) => + AddStreamPart(name, stream, fileName, null); + + internal void AddStreamPart(string name, Stream? stream, string? fileName, string? contentType) + { + if (stream is null) + { + return; + } + + _partAdders.Add(form => + { + var content = new StreamContent(stream) + { + Headers = + { + ContentType = MediaTypeHeaderValue.Parse( + contentType ?? "application/octet-stream" + ), + }, + }; + + if (fileName is not null) + { + form.Add(content, name, fileName); + } + else + { + form.Add(content, name); + } + }); + } + + internal void AddFileParameterPart(string name, Stream? stream) => + AddStreamPart(name, stream, null, null); + + internal void AddFileParameterPart(string name, FileParameter? file) => + AddFileParameterPart(name, file, null); + + internal void AddFileParameterPart( + string name, + FileParameter? file, + string? fallbackContentType + ) => + AddStreamPart(name, file?.Stream, file?.FileName, file?.ContentType ?? fallbackContentType); + + internal void AddFileParameterParts(string name, IEnumerable? files) => + AddFileParameterParts(name, files, null); + + internal void AddFileParameterParts( + string name, + IEnumerable? files, + string? fallbackContentType + ) + { + if (files is null) + { + return; + } + + foreach (var file in files) + { + AddFileParameterPart(name, file, fallbackContentType); + } + } + + internal void AddFormEncodedPart(string name, object? value) => + AddFormEncodedPart(name, value, null); + + internal void AddFormEncodedPart(string name, object? value, string? contentType) + { + if (value is null) + { + return; + } + + _partAdders.Add(form => + { + var content = FormUrlEncoder.EncodeAsForm(value); + if (!string.IsNullOrEmpty(contentType)) + { + content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentType); + } + + form.Add(content, name); + }); + } + + internal void AddFormEncodedParts(string name, IEnumerable? value) => + AddFormEncodedParts(name, value, null); + + internal void AddFormEncodedParts(string name, IEnumerable? value, string? contentType) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddFormEncodedPart(name, item, contentType); + } + } + + internal void AddExplodedFormEncodedPart(string name, object? value) => + AddExplodedFormEncodedPart(name, value, null); + + internal void AddExplodedFormEncodedPart(string name, object? value, string? contentType) + { + if (value is null) + { + return; + } + + _partAdders.Add(form => + { + var content = FormUrlEncoder.EncodeAsExplodedForm(value); + if (!string.IsNullOrEmpty(contentType)) + { + content.Headers.ContentType = MediaTypeHeaderValue.Parse(contentType); + } + + form.Add(content, name); + }); + } + + internal void AddExplodedFormEncodedParts(string name, IEnumerable? value) => + AddExplodedFormEncodedParts(name, value, null); + + internal void AddExplodedFormEncodedParts( + string name, + IEnumerable? value, + string? contentType + ) + { + if (value is null) + { + return; + } + + foreach (var item in value) + { + AddExplodedFormEncodedPart(name, item, contentType); + } + } + + internal override HttpContent CreateContent() + { + var form = new MultipartFormDataContent(); + foreach (var adder in _partAdders) + { + adder(form); + } + + return form; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/NullableAttribute.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/NullableAttribute.cs new file mode 100644 index 000000000000..c492c4f39c07 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/NullableAttribute.cs @@ -0,0 +1,18 @@ +namespace Contoso.Net.Core; + +/// +/// Marks a property as nullable in the OpenAPI specification. +/// When applied to Optional properties, this indicates that null values should be +/// written to JSON when the optional is defined with null. +/// +/// +/// For regular (required) properties: +/// - Without [Nullable]: null values are invalid (omit from JSON at runtime) +/// - With [Nullable]: null values are written to JSON +/// +/// For Optional properties (also marked with [Optional]): +/// - Without [Nullable]: Optional.Of(null) → omit from JSON (runtime edge case) +/// - With [Nullable]: Optional.Of(null) → write null to JSON +/// +[global::System.AttributeUsage(global::System.AttributeTargets.Property, AllowMultiple = false)] +public class NullableAttribute : global::System.Attribute { } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OneOfSerializer.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OneOfSerializer.cs new file mode 100644 index 000000000000..96ad375a53f2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OneOfSerializer.cs @@ -0,0 +1,145 @@ +using global::System.Reflection; +using global::System.Text.Json; +using global::System.Text.Json.Serialization; +using OneOf; + +namespace Contoso.Net.Core; + +internal class OneOfSerializer : JsonConverter +{ + public override IOneOf? Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + if (reader.TokenType is JsonTokenType.Null) + return default; + + foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) + { + try + { + var readerCopy = reader; + var result = JsonSerializer.Deserialize(ref readerCopy, type, options); + reader.Skip(); + return (IOneOf)cast.Invoke(null, [result])!; + } + catch (JsonException) { } + } + + throw new JsonException( + $"Cannot deserialize into one of the supported types for {typeToConvert}" + ); + } + + public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) + { + JsonSerializer.Serialize(writer, value.Value, options); + } + + public override IOneOf ReadAsPropertyName( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = reader.GetString(); + if (stringValue == null) + throw new JsonException("Cannot deserialize null property name into OneOf type"); + + // Try to deserialize the string value into one of the supported types + foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) + { + try + { + // For primitive types, try direct conversion + if (type == typeof(string)) + { + return (IOneOf)cast.Invoke(null, [stringValue])!; + } + + // For other types, try to deserialize from JSON string + var result = JsonSerializer.Deserialize($"\"{stringValue}\"", type, options); + if (result != null) + { + return (IOneOf)cast.Invoke(null, [result])!; + } + } + catch { } + } + + // If no type-specific deserialization worked, default to string if available + var stringType = GetOneOfTypes(typeToConvert).FirstOrDefault(t => t.type == typeof(string)); + if (stringType != default) + { + return (IOneOf)stringType.cast.Invoke(null, [stringValue])!; + } + + throw new JsonException( + $"Cannot deserialize dictionary key '{stringValue}' into one of the supported types for {typeToConvert}" + ); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + IOneOf value, + JsonSerializerOptions options + ) + { + // Serialize the underlying value to a string suitable for use as a dictionary key + var stringValue = value.Value?.ToString() ?? "null"; + writer.WritePropertyName(stringValue); + } + + private static (global::System.Type type, MethodInfo cast)[] GetOneOfTypes( + global::System.Type typeToConvert + ) + { + var type = typeToConvert; + if (Nullable.GetUnderlyingType(type) is { } underlyingType) + { + type = underlyingType; + } + + var casts = type.GetRuntimeMethods() + .Where(m => m.IsSpecialName && m.Name == "op_Implicit") + .ToArray(); + while (type is not null) + { + if ( + type.IsGenericType + && (type.Name.StartsWith("OneOf`") || type.Name.StartsWith("OneOfBase`")) + ) + { + var genericArguments = type.GetGenericArguments(); + if (genericArguments.Length == 1) + { + return [(genericArguments[0], casts[0])]; + } + + // if object type is present, make sure it is last + var indexOfObjectType = Array.IndexOf(genericArguments, typeof(object)); + if (indexOfObjectType != -1 && genericArguments.Length - 1 != indexOfObjectType) + { + genericArguments = genericArguments + .OrderBy(t => t == typeof(object) ? 1 : 0) + .ToArray(); + } + + return genericArguments + .Select(t => (t, casts.First(c => c.GetParameters()[0].ParameterType == t))) + .ToArray(); + } + + type = type.BaseType; + } + + throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); + } + + public override bool CanConvert(global::System.Type typeToConvert) + { + return typeof(IOneOf).IsAssignableFrom(typeToConvert); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Optional.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Optional.cs new file mode 100644 index 000000000000..a451fdd4d35e --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Optional.cs @@ -0,0 +1,474 @@ +using global::System.Text.Json; +using global::System.Text.Json.Serialization; + +namespace Contoso.Net.Core; + +/// +/// Non-generic interface for Optional types to enable reflection-free checks. +/// +public interface IOptional +{ + /// + /// Returns true if the value is defined (set), even if the value is null. + /// + bool IsDefined { get; } + + /// + /// Gets the boxed value. Returns null if undefined or if the value is null. + /// + object? GetBoxedValue(); +} + +/// +/// Represents a field that can be "not set" (undefined) vs "explicitly set" (defined). +/// Use this for HTTP PATCH requests where you need to distinguish between: +/// +/// Undefined: Don't send this field (leave it unchanged on the server) +/// Defined with null: Send null (clear the field on the server) +/// Defined with value: Send the value (update the field on the server) +/// +/// +/// The type of the value. Use nullable types (T?) for fields that can be null. +/// +/// For nullable string fields, use Optional<string?>: +/// +/// public class UpdateUserRequest +/// { +/// public Optional<string?> Name { get; set; } = Optional<string?>.Undefined; +/// } +/// +/// var request = new UpdateUserRequest +/// { +/// Name = "John" // Will send: { "name": "John" } +/// }; +/// +/// var request2 = new UpdateUserRequest +/// { +/// Name = Optional<string?>.Of(null) // Will send: { "name": null } +/// }; +/// +/// var request3 = new UpdateUserRequest(); // Will send: {} (name not included) +/// +/// +public readonly struct Optional : IOptional, IEquatable> +{ + private readonly T _value; + private readonly bool _isDefined; + + private Optional(T value, bool isDefined) + { + _value = value; + _isDefined = isDefined; + } + + /// + /// Creates an undefined value - the field will not be included in the HTTP request. + /// Use this as the default value for optional fields. + /// + /// + /// + /// public Optional<string?> Email { get; set; } = Optional<string?>.Undefined; + /// + /// + public static Optional Undefined => new(default!, false); + + /// + /// Creates a defined value - the field will be included in the HTTP request. + /// The value can be null if T is a nullable type. + /// + /// The value to set. Can be null if T is nullable (e.g., string?, int?). + /// + /// + /// // Set to a value + /// request.Name = Optional<string?>.Of("John"); + /// + /// // Set to null (clears the field) + /// request.Email = Optional<string?>.Of(null); + /// + /// // Or use implicit conversion + /// request.Name = "John"; // Same as Of("John") + /// request.Email = null; // Same as Of(null) + /// + /// + public static Optional Of(T value) => new(value, true); + + /// + /// Returns true if the field is defined (set), even if the value is null. + /// Use this to determine if the field should be included in the HTTP request. + /// + /// + /// + /// if (request.Name.IsDefined) + /// { + /// requestBody["name"] = request.Name.Value; // Include in request (can be null) + /// } + /// + /// + public bool IsDefined => _isDefined; + + /// + /// Returns true if the field is undefined (not set). + /// Use this to check if the field should be excluded from the HTTP request. + /// + /// + /// + /// if (request.Email.IsUndefined) + /// { + /// // Don't include email in the request - leave it unchanged + /// } + /// + /// + public bool IsUndefined => !_isDefined; + + /// + /// Gets the value. The value may be null if T is a nullable type. + /// + /// Thrown if the value is undefined. + /// + /// Always check before accessing Value, or use instead. + /// + /// + /// + /// if (request.Name.IsDefined) + /// { + /// string? name = request.Name.Value; // Safe - can be null if Optional<string?> + /// } + /// + /// // Or check for null explicitly + /// if (request.Email.IsDefined && request.Email.Value is null) + /// { + /// // Email is explicitly set to null (clear it) + /// } + /// + /// + public T Value + { + get + { + if (!_isDefined) + throw new InvalidOperationException("Optional value is undefined"); + return _value; + } + } + + /// + /// Gets the value if defined, otherwise returns the specified default value. + /// Note: If the value is defined as null, this returns null (not the default). + /// + /// The value to return if undefined. + /// The actual value if defined (can be null), otherwise the default value. + /// + /// + /// string name = request.Name.GetValueOrDefault("Anonymous"); + /// // If Name is undefined: returns "Anonymous" + /// // If Name is Of(null): returns null + /// // If Name is Of("John"): returns "John" + /// + /// + public T GetValueOrDefault(T defaultValue = default!) + { + return _isDefined ? _value : defaultValue; + } + + /// + /// Tries to get the value. Returns true if the value is defined (even if null). + /// + /// + /// When this method returns, contains the value if defined, or default(T) if undefined. + /// The value may be null if T is nullable. + /// + /// True if the value is defined; otherwise, false. + /// + /// + /// if (request.Email.TryGetValue(out var email)) + /// { + /// requestBody["email"] = email; // email can be null + /// } + /// else + /// { + /// // Email is undefined - don't include in request + /// } + /// + /// + public bool TryGetValue(out T value) + { + if (_isDefined) + { + value = _value; + return true; + } + value = default!; + return false; + } + + /// + /// Implicitly converts a value to Optional<T>.Of(value). + /// This allows natural assignment: request.Name = "John" instead of request.Name = Optional<string?>.Of("John"). + /// + /// The value to convert (can be null if T is nullable). + public static implicit operator Optional(T value) => Of(value); + + /// + /// Returns a string representation of this Optional value. + /// + /// "Undefined" if not set, or "Defined(value)" if set. + public override string ToString() => _isDefined ? $"Defined({_value})" : "Undefined"; + + /// + /// Gets the boxed value. Returns null if undefined or if the value is null. + /// + public object? GetBoxedValue() + { + if (!_isDefined) + return null; + return _value; + } + + /// + public bool Equals(Optional other) => + _isDefined == other._isDefined && EqualityComparer.Default.Equals(_value, other._value); + + /// + public override bool Equals(object? obj) => obj is Optional other && Equals(other); + + /// + public override int GetHashCode() + { + if (!_isDefined) + return 0; + unchecked + { + int hash = 17; + hash = hash * 31 + 1; // _isDefined = true + hash = hash * 31 + (_value is null ? 0 : _value.GetHashCode()); + return hash; + } + } + + /// + /// Determines whether two Optional values are equal. + /// + /// The first Optional to compare. + /// The second Optional to compare. + /// True if the Optional values are equal; otherwise, false. + public static bool operator ==(Optional left, Optional right) => left.Equals(right); + + /// + /// Determines whether two Optional values are not equal. + /// + /// The first Optional to compare. + /// The second Optional to compare. + /// True if the Optional values are not equal; otherwise, false. + public static bool operator !=(Optional left, Optional right) => !left.Equals(right); +} + +/// +/// Extension methods for Optional to simplify common operations. +/// +public static class OptionalExtensions +{ + /// + /// Adds the value to a dictionary if the optional is defined (even if the value is null). + /// This is useful for building JSON request payloads where null values should be included. + /// + /// The type of the optional value. + /// The optional value to add. + /// The dictionary to add to. + /// The key to use in the dictionary. + /// + /// + /// var dict = new Dictionary<string, object?>(); + /// request.Name.AddTo(dict, "name"); // Adds only if Name.IsDefined + /// request.Email.AddTo(dict, "email"); // Adds only if Email.IsDefined + /// + /// + public static void AddTo( + this Optional optional, + Dictionary dictionary, + string key + ) + { + if (optional.IsDefined) + { + dictionary[key] = optional.Value; + } + } + + /// + /// Executes an action if the optional is defined. + /// + /// The type of the optional value. + /// The optional value. + /// The action to execute with the value. + /// + /// + /// request.Name.IfDefined(name => Console.WriteLine($"Name: {name}")); + /// + /// + public static void IfDefined(this Optional optional, Action action) + { + if (optional.IsDefined) + { + action(optional.Value); + } + } + + /// + /// Maps the value to a new type if the optional is defined, otherwise returns undefined. + /// + /// The type of the original value. + /// The type to map to. + /// The optional value to map. + /// The mapping function. + /// An optional containing the mapped value if defined, otherwise undefined. + /// + /// + /// Optional<string?> name = Optional<string?>.Of("John"); + /// Optional<int> length = name.Map(n => n?.Length ?? 0); // Optional.Of(4) + /// + /// + public static Optional Map( + this Optional optional, + Func mapper + ) + { + return optional.IsDefined + ? Optional.Of(mapper(optional.Value)) + : Optional.Undefined; + } + + /// + /// Adds a nullable value to a dictionary only if it is not null. + /// This is useful for regular nullable properties where null means "omit from request". + /// + /// The type of the value (must be a reference type or Nullable). + /// The nullable value to add. + /// The dictionary to add to. + /// The key to use in the dictionary. + /// + /// + /// var dict = new Dictionary<string, object?>(); + /// request.Description.AddIfNotNull(dict, "description"); // Only adds if not null + /// request.Score.AddIfNotNull(dict, "score"); // Only adds if not null + /// + /// + public static void AddIfNotNull( + this T? value, + Dictionary dictionary, + string key + ) + where T : class + { + if (value is not null) + { + dictionary[key] = value; + } + } + + /// + /// Adds a nullable value type to a dictionary only if it has a value. + /// This is useful for regular nullable properties where null means "omit from request". + /// + /// The underlying value type. + /// The nullable value to add. + /// The dictionary to add to. + /// The key to use in the dictionary. + /// + /// + /// var dict = new Dictionary<string, object?>(); + /// request.Age.AddIfNotNull(dict, "age"); // Only adds if HasValue + /// request.Score.AddIfNotNull(dict, "score"); // Only adds if HasValue + /// + /// + public static void AddIfNotNull( + this T? value, + Dictionary dictionary, + string key + ) + where T : struct + { + if (value.HasValue) + { + dictionary[key] = value.Value; + } + } +} + +/// +/// JSON converter factory for Optional that handles undefined vs null correctly. +/// Uses a TypeInfoResolver to conditionally include/exclude properties based on Optional.IsDefined. +/// +public class OptionalJsonConverterFactory : JsonConverterFactory +{ + public override bool CanConvert(global::System.Type typeToConvert) + { + if (!typeToConvert.IsGenericType) + return false; + + return typeToConvert.GetGenericTypeDefinition() == typeof(Optional<>); + } + + public override JsonConverter? CreateConverter( + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + var valueType = typeToConvert.GetGenericArguments()[0]; + var converterType = typeof(OptionalJsonConverter<>).MakeGenericType(valueType); + return (JsonConverter?)global::System.Activator.CreateInstance(converterType); + } +} + +/// +/// JSON converter for Optional that unwraps the value during serialization. +/// The actual property skipping is handled by the OptionalTypeInfoResolver. +/// +public class OptionalJsonConverter : JsonConverter> +{ + public override Optional Read( + ref Utf8JsonReader reader, + global::System.Type typeToConvert, + JsonSerializerOptions options + ) + { + if (reader.TokenType == JsonTokenType.Null) + { + return Optional.Of(default!); + } + + var value = JsonSerializer.Deserialize(ref reader, options); + return Optional.Of(value!); + } + + public override void Write( + Utf8JsonWriter writer, + Optional value, + JsonSerializerOptions options + ) + { + // This will be called by the serializer + // We need to unwrap and serialize the inner value + // The TypeInfoResolver will handle skipping undefined values + + if (value.IsUndefined) + { + // This shouldn't be called for undefined values due to ShouldSerialize + // But if it is, write null and let the resolver filter it + writer.WriteNullValue(); + return; + } + + // Get the inner value + var innerValue = value.Value; + + // Write null directly if the value is null (don't use JsonSerializer.Serialize for null) + if (innerValue is null) + { + writer.WriteNullValue(); + return; + } + + // Serialize the unwrapped value + JsonSerializer.Serialize(writer, innerValue, options); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OptionalAttribute.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OptionalAttribute.cs new file mode 100644 index 000000000000..b92a5d34444c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/OptionalAttribute.cs @@ -0,0 +1,17 @@ +namespace Contoso.Net.Core; + +/// +/// Marks a property as optional in the OpenAPI specification. +/// Optional properties use the Optional type and can be undefined (not present in JSON). +/// +/// +/// Properties marked with [Optional] should use the Optional type: +/// - Undefined: Optional.Undefined → omitted from JSON +/// - Defined: Optional.Of(value) → written to JSON +/// +/// Combine with [Nullable] to allow null values: +/// - [Optional, Nullable] Optional → can be undefined, null, or a value +/// - [Optional] Optional → can be undefined or a value (null is invalid) +/// +[global::System.AttributeUsage(global::System.AttributeTargets.Property, AllowMultiple = false)] +public class OptionalAttribute : global::System.Attribute { } diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/AdditionalProperties.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/AdditionalProperties.cs new file mode 100644 index 000000000000..79f3e6eb2605 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/AdditionalProperties.cs @@ -0,0 +1,353 @@ +using Contoso.Net.Core; +using global::System.Collections; +using global::System.Collections.ObjectModel; +using global::System.Text.Json; +using global::System.Text.Json.Nodes; + +namespace Contoso.Net; + +public record ReadOnlyAdditionalProperties : ReadOnlyAdditionalProperties +{ + internal ReadOnlyAdditionalProperties() { } + + internal ReadOnlyAdditionalProperties(IDictionary properties) + : base(properties) { } +} + +public record ReadOnlyAdditionalProperties : IReadOnlyDictionary +{ + private readonly Dictionary _extensionData = new(); + private readonly Dictionary _convertedCache = new(); + + internal ReadOnlyAdditionalProperties() + { + _extensionData = new Dictionary(); + _convertedCache = new Dictionary(); + } + + internal ReadOnlyAdditionalProperties(IDictionary properties) + { + _extensionData = new Dictionary(properties.Count); + _convertedCache = new Dictionary(properties.Count); + foreach (var kvp in properties) + { + if (kvp.Value is JsonElement element) + { + _extensionData.Add(kvp.Key, element); + } + else + { + _extensionData[kvp.Key] = JsonUtils.SerializeToElement(kvp.Value); + } + + _convertedCache[kvp.Key] = kvp.Value; + } + } + + private static T ConvertToT(JsonElement value) + { + if (typeof(T) == typeof(JsonElement)) + { + return (T)(object)value; + } + + return value.Deserialize(JsonOptions.JsonSerializerOptions)!; + } + + internal void CopyFromExtensionData(IDictionary extensionData) + { + _extensionData.Clear(); + _convertedCache.Clear(); + foreach (var kvp in extensionData) + { + _extensionData[kvp.Key] = kvp.Value; + if (kvp.Value is T value) + { + _convertedCache[kvp.Key] = value; + } + } + } + + private T GetCached(string key) + { + if (_convertedCache.TryGetValue(key, out var cached)) + { + return cached; + } + + var value = ConvertToT(_extensionData[key]); + _convertedCache[key] = value; + return value; + } + + public IEnumerator> GetEnumerator() + { + return _extensionData + .Select(kvp => new KeyValuePair(kvp.Key, GetCached(kvp.Key))) + .GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + public int Count => _extensionData.Count; + + public bool ContainsKey(string key) => _extensionData.ContainsKey(key); + + public bool TryGetValue(string key, out T value) + { + if (_convertedCache.TryGetValue(key, out value!)) + { + return true; + } + + if (_extensionData.TryGetValue(key, out var element)) + { + value = ConvertToT(element); + _convertedCache[key] = value; + return true; + } + + return false; + } + + public T this[string key] => GetCached(key); + + public IEnumerable Keys => _extensionData.Keys; + + public IEnumerable Values => Keys.Select(GetCached); +} + +public record AdditionalProperties : AdditionalProperties +{ + public AdditionalProperties() { } + + public AdditionalProperties(IDictionary properties) + : base(properties) { } +} + +public record AdditionalProperties : IDictionary +{ + private readonly Dictionary _extensionData; + private readonly Dictionary _convertedCache; + + public AdditionalProperties() + { + _extensionData = new Dictionary(); + _convertedCache = new Dictionary(); + } + + public AdditionalProperties(IDictionary properties) + { + _extensionData = new Dictionary(properties.Count); + _convertedCache = new Dictionary(properties.Count); + foreach (var kvp in properties) + { + _extensionData[kvp.Key] = kvp.Value; + _convertedCache[kvp.Key] = kvp.Value; + } + } + + private static T ConvertToT(object? extensionDataValue) + { + return extensionDataValue switch + { + T value => value, + JsonElement jsonElement => jsonElement.Deserialize( + JsonOptions.JsonSerializerOptions + )!, + JsonNode jsonNode => jsonNode.Deserialize(JsonOptions.JsonSerializerOptions)!, + _ => JsonUtils + .SerializeToElement(extensionDataValue) + .Deserialize(JsonOptions.JsonSerializerOptions)!, + }; + } + + internal void CopyFromExtensionData(IDictionary extensionData) + { + _extensionData.Clear(); + _convertedCache.Clear(); + foreach (var kvp in extensionData) + { + _extensionData[kvp.Key] = kvp.Value; + if (kvp.Value is T value) + { + _convertedCache[kvp.Key] = value; + } + } + } + + internal void CopyToExtensionData(IDictionary extensionData) + { + extensionData.Clear(); + foreach (var kvp in _extensionData) + { + extensionData[kvp.Key] = kvp.Value; + } + } + + public JsonObject ToJsonObject() => + ( + JsonUtils.SerializeToNode(_extensionData) + ?? throw new InvalidOperationException( + "Failed to serialize AdditionalProperties to JSON Node." + ) + ).AsObject(); + + public JsonNode ToJsonNode() => + JsonUtils.SerializeToNode(_extensionData) + ?? throw new InvalidOperationException( + "Failed to serialize AdditionalProperties to JSON Node." + ); + + public JsonElement ToJsonElement() => JsonUtils.SerializeToElement(_extensionData); + + public JsonDocument ToJsonDocument() => JsonUtils.SerializeToDocument(_extensionData); + + public IReadOnlyDictionary ToJsonElementDictionary() + { + return new ReadOnlyDictionary( + _extensionData.ToDictionary( + kvp => kvp.Key, + kvp => + { + if (kvp.Value is JsonElement jsonElement) + { + return jsonElement; + } + + return JsonUtils.SerializeToElement(kvp.Value); + } + ) + ); + } + + public ICollection Keys => _extensionData.Keys; + + public ICollection Values + { + get + { + var values = new T[_extensionData.Count]; + var i = 0; + foreach (var key in Keys) + { + values[i++] = GetCached(key); + } + + return values; + } + } + + private T GetCached(string key) + { + if (_convertedCache.TryGetValue(key, out var value)) + { + return value; + } + + value = ConvertToT(_extensionData[key]); + _convertedCache.Add(key, value); + return value; + } + + private void SetCached(string key, T value) + { + _extensionData[key] = value; + _convertedCache[key] = value; + } + + private void AddCached(string key, T value) + { + _extensionData.Add(key, value); + _convertedCache.Add(key, value); + } + + private bool RemoveCached(string key) + { + var isRemoved = _extensionData.Remove(key); + _convertedCache.Remove(key); + return isRemoved; + } + + public int Count => _extensionData.Count; + public bool IsReadOnly => false; + + public T this[string key] + { + get => GetCached(key); + set => SetCached(key, value); + } + + public void Add(string key, T value) => AddCached(key, value); + + public void Add(KeyValuePair item) => AddCached(item.Key, item.Value); + + public bool Remove(string key) => RemoveCached(key); + + public bool Remove(KeyValuePair item) => RemoveCached(item.Key); + + public bool ContainsKey(string key) => _extensionData.ContainsKey(key); + + public bool Contains(KeyValuePair item) + { + return _extensionData.ContainsKey(item.Key) + && EqualityComparer.Default.Equals(GetCached(item.Key), item.Value); + } + + public bool TryGetValue(string key, out T value) + { + if (_convertedCache.TryGetValue(key, out value!)) + { + return true; + } + + if (_extensionData.TryGetValue(key, out var extensionDataValue)) + { + value = ConvertToT(extensionDataValue); + _convertedCache[key] = value; + return true; + } + + return false; + } + + public void Clear() + { + _extensionData.Clear(); + _convertedCache.Clear(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + if (array is null) + { + throw new ArgumentNullException(nameof(array)); + } + + if (arrayIndex < 0 || arrayIndex > array.Length) + { + throw new ArgumentOutOfRangeException(nameof(arrayIndex)); + } + + if (array.Length - arrayIndex < _extensionData.Count) + { + throw new ArgumentException( + "The array does not have enough space to copy the elements." + ); + } + + foreach (var kvp in _extensionData) + { + array[arrayIndex++] = new KeyValuePair(kvp.Key, GetCached(kvp.Key)); + } + } + + public IEnumerator> GetEnumerator() + { + return _extensionData + .Select(kvp => new KeyValuePair(kvp.Key, GetCached(kvp.Key))) + .GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs new file mode 100644 index 000000000000..82c9a31b40b4 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ClientOptions.cs @@ -0,0 +1,84 @@ +using Contoso.Net.Core; + +namespace Contoso.Net; + +[Serializable] +public partial class ClientOptions +{ + /// + /// The http headers sent with the request. + /// + internal Headers Headers { get; init; } = new(); + + /// + /// The Base URL for the API. + /// + public string BaseUrl { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = ""; + + /// + /// The http client used to make requests. + /// + public HttpClient HttpClient { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = new HttpClient(); + + /// + /// Additional headers to be sent with HTTP requests. + /// Headers with matching keys will be overwritten by headers set on the request. + /// + public IEnumerable> AdditionalHeaders { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = []; + + /// + /// The max number of retries to attempt. + /// + public int MaxRetries { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = 2; + + /// + /// The timeout for the request. + /// + public TimeSpan Timeout { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = TimeSpan.FromSeconds(30); + + /// + /// Clones this and returns a new instance + /// + internal ClientOptions Clone() + { + return new ClientOptions + { + BaseUrl = BaseUrl, + HttpClient = HttpClient, + MaxRetries = MaxRetries, + Timeout = Timeout, + Headers = new Headers(new Dictionary(Headers)), + AdditionalHeaders = AdditionalHeaders, + }; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoApiException.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoApiException.cs new file mode 100644 index 000000000000..fbd7675ecffb --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoApiException.cs @@ -0,0 +1,22 @@ +namespace Contoso.Net; + +/// +/// This exception type will be thrown for any non-2XX API responses. +/// +public class ContosoApiException( + string message, + int statusCode, + object body, + Exception? innerException = null +) : ContosoException(message, innerException) +{ + /// + /// The error code of the response that triggered the exception. + /// + public int StatusCode => statusCode; + + /// + /// The body of the response that triggered the exception. + /// + public object Body => body; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoException.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoException.cs new file mode 100644 index 000000000000..628dff3c6acf --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/ContosoException.cs @@ -0,0 +1,7 @@ +namespace Contoso.Net; + +/// +/// Base exception class for all exceptions thrown by the SDK. +/// +public class ContosoException(string message, Exception? innerException = null) + : Exception(message, innerException); diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/FileParameter.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/FileParameter.cs new file mode 100644 index 000000000000..21938704588a --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/FileParameter.cs @@ -0,0 +1,63 @@ +namespace Contoso.Net; + +/// +/// File parameter for uploading files. +/// +public record FileParameter : IDisposable +#if NET6_0_OR_GREATER + , IAsyncDisposable +#endif +{ + private bool _disposed; + + /// + /// The name of the file to be uploaded. + /// + public string? FileName { get; set; } + + /// + /// The content type of the file to be uploaded. + /// + public string? ContentType { get; set; } + + /// + /// The content of the file to be uploaded. + /// + public required Stream Stream { get; set; } + + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + protected virtual void Dispose(bool disposing) + { + if (_disposed) + return; + if (disposing) + { + Stream.Dispose(); + } + + _disposed = true; + } + +#if NET6_0_OR_GREATER + /// + public async ValueTask DisposeAsync() + { + if (!_disposed) + { + await Stream.DisposeAsync().ConfigureAwait(false); + _disposed = true; + } + + GC.SuppressFinalize(this); + } +#endif + + public static implicit operator FileParameter(Stream stream) => new() { Stream = stream }; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RawResponse.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RawResponse.cs new file mode 100644 index 000000000000..4449fe1c27ce --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RawResponse.cs @@ -0,0 +1,24 @@ +using global::System.Net; + +namespace Contoso.Net; + +/// +/// Contains HTTP response metadata including status code, URL, and headers. +/// +public record RawResponse +{ + /// + /// The HTTP status code of the response. + /// + public required HttpStatusCode StatusCode { get; init; } + + /// + /// The request URL that generated this response. + /// + public required Uri Url { get; init; } + + /// + /// The HTTP response headers. + /// + public required Core.ResponseHeaders Headers { get; init; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs new file mode 100644 index 000000000000..7a8196d8636c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/RequestOptions.cs @@ -0,0 +1,86 @@ +using Contoso.Net.Core; + +namespace Contoso.Net; + +[Serializable] +public partial class RequestOptions : IRequestOptions +{ + /// + /// The Base URL for the API. + /// + public string? BaseUrl { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// The http client used to make requests. + /// + public HttpClient? HttpClient { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// Additional headers to be sent with the request. + /// Headers previously set with matching keys will be overwritten. + /// + public IEnumerable> AdditionalHeaders { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = []; + + /// + /// The max number of retries to attempt. + /// + public int? MaxRetries { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// The timeout for the request. + /// + public TimeSpan? Timeout { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } + + /// + /// Additional query parameters sent with the request. + /// + public IEnumerable> AdditionalQueryParameters { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } = Enumerable.Empty>(); + + /// + /// Additional body properties sent with the request. + /// This is only applied to JSON requests. + /// + public object? AdditionalBodyProperties { get; +#if NET5_0_OR_GREATER + init; +#else + set; +#endif + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/Version.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/Version.cs new file mode 100644 index 000000000000..1b5f525ac46d --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/Version.cs @@ -0,0 +1,7 @@ +namespace Contoso.Net; + +[Serializable] +internal class Version +{ + public const string Current = "0.0.1"; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponse.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponse.cs new file mode 100644 index 000000000000..a49db88fa922 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponse.cs @@ -0,0 +1,18 @@ +namespace Contoso.Net; + +/// +/// Wraps a parsed response value with its raw HTTP response metadata. +/// +/// The type of the parsed response data. +public readonly struct WithRawResponse +{ + /// + /// The parsed response data. + /// + public required T Data { get; init; } + + /// + /// The raw HTTP response metadata. + /// + public required RawResponse RawResponse { get; init; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponseTask.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponseTask.cs new file mode 100644 index 000000000000..a78554a6b531 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/Public/WithRawResponseTask.cs @@ -0,0 +1,144 @@ +using global::System.Runtime.CompilerServices; + +namespace Contoso.Net; + +/// +/// A task-like type that wraps Task<WithRawResponse<T>> and provides dual-mode awaiting: +/// - Direct await yields just T (zero-allocation path for common case) +/// - .WithRawResponse() yields WithRawResponse<T> (when raw response metadata is needed) +/// +/// The type of the parsed response data. +public readonly struct WithRawResponseTask +{ + private readonly global::System.Threading.Tasks.Task> _task; + + /// + /// Creates a new WithRawResponseTask wrapping the given task. + /// + public WithRawResponseTask(global::System.Threading.Tasks.Task> task) + { + _task = task; + } + + /// + /// Returns the underlying task that yields both the data and raw response metadata. + /// + public global::System.Threading.Tasks.Task> WithRawResponse() => _task; + + /// + /// Gets the custom awaiter that unwraps to just T when awaited. + /// + public Awaiter GetAwaiter() => new(_task.GetAwaiter()); + + /// + /// Configures the awaiter to continue on the captured context or not. + /// + public ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) => + new(_task.ConfigureAwait(continueOnCapturedContext)); + + /// + /// Implicitly converts WithRawResponseTask<T> to global::System.Threading.Tasks.Task<T> for backward compatibility. + /// The resulting task will yield just the data when awaited. + /// + public static implicit operator global::System.Threading.Tasks.Task( + WithRawResponseTask task + ) + { + return task._task.ContinueWith( + t => t.Result.Data, + TaskContinuationOptions.ExecuteSynchronously + ); + } + + /// + /// Custom awaiter that unwraps WithRawResponse<T> to just T. + /// + public readonly struct Awaiter : ICriticalNotifyCompletion + { + private readonly TaskAwaiter> _awaiter; + + internal Awaiter(TaskAwaiter> awaiter) + { + _awaiter = awaiter; + } + + /// + /// Gets whether the underlying task has completed. + /// + public bool IsCompleted => _awaiter.IsCompleted; + + /// + /// Gets the result, unwrapping to just the data. + /// + public T GetResult() => _awaiter.GetResult().Data; + + /// + /// Schedules the continuation action. + /// + public void OnCompleted(global::System.Action continuation) => + _awaiter.OnCompleted(continuation); + + /// + /// Schedules the continuation action without capturing the execution context. + /// + public void UnsafeOnCompleted(global::System.Action continuation) => + _awaiter.UnsafeOnCompleted(continuation); + } + + /// + /// Awaitable type returned by ConfigureAwait that unwraps to just T. + /// + public readonly struct ConfiguredTaskAwaitable + { + private readonly ConfiguredTaskAwaitable> _configuredTask; + + internal ConfiguredTaskAwaitable(ConfiguredTaskAwaitable> configuredTask) + { + _configuredTask = configuredTask; + } + + /// + /// Gets the configured awaiter that unwraps to just T. + /// + public ConfiguredAwaiter GetAwaiter() => new(_configuredTask.GetAwaiter()); + + /// + /// Custom configured awaiter that unwraps WithRawResponse<T> to just T. + /// + public readonly struct ConfiguredAwaiter : ICriticalNotifyCompletion + { + private readonly ConfiguredTaskAwaitable< + WithRawResponse + >.ConfiguredTaskAwaiter _awaiter; + + internal ConfiguredAwaiter( + ConfiguredTaskAwaitable>.ConfiguredTaskAwaiter awaiter + ) + { + _awaiter = awaiter; + } + + /// + /// Gets whether the underlying task has completed. + /// + public bool IsCompleted => _awaiter.IsCompleted; + + /// + /// Gets the result, unwrapping to just the data. + /// + public T GetResult() => _awaiter.GetResult().Data; + + /// + /// Schedules the continuation action. + /// + public void OnCompleted(global::System.Action continuation) => + _awaiter.OnCompleted(continuation); + + /// + /// Schedules the continuation action without capturing the execution context. + /// + public void UnsafeOnCompleted(global::System.Action continuation) => + _awaiter.UnsafeOnCompleted(continuation); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringBuilder.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringBuilder.cs new file mode 100644 index 000000000000..9003eaf9d0f3 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringBuilder.cs @@ -0,0 +1,484 @@ +using global::System.Buffers; +using global::System.Runtime.CompilerServices; +#if !NET6_0_OR_GREATER +using global::System.Text; +#endif + +namespace Contoso.Net.Core; + +/// +/// High-performance query string builder with cross-platform optimizations. +/// Uses span-based APIs on .NET 6+ and StringBuilder fallback for older targets. +/// +internal static class QueryStringBuilder +{ +#if NET8_0_OR_GREATER + private static readonly SearchValues UnreservedChars = SearchValues.Create( + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~" + ); +#else + private const string UnreservedChars = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~"; +#endif + +#if NET7_0_OR_GREATER + private static ReadOnlySpan UpperHexChars => "0123456789ABCDEF"u8; +#else + private static readonly byte[] UpperHexChars = + { + (byte)'0', + (byte)'1', + (byte)'2', + (byte)'3', + (byte)'4', + (byte)'5', + (byte)'6', + (byte)'7', + (byte)'8', + (byte)'9', + (byte)'A', + (byte)'B', + (byte)'C', + (byte)'D', + (byte)'E', + (byte)'F', + }; +#endif + + /// + /// Builds a query string from the provided parameters. + /// +#if NET6_0_OR_GREATER + public static string Build(ReadOnlySpan> parameters) + { + if (parameters.IsEmpty) + return string.Empty; + + var estimatedLength = EstimateLength(parameters); + if (estimatedLength == 0) + return string.Empty; + + var bufferSize = Math.Min(estimatedLength * 3, 8192); + var buffer = ArrayPool.Shared.Rent(bufferSize); + + try + { + var written = BuildCore(parameters, buffer); + return new string(buffer.AsSpan(0, written)); + } + finally + { + ArrayPool.Shared.Return(buffer); + } + } + + private static int EstimateLength(ReadOnlySpan> parameters) + { + var estimatedLength = 0; + foreach (var kvp in parameters) + { + estimatedLength += kvp.Key.Length + kvp.Value.Length + 2; + } + return estimatedLength; + } +#endif + + /// + /// Builds a query string from the provided parameters. + /// + public static string Build(IEnumerable> parameters) + { +#if NET6_0_OR_GREATER + // Try to get span access for collections that support it + if (parameters is ICollection> collection) + { + if (collection.Count == 0) + return string.Empty; + + var array = ArrayPool>.Shared.Rent(collection.Count); + try + { + collection.CopyTo(array, 0); + return Build(array.AsSpan(0, collection.Count)); + } + finally + { + ArrayPool>.Shared.Return(array); + } + } + + // Fallback for non-collection enumerables + using var enumerator = parameters.GetEnumerator(); + if (!enumerator.MoveNext()) + return string.Empty; + + var buffer = ArrayPool.Shared.Rent(4096); + try + { + var position = 0; + var first = true; + + do + { + var kvp = enumerator.Current; + + // Ensure capacity (worst case: 3x for encoding + separators) + var required = (kvp.Key.Length + kvp.Value.Length + 2) * 3; + if (position + required > buffer.Length) + { + var newBuffer = ArrayPool.Shared.Rent(buffer.Length * 2); + buffer.AsSpan(0, position).CopyTo(newBuffer); + ArrayPool.Shared.Return(buffer); + buffer = newBuffer; + } + + buffer[position++] = first ? '?' : '&'; + first = false; + + position += EncodeComponent(kvp.Key.AsSpan(), buffer.AsSpan(position)); + buffer[position++] = '='; + position += EncodeComponent(kvp.Value.AsSpan(), buffer.AsSpan(position)); + } while (enumerator.MoveNext()); + + return first ? string.Empty : new string(buffer.AsSpan(0, position)); + } + finally + { + ArrayPool.Shared.Return(buffer); + } +#else + // netstandard2.0 / net462 fallback using StringBuilder + var sb = new StringBuilder(); + var first = true; + + foreach (var kvp in parameters) + { + sb.Append(first ? '?' : '&'); + first = false; + + AppendEncoded(sb, kvp.Key); + sb.Append('='); + AppendEncoded(sb, kvp.Value); + } + + return sb.ToString(); +#endif + } + +#if NET6_0_OR_GREATER + private static int BuildCore( + ReadOnlySpan> parameters, + Span buffer + ) + { + var position = 0; + var first = true; + + foreach (var kvp in parameters) + { + buffer[position++] = first ? '?' : '&'; + first = false; + + position += EncodeComponent(kvp.Key.AsSpan(), buffer.Slice(position)); + buffer[position++] = '='; + position += EncodeComponent(kvp.Value.AsSpan(), buffer.Slice(position)); + } + + return position; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int EncodeComponent(ReadOnlySpan input, Span output) + { + if (!NeedsEncoding(input)) + { + input.CopyTo(output); + return input.Length; + } + + return EncodeSlow(input, output); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool NeedsEncoding(ReadOnlySpan value) + { +#if NET8_0_OR_GREATER + return value.ContainsAnyExcept(UnreservedChars); +#else + foreach (var c in value) + { + if (!IsUnreserved(c)) + return true; + } + return false; +#endif + } + + private static int EncodeSlow(ReadOnlySpan input, Span output) + { + var position = 0; + + foreach (var c in input) + { + if (IsUnreserved(c)) + { + output[position++] = c; + } + else if (c == ' ') + { + output[position++] = '%'; + output[position++] = '2'; + output[position++] = '0'; + } +#if NET7_0_OR_GREATER + else if (char.IsAscii(c)) +#else + else if (c <= 127) +#endif + { + position += EncodeAscii((byte)c, output.Slice(position)); + } + else + { + position += EncodeUtf8(c, output.Slice(position)); + } + } + + return position; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int EncodeAscii(byte value, Span output) + { + output[0] = '%'; + output[1] = (char)UpperHexChars[value >> 4]; + output[2] = (char)UpperHexChars[value & 0xF]; + return 3; + } + + private static int EncodeUtf8(char c, Span output) + { + Span utf8Bytes = stackalloc byte[4]; + Span singleChar = stackalloc char[1] { c }; + var byteCount = global::System.Text.Encoding.UTF8.GetBytes(singleChar, utf8Bytes); + + var position = 0; + for (var i = 0; i < byteCount; i++) + { + output[position++] = '%'; + output[position++] = (char)UpperHexChars[utf8Bytes[i] >> 4]; + output[position++] = (char)UpperHexChars[utf8Bytes[i] & 0xF]; + } + + return position; + } +#else + // netstandard2.0 / net462 StringBuilder-based encoding + private static void AppendEncoded(StringBuilder sb, string value) + { + foreach (var c in value) + { + if (IsUnreserved(c)) + { + sb.Append(c); + } + else if (c == ' ') + { + sb.Append("%20"); + } + else if (c <= 127) + { + AppendPercentEncoded(sb, (byte)c); + } + else + { + var bytes = Encoding.UTF8.GetBytes(new[] { c }); + foreach (var b in bytes) + { + AppendPercentEncoded(sb, b); + } + } + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static void AppendPercentEncoded(StringBuilder sb, byte value) + { + sb.Append('%'); + sb.Append((char)UpperHexChars[value >> 4]); + sb.Append((char)UpperHexChars[value & 0xF]); + } +#endif + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static bool IsUnreserved(char c) + { +#if NET8_0_OR_GREATER + return UnreservedChars.Contains(c); +#elif NET7_0_OR_GREATER + return char.IsAsciiLetterOrDigit(c) || c is '-' or '_' or '.' or '~'; +#else + return (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z') + || (c >= '0' && c <= '9') + || c == '-' + || c == '_' + || c == '.' + || c == '~'; +#endif + } + + /// + /// Fluent builder for constructing query strings with support for simple parameters and deep object notation. + /// + public sealed class Builder + { + private readonly List> _params; + + /// + /// Initializes a new instance with default capacity. + /// + public Builder() + { + _params = new List>(); + } + + /// + /// Initializes a new instance with the specified initial capacity. + /// + public Builder(int capacity) + { + _params = new List>(capacity); + } + + /// + /// Adds a simple parameter. For collections, adds multiple key-value pairs (one per element). + /// + public Builder Add(string key, object? value) + { + if (value is null) + { + return this; + } + + // Handle string separately since it implements IEnumerable + if (value is string stringValue) + { + _params.Add(new KeyValuePair(key, stringValue)); + return this; + } + + // Handle collections (arrays, lists, etc.) - add each element as a separate key-value pair + if ( + value + is global::System.Collections.IEnumerable enumerable + and not global::System.Collections.IDictionary + ) + { + foreach (var item in enumerable) + { + if (item is not null) + { + _params.Add( + new KeyValuePair( + key, + ValueConvert.ToQueryStringValue(item) + ) + ); + } + } + return this; + } + + // Handle scalar values + _params.Add( + new KeyValuePair(key, ValueConvert.ToQueryStringValue(value)) + ); + return this; + } + + /// + /// Sets a parameter, removing any existing parameters with the same key before adding the new value. + /// For collections, removes all existing parameters with the key, then adds multiple key-value pairs (one per element). + /// This allows overriding parameters set earlier in the builder. + /// + public Builder Set(string key, object? value) + { + // Remove all existing parameters with this key + _params.RemoveAll(kv => kv.Key == key); + + // Add the new value(s) + return Add(key, value); + } + + /// + /// Merges additional query parameters with override semantics. + /// Groups parameters by key and calls Set() once per unique key. + /// This ensures that parameters with the same key are properly merged: + /// - If a key appears once, it's added as a single value + /// - If a key appears multiple times, all values are added as an array + /// - All parameters override any existing parameters with the same key + /// + public Builder MergeAdditional( + global::System.Collections.Generic.IEnumerable>? additionalParameters + ) + { + if (additionalParameters is null) + { + return this; + } + + // Group by key to handle multiple values for the same key correctly + var grouped = additionalParameters + .GroupBy(kv => kv.Key) + .Select(g => new global::System.Collections.Generic.KeyValuePair( + g.Key, + g.Count() == 1 ? (object)g.First().Value : g.Select(kv => kv.Value).ToArray() + )); + + foreach (var param in grouped) + { + Set(param.Key, param.Value); + } + + return this; + } + + /// + /// Adds a complex object using deep object notation with a prefix. + /// Deep object notation nests properties with brackets: prefix[key][nested]=value + /// + public Builder AddDeepObject(string prefix, object? value) + { + if (value is not null) + { + _params.AddRange(QueryStringConverter.ToDeepObject(prefix, value)); + } + return this; + } + + /// + /// Adds a complex object using exploded form notation with an optional prefix. + /// Exploded form flattens properties: prefix[key]=value (no deep nesting). + /// + public Builder AddExploded(string prefix, object? value) + { + if (value is not null) + { + _params.AddRange(QueryStringConverter.ToExplodedForm(prefix, value)); + } + return this; + } + + /// + /// Builds the final query string. + /// + public string Build() + { + return QueryStringBuilder.Build(_params); + } + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringConverter.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringConverter.cs new file mode 100644 index 000000000000..fae45f043722 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/QueryStringConverter.cs @@ -0,0 +1,259 @@ +using global::System.Text.Json; + +namespace Contoso.Net.Core; + +/// +/// Converts an object into a query string collection. +/// +internal static class QueryStringConverter +{ + /// + /// Converts an object into a query string collection using Deep Object notation with a prefix. + /// + /// The prefix to prepend to all keys (e.g., "session_settings"). Pass empty string for no prefix. + /// Object to form URL-encode. Can be an object, array of objects, or dictionary. + /// Throws when passing in a string or primitive value. + /// A collection of key value pairs. The keys and values are not URL encoded. + internal static IEnumerable> ToDeepObject( + string prefix, + object value + ) + { + var queryCollection = new List>(); + var json = JsonUtils.SerializeToElement(value); + JsonToDeepObject(json, prefix, queryCollection); + return queryCollection; + } + + /// + /// Converts an object into a query string collection using Deep Object notation. + /// + /// Object to form URL-encode. Can be an object, array of objects, or dictionary. + /// Throws when passing in a string or primitive value. + /// A collection of key value pairs. The keys and values are not URL encoded. + internal static IEnumerable> ToDeepObject(object value) + { + return ToDeepObject("", value); + } + + /// + /// Converts an object into a query string collection using Exploded Form notation with a prefix. + /// + /// The prefix to prepend to all keys. Pass empty string for no prefix. + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + /// A collection of key value pairs. The keys and values are not URL encoded. + internal static IEnumerable> ToExplodedForm( + string prefix, + object value + ) + { + var queryCollection = new List>(); + var json = JsonUtils.SerializeToElement(value); + AssertRootJson(json); + JsonToFormExploded(json, prefix, queryCollection); + return queryCollection; + } + + /// + /// Converts an object into a query string collection using Exploded Form notation. + /// + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + /// A collection of key value pairs. The keys and values are not URL encoded. + internal static IEnumerable> ToExplodedForm(object value) + { + return ToExplodedForm("", value); + } + + /// + /// Converts an object into a query string collection using Form notation without exploding parameters. + /// + /// Object to form URL-encode. You can pass in an object or dictionary, but not lists, strings, or primitives. + /// Throws when passing in a list, a string, or a primitive value. + /// A collection of key value pairs. The keys and values are not URL encoded. + internal static IEnumerable> ToForm(object value) + { + var queryCollection = new List>(); + var json = JsonUtils.SerializeToElement(value); + AssertRootJson(json); + JsonToForm(json, "", queryCollection); + return queryCollection; + } + + private static void AssertRootJson(JsonElement json) + { + switch (json.ValueKind) + { + case JsonValueKind.Object: + break; + case JsonValueKind.Array: + case JsonValueKind.Undefined: + case JsonValueKind.String: + case JsonValueKind.Number: + case JsonValueKind.True: + case JsonValueKind.False: + case JsonValueKind.Null: + default: + throw new global::System.Exception( + $"Only objects can be converted to query string collections. Given type is {json.ValueKind}." + ); + } + } + + private static void JsonToForm( + JsonElement element, + string prefix, + List> parameters + ) + { + switch (element.ValueKind) + { + case JsonValueKind.Object: + foreach (var property in element.EnumerateObject()) + { + var newPrefix = string.IsNullOrEmpty(prefix) + ? property.Name + : $"{prefix}[{property.Name}]"; + + JsonToForm(property.Value, newPrefix, parameters); + } + break; + case JsonValueKind.Array: + var arrayValues = element.EnumerateArray().Select(ValueToString).ToArray(); + parameters.Add( + new KeyValuePair(prefix, string.Join(",", arrayValues)) + ); + break; + case JsonValueKind.Null: + break; + case JsonValueKind.Undefined: + case JsonValueKind.String: + case JsonValueKind.Number: + case JsonValueKind.True: + case JsonValueKind.False: + default: + parameters.Add(new KeyValuePair(prefix, ValueToString(element))); + break; + } + } + + private static void JsonToFormExploded( + JsonElement element, + string prefix, + List> parameters + ) + { + switch (element.ValueKind) + { + case JsonValueKind.Object: + foreach (var property in element.EnumerateObject()) + { + var newPrefix = string.IsNullOrEmpty(prefix) + ? property.Name + : $"{prefix}[{property.Name}]"; + + JsonToFormExploded(property.Value, newPrefix, parameters); + } + + break; + case JsonValueKind.Array: + foreach (var item in element.EnumerateArray()) + { + if ( + item.ValueKind != JsonValueKind.Object + && item.ValueKind != JsonValueKind.Array + ) + { + parameters.Add( + new KeyValuePair(prefix, ValueToString(item)) + ); + } + else + { + JsonToFormExploded(item, prefix, parameters); + } + } + + break; + case JsonValueKind.Null: + break; + case JsonValueKind.Undefined: + case JsonValueKind.String: + case JsonValueKind.Number: + case JsonValueKind.True: + case JsonValueKind.False: + default: + parameters.Add(new KeyValuePair(prefix, ValueToString(element))); + break; + } + } + + private static void JsonToDeepObject( + JsonElement element, + string prefix, + List> parameters + ) + { + switch (element.ValueKind) + { + case JsonValueKind.Object: + foreach (var property in element.EnumerateObject()) + { + var newPrefix = string.IsNullOrEmpty(prefix) + ? property.Name + : $"{prefix}[{property.Name}]"; + + JsonToDeepObject(property.Value, newPrefix, parameters); + } + + break; + case JsonValueKind.Array: + var index = 0; + foreach (var item in element.EnumerateArray()) + { + var newPrefix = $"{prefix}[{index++}]"; + + if ( + item.ValueKind != JsonValueKind.Object + && item.ValueKind != JsonValueKind.Array + ) + { + parameters.Add( + new KeyValuePair(newPrefix, ValueToString(item)) + ); + } + else + { + JsonToDeepObject(item, newPrefix, parameters); + } + } + + break; + case JsonValueKind.Null: + case JsonValueKind.Undefined: + // Skip null and undefined values - don't add parameters for them + break; + case JsonValueKind.String: + case JsonValueKind.Number: + case JsonValueKind.True: + case JsonValueKind.False: + default: + parameters.Add(new KeyValuePair(prefix, ValueToString(element))); + break; + } + } + + private static string ValueToString(JsonElement element) + { + return element.ValueKind switch + { + JsonValueKind.String => element.GetString() ?? "", + JsonValueKind.Number => element.GetRawText(), + JsonValueKind.True => "true", + JsonValueKind.False => "false", + JsonValueKind.Null => "", + _ => element.GetRawText(), + }; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawClient.cs new file mode 100644 index 000000000000..470bb20de6d1 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawClient.cs @@ -0,0 +1,344 @@ +using global::System.Net.Http; +using global::System.Net.Http.Headers; +using global::System.Text; +using SystemTask = global::System.Threading.Tasks.Task; + +namespace Contoso.Net.Core; + +/// +/// Utility class for making raw HTTP requests to the API. +/// +internal partial class RawClient(ClientOptions clientOptions) +{ + private const int MaxRetryDelayMs = 60000; + private const double JitterFactor = 0.2; +#if NET6_0_OR_GREATER + // Use Random.Shared for thread-safe random number generation on .NET 6+ +#else + private static readonly object JitterLock = new(); + private static readonly Random JitterRandom = new(); +#endif + internal int BaseRetryDelay { get; set; } = 1000; + + /// + /// The client options applied on every request. + /// + internal readonly ClientOptions Options = clientOptions; + + internal async global::System.Threading.Tasks.Task SendRequestAsync( + global::Contoso.Net.Core.BaseRequest request, + CancellationToken cancellationToken = default + ) + { + // Apply the request timeout. + using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + var timeout = request.Options?.Timeout ?? Options.Timeout; + cts.CancelAfter(timeout); + + var httpRequest = await CreateHttpRequestAsync(request).ConfigureAwait(false); + // Send the request. + return await SendWithRetriesAsync(httpRequest, request.Options, cts.Token) + .ConfigureAwait(false); + } + + internal async global::System.Threading.Tasks.Task SendRequestAsync( + HttpRequestMessage request, + IRequestOptions? options, + CancellationToken cancellationToken = default + ) + { + // Apply the request timeout. + using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + var timeout = options?.Timeout ?? Options.Timeout; + cts.CancelAfter(timeout); + + // Send the request. + return await SendWithRetriesAsync(request, options, cts.Token).ConfigureAwait(false); + } + + private static async global::System.Threading.Tasks.Task CloneRequestAsync( + HttpRequestMessage request + ) + { + var clonedRequest = new HttpRequestMessage(request.Method, request.RequestUri); + clonedRequest.Version = request.Version; + + if (request.Content != null) + { + switch (request.Content) + { + case MultipartContent oldMultipartFormContent: + var originalBoundary = + oldMultipartFormContent + .Headers.ContentType?.Parameters.First(p => + p.Name.Equals("boundary", StringComparison.OrdinalIgnoreCase) + ) + .Value?.Trim('"') + ?? Guid.NewGuid().ToString(); + var newMultipartContent = oldMultipartFormContent switch + { + MultipartFormDataContent => new MultipartFormDataContent(originalBoundary), + _ => new MultipartContent(), + }; + foreach (var content in oldMultipartFormContent) + { + var ms = new MemoryStream(); + await content.CopyToAsync(ms).ConfigureAwait(false); + ms.Position = 0; + var newPart = new StreamContent(ms); + foreach (var header in content.Headers) + { + newPart.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + + newMultipartContent.Add(newPart); + } + + clonedRequest.Content = newMultipartContent; + break; + default: + var bodyStream = new MemoryStream(); + await request.Content.CopyToAsync(bodyStream).ConfigureAwait(false); + bodyStream.Position = 0; + var clonedContent = new StreamContent(bodyStream); + foreach (var header in request.Content.Headers) + { + clonedContent.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + + clonedRequest.Content = clonedContent; + break; + } + } + + foreach (var header in request.Headers) + { + clonedRequest.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + + return clonedRequest; + } + + /// + /// Sends the request with retries, unless the request content is not retryable, + /// such as stream requests and multipart form data with stream content. + /// + private async global::System.Threading.Tasks.Task SendWithRetriesAsync( + HttpRequestMessage request, + IRequestOptions? options, + CancellationToken cancellationToken + ) + { + var httpClient = options?.HttpClient ?? Options.HttpClient; + var maxRetries = options?.MaxRetries ?? Options.MaxRetries; + var response = await httpClient + .SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken) + .ConfigureAwait(false); + var isRetryableContent = IsRetryableContent(request); + + if (!isRetryableContent) + { + return new global::Contoso.Net.Core.ApiResponse + { + StatusCode = (int)response.StatusCode, + Raw = response, + }; + } + + for (var i = 0; i < maxRetries; i++) + { + if (!ShouldRetry(response)) + { + break; + } + + var delayMs = GetRetryDelayFromHeaders(response, i); + await SystemTask.Delay(delayMs, cancellationToken).ConfigureAwait(false); + using var retryRequest = await CloneRequestAsync(request).ConfigureAwait(false); + response = await httpClient + .SendAsync( + retryRequest, + HttpCompletionOption.ResponseHeadersRead, + cancellationToken + ) + .ConfigureAwait(false); + } + + return new global::Contoso.Net.Core.ApiResponse + { + StatusCode = (int)response.StatusCode, + Raw = response, + }; + } + + private static bool ShouldRetry(HttpResponseMessage response) + { + var statusCode = (int)response.StatusCode; + return statusCode is 408 or 429 or >= 500; + } + + private static int AddPositiveJitter(int delayMs) + { +#if NET6_0_OR_GREATER + var random = Random.Shared.NextDouble(); +#else + double random; + lock (JitterLock) + { + random = JitterRandom.NextDouble(); + } +#endif + var jitterMultiplier = 1 + random * JitterFactor; + return (int)(delayMs * jitterMultiplier); + } + + private static int AddSymmetricJitter(int delayMs) + { +#if NET6_0_OR_GREATER + var random = Random.Shared.NextDouble(); +#else + double random; + lock (JitterLock) + { + random = JitterRandom.NextDouble(); + } +#endif + var jitterMultiplier = 1 + (random - 0.5) * JitterFactor; + return (int)(delayMs * jitterMultiplier); + } + + private int GetRetryDelayFromHeaders(HttpResponseMessage response, int retryAttempt) + { + if (response.Headers.TryGetValues("Retry-After", out var retryAfterValues)) + { + var retryAfter = retryAfterValues.FirstOrDefault(); + if (!string.IsNullOrEmpty(retryAfter)) + { + if (int.TryParse(retryAfter, out var retryAfterSeconds) && retryAfterSeconds > 0) + { + return Math.Min(retryAfterSeconds * 1000, MaxRetryDelayMs); + } + + if (DateTimeOffset.TryParse(retryAfter, out var retryAfterDate)) + { + var delay = (int)(retryAfterDate - DateTimeOffset.UtcNow).TotalMilliseconds; + if (delay > 0) + { + return Math.Min(delay, MaxRetryDelayMs); + } + } + } + } + + if (response.Headers.TryGetValues("X-RateLimit-Reset", out var rateLimitResetValues)) + { + var rateLimitReset = rateLimitResetValues.FirstOrDefault(); + if ( + !string.IsNullOrEmpty(rateLimitReset) + && long.TryParse(rateLimitReset, out var resetTime) + ) + { + var resetDateTime = DateTimeOffset.FromUnixTimeSeconds(resetTime); + var delay = (int)(resetDateTime - DateTimeOffset.UtcNow).TotalMilliseconds; + if (delay > 0) + { + return AddPositiveJitter(Math.Min(delay, MaxRetryDelayMs)); + } + } + } + + var exponentialDelay = Math.Min(BaseRetryDelay * (1 << retryAttempt), MaxRetryDelayMs); + return AddSymmetricJitter(exponentialDelay); + } + + private static bool IsRetryableContent(HttpRequestMessage request) + { + return request.Content switch + { + IIsRetryableContent c => c.IsRetryable, + StreamContent => false, + MultipartContent content => !content.Any(c => c is StreamContent), + _ => true, + }; + } + + internal async global::System.Threading.Tasks.Task CreateHttpRequestAsync( + global::Contoso.Net.Core.BaseRequest request + ) + { + var url = BuildUrl(request); + var httpRequest = new HttpRequestMessage(request.Method, url); + httpRequest.Content = request.CreateContent(); + SetHeaders(httpRequest, request.Headers); + + return httpRequest; + } + + private string BuildUrl(global::Contoso.Net.Core.BaseRequest request) + { + var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl ?? Options.BaseUrl; + + var trimmedBaseUrl = baseUrl.TrimEnd('/'); + var trimmedBasePath = request.Path.TrimStart('/'); + var url = $"{trimmedBaseUrl}/{trimmedBasePath}"; + + // Append query string if present + if (!string.IsNullOrEmpty(request.QueryString)) + { + return url + request.QueryString; + } + + return url; + } + + private void SetHeaders(HttpRequestMessage httpRequest, Dictionary? headers) + { + if (headers is null) + { + return; + } + + foreach (var kv in headers) + { + if (kv.Value is null) + { + continue; + } + + httpRequest.Headers.TryAddWithoutValidation(kv.Key, kv.Value); + } + } + + private static (Encoding encoding, string? charset, string mediaType) ParseContentTypeOrDefault( + string? contentType, + Encoding encodingFallback, + string mediaTypeFallback + ) + { + var encoding = encodingFallback; + var mediaType = mediaTypeFallback; + string? charset = null; + if (string.IsNullOrEmpty(contentType)) + { + return (encoding, charset, mediaType); + } + + if (!MediaTypeHeaderValue.TryParse(contentType, out var mediaTypeHeaderValue)) + { + return (encoding, charset, mediaType); + } + + if (!string.IsNullOrEmpty(mediaTypeHeaderValue.CharSet)) + { + charset = mediaTypeHeaderValue.CharSet; + encoding = Encoding.GetEncoding(mediaTypeHeaderValue.CharSet); + } + + if (!string.IsNullOrEmpty(mediaTypeHeaderValue.MediaType)) + { + mediaType = mediaTypeHeaderValue.MediaType; + } + + return (encoding, charset, mediaType); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawResponse.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawResponse.cs new file mode 100644 index 000000000000..a617e3d9111b --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/RawResponse.cs @@ -0,0 +1,24 @@ +using global::System.Net; + +namespace Contoso.Net.Core; + +/// +/// Contains HTTP response metadata including status code, URL, and headers. +/// +public record RawResponse +{ + /// + /// The HTTP status code of the response. + /// + public required HttpStatusCode StatusCode { get; init; } + + /// + /// The request URL that generated this response. + /// + public required Uri Url { get; init; } + + /// + /// The HTTP response headers. + /// + public required Core.ResponseHeaders Headers { get; init; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ResponseHeaders.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ResponseHeaders.cs new file mode 100644 index 000000000000..40445fdf1e6c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ResponseHeaders.cs @@ -0,0 +1,108 @@ +using global::System.Collections; +using global::System.Net.Http.Headers; + +namespace Contoso.Net.Core; + +/// +/// Represents HTTP response headers with case-insensitive lookup. +/// +public readonly struct ResponseHeaders : IEnumerable +{ + private readonly HttpResponseHeaders? _headers; + private readonly HttpContentHeaders? _contentHeaders; + + private ResponseHeaders(HttpResponseHeaders headers, HttpContentHeaders? contentHeaders) + { + _headers = headers; + _contentHeaders = contentHeaders; + } + + /// + /// Gets the Content-Type header value, if present. + /// + public string? ContentType => _contentHeaders?.ContentType?.ToString(); + + /// + /// Gets the Content-Length header value, if present. + /// + public long? ContentLength => _contentHeaders?.ContentLength; + + /// + /// Creates a ResponseHeaders instance from an HttpResponseMessage. + /// + public static ResponseHeaders FromHttpResponseMessage(HttpResponseMessage response) + { + return new ResponseHeaders(response.Headers, response.Content?.Headers); + } + + /// + /// Tries to get a single header value. Returns the first value if multiple values exist. + /// + public bool TryGetValue(string name, out string? value) + { + if (TryGetValues(name, out var values) && values is not null) + { + value = values.FirstOrDefault(); + return true; + } + + value = null; + return false; + } + + /// + /// Tries to get all values for a header. + /// + public bool TryGetValues(string name, out IEnumerable? values) + { + if (_headers?.TryGetValues(name, out values) == true) + { + return true; + } + + if (_contentHeaders?.TryGetValues(name, out values) == true) + { + return true; + } + + values = null; + return false; + } + + /// + /// Checks if the headers contain a specific header name. + /// + public bool Contains(string name) + { + return _headers?.Contains(name) == true || _contentHeaders?.Contains(name) == true; + } + + /// + /// Gets an enumerator for all headers. + /// + public IEnumerator GetEnumerator() + { + if (_headers is not null) + { + foreach (var header in _headers) + { + yield return new HttpHeader(header.Key, string.Join(", ", header.Value)); + } + } + + if (_contentHeaders is not null) + { + foreach (var header in _contentHeaders) + { + yield return new HttpHeader(header.Key, string.Join(", ", header.Value)); + } + } + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); +} + +/// +/// Represents a single HTTP header. +/// +public readonly record struct HttpHeader(string Name, string Value); diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StreamRequest.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StreamRequest.cs new file mode 100644 index 000000000000..7e5910d9dc7f --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StreamRequest.cs @@ -0,0 +1,29 @@ +using global::System.Net.Http; +using global::System.Net.Http.Headers; + +namespace Contoso.Net.Core; + +/// +/// The request object to be sent for streaming uploads. +/// +internal record StreamRequest : BaseRequest +{ + internal Stream? Body { get; init; } + + internal override HttpContent? CreateContent() + { + if (Body is null) + { + return null; + } + + var content = new StreamContent(Body) + { + Headers = + { + ContentType = MediaTypeHeaderValue.Parse(ContentType ?? "application/octet-stream"), + }, + }; + return content; + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnum.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnum.cs new file mode 100644 index 000000000000..509b6089a9bf --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnum.cs @@ -0,0 +1,6 @@ +namespace Contoso.Net.Core; + +public interface IStringEnum : IEquatable +{ + public string Value { get; } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnumExtensions.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnumExtensions.cs new file mode 100644 index 000000000000..fd6723481510 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/StringEnumExtensions.cs @@ -0,0 +1,6 @@ +namespace Contoso.Net.Core; + +internal static class StringEnumExtensions +{ + public static string Stringify(this IStringEnum stringEnum) => stringEnum.Value; +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ValueConvert.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ValueConvert.cs new file mode 100644 index 000000000000..82af8a4eadcb --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Core/ValueConvert.cs @@ -0,0 +1,114 @@ +using global::System.Globalization; + +namespace Contoso.Net.Core; + +/// +/// Convert values to string for path and query parameters. +/// +public static class ValueConvert +{ + internal static string ToPathParameterString(T value) => ToString(value); + + internal static string ToPathParameterString(bool v) => ToString(v); + + internal static string ToPathParameterString(int v) => ToString(v); + + internal static string ToPathParameterString(long v) => ToString(v); + + internal static string ToPathParameterString(float v) => ToString(v); + + internal static string ToPathParameterString(double v) => ToString(v); + + internal static string ToPathParameterString(decimal v) => ToString(v); + + internal static string ToPathParameterString(short v) => ToString(v); + + internal static string ToPathParameterString(ushort v) => ToString(v); + + internal static string ToPathParameterString(uint v) => ToString(v); + + internal static string ToPathParameterString(ulong v) => ToString(v); + + internal static string ToPathParameterString(string v) => ToString(v); + + internal static string ToPathParameterString(char v) => ToString(v); + + internal static string ToPathParameterString(Guid v) => ToString(v); + + internal static string ToQueryStringValue(T value) => value is null ? "" : ToString(value); + + internal static string ToQueryStringValue(bool v) => ToString(v); + + internal static string ToQueryStringValue(int v) => ToString(v); + + internal static string ToQueryStringValue(long v) => ToString(v); + + internal static string ToQueryStringValue(float v) => ToString(v); + + internal static string ToQueryStringValue(double v) => ToString(v); + + internal static string ToQueryStringValue(decimal v) => ToString(v); + + internal static string ToQueryStringValue(short v) => ToString(v); + + internal static string ToQueryStringValue(ushort v) => ToString(v); + + internal static string ToQueryStringValue(uint v) => ToString(v); + + internal static string ToQueryStringValue(ulong v) => ToString(v); + + internal static string ToQueryStringValue(string v) => v is null ? "" : v; + + internal static string ToQueryStringValue(char v) => ToString(v); + + internal static string ToQueryStringValue(Guid v) => ToString(v); + + internal static string ToString(T value) + { + return value switch + { + null => "null", + string str => str, + true => "true", + false => "false", + int i => ToString(i), + long l => ToString(l), + float f => ToString(f), + double d => ToString(d), + decimal dec => ToString(dec), + short s => ToString(s), + ushort u => ToString(u), + uint u => ToString(u), + ulong u => ToString(u), + char c => ToString(c), + Guid guid => ToString(guid), + _ => JsonUtils.SerializeRelaxedEscaping(value, value.GetType()).Trim('"'), + }; + } + + internal static string ToString(bool v) => v ? "true" : "false"; + + internal static string ToString(int v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(long v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(float v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(double v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(decimal v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(short v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(ushort v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(uint v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(ulong v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(char v) => v.ToString(CultureInfo.InvariantCulture); + + internal static string ToString(string v) => v; + + internal static string ToString(Guid v) => v.ToString("D"); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs new file mode 100644 index 000000000000..8c707ead7fc9 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/IContoso.cs @@ -0,0 +1,19 @@ +using Contoso.Net.System; + +namespace Contoso.Net; + +public partial interface IContoso +{ + public ISystemClient System { get; } + WithRawResponseTask CreateUserAsync( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + + WithRawResponseTask CreateTaskAsync( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs new file mode 100644 index 000000000000..23cebcd42efb --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/ISystemClient.cs @@ -0,0 +1,24 @@ +using Contoso.Net; + +namespace Contoso.Net.System; + +public partial interface ISystemClient +{ + WithRawResponseTask CreateUserAsync( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + + WithRawResponseTask CreateTaskAsync( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + + WithRawResponseTask GetUserAsync( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs new file mode 100644 index 000000000000..5b256467c872 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/SystemClient.cs @@ -0,0 +1,285 @@ +using System.Text.Json; +using Contoso.Net; +using Contoso.Net.Core; + +namespace Contoso.Net.System; + +public partial class SystemClient : ISystemClient +{ + private readonly RawClient _client; + + internal SystemClient(RawClient client) + { + _client = client; + } + + private async global::System.Threading.Tasks.Task> CreateUserAsyncCore( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/users", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new ContosoApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new ContosoApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + + private async global::System.Threading.Tasks.Task> CreateTaskAsyncCore( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/users", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new ContosoApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new ContosoApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + + private async global::System.Threading.Tasks.Task> GetUserAsyncCore( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new Contoso.Net.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Get, + Path = string.Format("/users/{0}", ValueConvert.ToPathParameterString(userId)), + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize(responseBody)!; + return new WithRawResponse() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new ContosoApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new ContosoApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + + /// + /// await client.System.CreateUserAsync( + /// new global::Contoso.Net.System.User + /// { + /// Line1 = "line1", + /// Line2 = "line2", + /// City = "city", + /// State = "state", + /// Zip = "zip", + /// Country = "USA", + /// } + /// ); + /// + public WithRawResponseTask CreateUserAsync( + User request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + CreateUserAsyncCore(request, options, cancellationToken) + ); + } + + /// + /// await client.System.CreateTaskAsync( + /// new global::Contoso.Net.System.Task + /// { + /// Name = "name", + /// User = new global::Contoso.Net.System.User + /// { + /// Line1 = "line1", + /// Line2 = "line2", + /// City = "city", + /// State = "state", + /// Zip = "zip", + /// Country = "USA", + /// }, + /// Owner = new global::Contoso.Net.System.User + /// { + /// Line1 = "line1", + /// Line2 = "line2", + /// City = "city", + /// State = "state", + /// Zip = "zip", + /// Country = "USA", + /// }, + /// } + /// ); + /// + public WithRawResponseTask CreateTaskAsync( + Task request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask( + CreateTaskAsyncCore(request, options, cancellationToken) + ); + } + + /// + /// await client.System.GetUserAsync("userId"); + /// + public WithRawResponseTask GetUserAsync( + string userId, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask(GetUserAsyncCore(userId, options, cancellationToken)); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs new file mode 100644 index 000000000000..ccf4d22b9be4 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/Task.cs @@ -0,0 +1,35 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Contoso.Net; +using Contoso.Net.Core; + +namespace Contoso.Net.System; + +[Serializable] +public record Task : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("name")] + public required string Name { get; set; } + + [JsonPropertyName("user")] + public required User User { get; set; } + + [JsonPropertyName("owner")] + public required User Owner { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs new file mode 100644 index 000000000000..3cebe688feb2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/System/Types/User.cs @@ -0,0 +1,44 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Contoso.Net; +using Contoso.Net.Core; + +namespace Contoso.Net.System; + +[Serializable] +public record User : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonPropertyName("line1")] + public required string Line1 { get; set; } + + [JsonPropertyName("line2")] + public string? Line2 { get; set; } + + [JsonPropertyName("city")] + public required string City { get; set; } + + [JsonPropertyName("state")] + public required string State { get; set; } + + [JsonPropertyName("zip")] + public required string Zip { get; set; } + + [JsonPropertyName("country")] + public string Country { get; set; } = "USA"; + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs new file mode 100644 index 000000000000..675fc6a90d2c --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/Task.cs @@ -0,0 +1,39 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Contoso.Net.Core; + +namespace Contoso.Net; + +[Serializable] +public record Task : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonAccess(JsonAccessType.ReadOnly)] + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("name")] + public required string Name { get; set; } + + [JsonPropertyName("email")] + public required string Email { get; set; } + + [JsonAccess(JsonAccessType.WriteOnly)] + [JsonPropertyName("password")] + public required string Password { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs new file mode 100644 index 000000000000..56b4d5424e38 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/Contoso.Net/Types/User.cs @@ -0,0 +1,39 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Contoso.Net.Core; + +namespace Contoso.Net; + +[Serializable] +public record User : IJsonOnDeserialized +{ + [JsonExtensionData] + private readonly IDictionary _extensionData = + new Dictionary(); + + [JsonAccess(JsonAccessType.ReadOnly)] + [JsonPropertyName("id")] + public string Id { get; set; } + + [JsonPropertyName("name")] + public required string Name { get; set; } + + [JsonPropertyName("email")] + public required string Email { get; set; } + + [JsonAccess(JsonAccessType.WriteOnly)] + [JsonPropertyName("password")] + public required string Password { get; set; } + + [JsonIgnore] + public ReadOnlyAdditionalProperties AdditionalProperties { get; private set; } = new(); + + void IJsonOnDeserialized.OnDeserialized() => + AdditionalProperties.CopyFromExtensionData(_extensionData); + + /// + public override string ToString() + { + return JsonUtils.Serialize(this); + } +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs new file mode 100644 index 000000000000..68218991e4ae --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example0.cs @@ -0,0 +1,24 @@ +using Contoso.Net; + +namespace Usage; + +public class Example0 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new Contoso( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.CreateUserAsync( + new global::Contoso.Net.User { + Id = "id", + Name = "name", + Email = "email", + Password = "password" + } + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs new file mode 100644 index 000000000000..09bf7b2ba63a --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example1.cs @@ -0,0 +1,24 @@ +using Contoso.Net; + +namespace Usage; + +public class Example1 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new Contoso( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.CreateTaskAsync( + new global::Contoso.Net.Task { + Id = "id", + Name = "name", + Email = "email", + Password = "password" + } + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs new file mode 100644 index 000000000000..80c99083821f --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example2.cs @@ -0,0 +1,26 @@ +using Contoso.Net; + +namespace Usage; + +public class Example2 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new Contoso( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.System.CreateUserAsync( + new global::Contoso.Net.System.User { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA" + } + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs new file mode 100644 index 000000000000..59842b69acd1 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example3.cs @@ -0,0 +1,37 @@ +using Contoso.Net; + +namespace Usage; + +public class Example3 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new Contoso( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.System.CreateTaskAsync( + new global::Contoso.Net.System.Task { + Name = "name", + User = new global::Contoso.Net.System.User { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA" + }, + Owner = new global::Contoso.Net.System.User { + Line1 = "line1", + Line2 = "line2", + City = "city", + State = "state", + Zip = "zip", + Country = "USA" + } + } + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs new file mode 100644 index 000000000000..1117f921c8b2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/Example4.cs @@ -0,0 +1,19 @@ +using Contoso.Net; + +namespace Usage; + +public class Example4 +{ + public async global::System.Threading.Tasks.Task Do() { + var client = new Contoso( + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.System.GetUserAsync( + "userId" + ); + } + +} diff --git a/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj new file mode 100644 index 000000000000..3417db2e58e2 --- /dev/null +++ b/seed/csharp-sdk/csharp-namespace-collision/namespace-client-collision/src/SeedApi.DynamicSnippets/SeedApi.DynamicSnippets.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + 12 + enable + enable + + + + + + \ No newline at end of file diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md b/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md index c3eaacaeb813..b5e16551e80d 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json b/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json index 1fbf1e90ba51..85712626919f 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types.Object;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example25.cs index f4c29ad53f50..bfc0b0be8d4c 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types.Object; -using System.Globalization; namespace Usage; @@ -14,10 +12,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example26.cs index 9b38d7cee6e1..c0baec660e38 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example26.cs @@ -16,8 +16,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example27.cs index 42f6c78342f4..aeddfa65c328 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,5 +1,6 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints.Pagination; +using SeedExhaustive.Types.Object; +using System.Globalization; namespace Usage; @@ -13,10 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example28.cs index 85ad67dd6341..07faa3d8d579 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints.Pagination; namespace Usage; @@ -12,8 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example30.cs index f7784b6d62ad..3ab82e909a63 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints.Params; namespace Usage; @@ -13,11 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example31.cs index 33804a9581ee..1f3e3522a25b 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example31.cs @@ -13,16 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example32.cs index 380e4fb0225d..b3c01f95e010 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example32.cs @@ -13,10 +13,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example34.cs index 9a50ef3f51bc..90f60c6e634c 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints.Params; namespace Usage; @@ -12,9 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example36.cs index d28c377a8572..c11e5b963972 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Text; namespace Usage; @@ -13,9 +12,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example37.cs index a01f498935e6..9c5a07c40012 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Text; namespace Usage; @@ -12,8 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example38.cs index dcb9bd7b6b49..0162c0df3ffe 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example38.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example39.cs index 73384163854e..a08db1f8823e 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example39.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example40.cs index 7ca3f5a36b71..11a125978ae2 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example40.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example41.cs index b07e32e34fb8..eccd108befee 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example41.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example42.cs index 187d0c8bcf4e..36a56598fad0 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Globalization; namespace Usage; @@ -13,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example43.cs index 97c1422cac68..b293d43be9c4 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Globalization; namespace Usage; @@ -12,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example44.cs index 90253d9f7419..e724a2e6b705 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example44.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example45.cs index 99e2b8319cee..357d18808134 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example45.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example46.cs index 488556cdbdfc..1a4ac07dc4c7 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints.Put; namespace Usage; @@ -13,10 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example47.cs index 89e1e029d1a8..c6d781fa3a15 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,5 +1,5 @@ using SeedExhaustive; -using SeedExhaustive.Types.Union; +using SeedExhaustive.Endpoints.Put; namespace Usage; @@ -13,13 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example48.cs index 916114b028b0..37a1ca1d3c66 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Types.Union; namespace Usage; @@ -12,7 +13,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example49.cs index a0807724838a..2243556d5310 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example49.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example50.cs index 71cd9d82940d..6fa8e7d370ca 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example50.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example51.cs index 3ed251dd318a..4e735913f2c5 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example51.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example52.cs index 5387fbf4ee25..0e4ca4edbd69 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,7 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.InlinedRequests; -using SeedExhaustive.Types.Object; -using System.Globalization; namespace Usage; @@ -15,37 +12,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example54.cs index 469510a3e032..3440c05594dc 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,4 +1,7 @@ using SeedExhaustive; +using SeedExhaustive.InlinedRequests; +using SeedExhaustive.Types.Object; +using System.Globalization; namespace Usage; @@ -12,10 +15,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example56.cs index a6e2cebe1f8c..3d6fadb35105 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example56.cs @@ -12,7 +12,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example57.cs index 6be95a2ffb84..7c1ab283625a 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example57.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example58.cs index b2f77de8025e..1d7bf61864f0 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example58.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.ReqWithHeaders; namespace Usage; @@ -13,13 +12,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..8e2c3b345e74 --- /dev/null +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,25 @@ +using SeedExhaustive; +using SeedExhaustive.ReqWithHeaders; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index afc11427b5aa..f5fead8276db 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -54,6 +54,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index adde9c01e840..2b400a63230c 100644 --- a/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/explicit-namespaces/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -568,6 +568,76 @@ private async Task< } } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -883,6 +953,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/reference.md b/seed/csharp-sdk/exhaustive/include-exception-handler/reference.md index c3eaacaeb813..b5e16551e80d 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/reference.md +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/snippet.json b/seed/csharp-sdk/exhaustive/include-exception-handler/snippet.json index c3c8924f36c0..ccf0ae0124bb 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/snippet.json +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example25.cs index 45729480b4d4..bfc0b0be8d4c 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,10 +12,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example26.cs index d3471773d6e0..46c6d2dbba6d 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example26.cs @@ -16,8 +16,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example27.cs index 1eb39feac319..e37eae416a33 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,5 +1,6 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -13,10 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example28.cs index 85ad67dd6341..6a2eb49dd0fb 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,8 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example30.cs index 27001b64a21b..3ab82e909a63 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,11 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example31.cs index 618b64e9ab2f..36c79d7d46ff 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example31.cs @@ -13,16 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example32.cs index 5378a281fc2d..8a9793f9d790 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example32.cs @@ -13,10 +13,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example34.cs index 9a50ef3f51bc..32a33ef8278b 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,9 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example36.cs index d28c377a8572..c11e5b963972 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Text; namespace Usage; @@ -13,9 +12,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example37.cs index a01f498935e6..9c5a07c40012 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Text; namespace Usage; @@ -12,8 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example38.cs index dcb9bd7b6b49..0162c0df3ffe 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example38.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example39.cs index 73384163854e..a08db1f8823e 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example39.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example40.cs index 7ca3f5a36b71..11a125978ae2 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example40.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example41.cs index b07e32e34fb8..eccd108befee 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example41.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example42.cs index 187d0c8bcf4e..36a56598fad0 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Globalization; namespace Usage; @@ -13,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example43.cs index 97c1422cac68..b293d43be9c4 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Globalization; namespace Usage; @@ -12,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example44.cs index 90253d9f7419..e724a2e6b705 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example44.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example45.cs index 99e2b8319cee..357d18808134 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example45.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example46.cs index 9c56f7b4be4b..1a4ac07dc4c7 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,10 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example47.cs index e2c2ae12ed3a..36e1041e477a 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,5 +1,5 @@ using SeedExhaustive; -using SeedExhaustive.Types; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,13 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example48.cs index 916114b028b0..13cb670c8e95 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Types; namespace Usage; @@ -12,7 +13,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example49.cs index a0807724838a..2243556d5310 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example49.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example50.cs index 71cd9d82940d..6fa8e7d370ca 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example50.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example51.cs index 3ed251dd318a..4e735913f2c5 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example51.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example52.cs index 0a1e26b0878f..0e4ca4edbd69 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,37 +12,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example54.cs index 469510a3e032..e26d6e90bb58 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,4 +1,6 @@ using SeedExhaustive; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -12,10 +14,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example56.cs index a6e2cebe1f8c..3d6fadb35105 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example56.cs @@ -12,7 +12,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example57.cs index 6be95a2ffb84..7c1ab283625a 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example57.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example58.cs index 53ded20ad49a..1d7bf61864f0 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example58.cs @@ -12,13 +12,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..dec4cfe3349a --- /dev/null +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,24 @@ +using SeedExhaustive; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index 07d52b568d4b..fe6753fc6508 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -54,6 +54,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 5330a34379fb..7f126f32e5de 100644 --- a/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/include-exception-handler/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -638,6 +638,83 @@ private async Task< .ConfigureAwait(false); } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return await _client + .Options.ExceptionHandler.TryCatchAsync(async () => + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = + response.Raw.RequestMessage?.RequestUri + ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + }) + .ConfigureAwait(false); + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -960,6 +1037,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md b/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md index c3eaacaeb813..b5e16551e80d 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json b/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json index c3c8924f36c0..ccf0ae0124bb 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example25.cs index 45729480b4d4..bfc0b0be8d4c 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,10 +12,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example26.cs index d3471773d6e0..46c6d2dbba6d 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example26.cs @@ -16,8 +16,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example27.cs index 1eb39feac319..e37eae416a33 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,5 +1,6 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -13,10 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example28.cs index 85ad67dd6341..6a2eb49dd0fb 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,8 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example30.cs index 27001b64a21b..3ab82e909a63 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,11 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example31.cs index 618b64e9ab2f..36c79d7d46ff 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example31.cs @@ -13,16 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example32.cs index 5378a281fc2d..8a9793f9d790 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example32.cs @@ -13,10 +13,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example34.cs index 9a50ef3f51bc..32a33ef8278b 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,9 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example36.cs index d28c377a8572..c11e5b963972 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Text; namespace Usage; @@ -13,9 +12,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example37.cs index a01f498935e6..9c5a07c40012 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Text; namespace Usage; @@ -12,8 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example38.cs index dcb9bd7b6b49..0162c0df3ffe 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example38.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example39.cs index 73384163854e..a08db1f8823e 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example39.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example40.cs index 7ca3f5a36b71..11a125978ae2 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example40.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example41.cs index b07e32e34fb8..eccd108befee 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example41.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example42.cs index 187d0c8bcf4e..36a56598fad0 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Globalization; namespace Usage; @@ -13,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example43.cs index 97c1422cac68..b293d43be9c4 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Globalization; namespace Usage; @@ -12,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example44.cs index 90253d9f7419..e724a2e6b705 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example44.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example45.cs index 99e2b8319cee..357d18808134 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example45.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example46.cs index 9c56f7b4be4b..1a4ac07dc4c7 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,10 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example47.cs index e2c2ae12ed3a..36e1041e477a 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,5 +1,5 @@ using SeedExhaustive; -using SeedExhaustive.Types; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,13 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example48.cs index 916114b028b0..13cb670c8e95 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Types; namespace Usage; @@ -12,7 +13,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example49.cs index a0807724838a..2243556d5310 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example49.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example50.cs index 71cd9d82940d..6fa8e7d370ca 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example50.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example51.cs index 3ed251dd318a..4e735913f2c5 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example51.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example52.cs index 0a1e26b0878f..0e4ca4edbd69 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,37 +12,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example54.cs index 469510a3e032..e26d6e90bb58 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,4 +1,6 @@ using SeedExhaustive; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -12,10 +14,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example56.cs index a6e2cebe1f8c..3d6fadb35105 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example56.cs @@ -12,7 +12,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example57.cs index 6be95a2ffb84..7c1ab283625a 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example57.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example58.cs index 53ded20ad49a..1d7bf61864f0 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example58.cs @@ -12,13 +12,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..dec4cfe3349a --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,24 @@ +using SeedExhaustive; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index 07d52b568d4b..fe6753fc6508 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -54,6 +54,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 1d3ede2bc61a..ba9a182c9824 100644 --- a/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-generate-error-types/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -568,6 +568,76 @@ private async Task< } } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -883,6 +953,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md index c3eaacaeb813..b5e16551e80d 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json index c3c8924f36c0..ccf0ae0124bb 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example25.cs index 272ef30cd2d5..1bfb39371bf3 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,7 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -15,10 +13,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example26.cs index 73add81f1486..7367ed9201d7 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example26.cs @@ -17,8 +17,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example27.cs index b2e4dc8473e8..0a8de0b23b7b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,6 +1,7 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -14,10 +15,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example28.cs index 57b90934565c..be457ebef7ff 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,5 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,8 +14,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example30.cs index 61c57b0a391b..47365be3b934 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,6 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; namespace Usage; @@ -14,11 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example31.cs index a1799a7b2334..706eb9742953 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example31.cs @@ -14,16 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example32.cs index 034a05019fe3..634c5dcfa86b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example32.cs @@ -14,10 +14,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example34.cs index 109eb3bb01ab..5dadec03524a 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,5 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,9 +14,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example36.cs index 85511c4b3508..7b3ff094bef7 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,6 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using System.Text; namespace Usage; @@ -14,9 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example37.cs index 5414cd2207db..fb7642307d4c 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,5 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; +using System.Text; namespace Usage; @@ -13,8 +14,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example38.cs index 1a4ee21a3ba5..24337226402b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example38.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example39.cs index d2236ba671e9..c746dab2eeb1 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example39.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example40.cs index 3a988b3944a5..34bcf135f21d 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example40.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example41.cs index 2a04a88cbf45..0dd168f82ea7 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example41.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example42.cs index f337d3ea700d..48cdc304e662 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,6 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using System.Globalization; namespace Usage; @@ -14,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example43.cs index f804c8cb6cc6..e08f4e60cf46 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,5 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; +using System.Globalization; namespace Usage; @@ -13,8 +14,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example44.cs index f04fc69be409..f8cf7f6c1cc7 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example44.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example45.cs index aa99fc8cdccb..1b5a8449f464 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example45.cs @@ -13,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example46.cs index 3ccdf4cd9c6f..9bef518d5934 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,6 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Endpoints; namespace Usage; @@ -14,10 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example47.cs index e6a928d2ab06..3cc5090bd99e 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,6 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Types; +using SeedExhaustive.Endpoints; namespace Usage; @@ -14,13 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example48.cs index 793cb7aa3b09..80e4655c715d 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,5 +1,6 @@ using SeedExhaustive; using SeedExhaustive.Core; +using SeedExhaustive.Types; namespace Usage; @@ -13,7 +14,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example49.cs index de5c9eff3918..19458074584c 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example49.cs @@ -13,7 +13,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example50.cs index 4da52b065170..009f19a29bbe 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example50.cs @@ -13,7 +13,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example51.cs index 7505bc430ac2..83cc6a4cff3e 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example51.cs @@ -13,7 +13,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example52.cs index 97e3475f2873..d9ed52c99101 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,7 +1,5 @@ using SeedExhaustive; using SeedExhaustive.Core; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -15,37 +13,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example54.cs index e282448092f1..3c1a224407fe 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,5 +1,7 @@ using SeedExhaustive; using SeedExhaustive.Core; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -13,10 +15,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example56.cs index 7d73b8bd7753..d90296da781b 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example56.cs @@ -13,7 +13,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example57.cs index 7d1ae7dfed3a..a89a89049a10 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example57.cs @@ -13,7 +13,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example58.cs index 4b26031b74d1..61248e0d1df0 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example58.cs @@ -13,13 +13,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..3406b53a1626 --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,25 @@ +using SeedExhaustive; +using SeedExhaustive.Core; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index 74466b0037a4..f0b6b00e1592 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -55,6 +55,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 1d3ede2bc61a..ba9a182c9824 100644 --- a/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/no-root-namespace-for-core-classes/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -568,6 +568,76 @@ private async Task< } } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -883,6 +953,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/reference.md b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/reference.md index c3eaacaeb813..b5e16551e80d 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/reference.md +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/snippet.json b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/snippet.json index c3c8924f36c0..ccf0ae0124bb 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/snippet.json +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example25.cs index 45729480b4d4..bfc0b0be8d4c 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,10 +12,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example26.cs index d3471773d6e0..46c6d2dbba6d 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example26.cs @@ -16,8 +16,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example27.cs index 1eb39feac319..e37eae416a33 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,5 +1,6 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -13,10 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example28.cs index 85ad67dd6341..6a2eb49dd0fb 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,8 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example30.cs index 27001b64a21b..3ab82e909a63 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,11 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example31.cs index 618b64e9ab2f..36c79d7d46ff 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example31.cs @@ -13,16 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example32.cs index 5378a281fc2d..8a9793f9d790 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example32.cs @@ -13,10 +13,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example34.cs index 9a50ef3f51bc..32a33ef8278b 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,9 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example36.cs index d28c377a8572..c11e5b963972 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Text; namespace Usage; @@ -13,9 +12,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example37.cs index a01f498935e6..9c5a07c40012 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Text; namespace Usage; @@ -12,8 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example38.cs index dcb9bd7b6b49..0162c0df3ffe 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example38.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example39.cs index 73384163854e..a08db1f8823e 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example39.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example40.cs index 7ca3f5a36b71..11a125978ae2 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example40.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example41.cs index b07e32e34fb8..eccd108befee 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example41.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example42.cs index 187d0c8bcf4e..36a56598fad0 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Globalization; namespace Usage; @@ -13,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example43.cs index 97c1422cac68..b293d43be9c4 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Globalization; namespace Usage; @@ -12,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example44.cs index 90253d9f7419..e724a2e6b705 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example44.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example45.cs index 99e2b8319cee..357d18808134 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example45.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example46.cs index 9c56f7b4be4b..1a4ac07dc4c7 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,10 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example47.cs index e2c2ae12ed3a..36e1041e477a 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,5 +1,5 @@ using SeedExhaustive; -using SeedExhaustive.Types; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,13 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example48.cs index 916114b028b0..13cb670c8e95 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Types; namespace Usage; @@ -12,7 +13,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example49.cs index a0807724838a..2243556d5310 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example49.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example50.cs index 71cd9d82940d..6fa8e7d370ca 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example50.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example51.cs index 3ed251dd318a..4e735913f2c5 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example51.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example52.cs index 0a1e26b0878f..0e4ca4edbd69 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,37 +12,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example54.cs index 469510a3e032..e26d6e90bb58 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,4 +1,6 @@ using SeedExhaustive; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -12,10 +14,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example56.cs index a6e2cebe1f8c..3d6fadb35105 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example56.cs @@ -12,7 +12,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example57.cs index 6be95a2ffb84..7c1ab283625a 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example57.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example58.cs index 53ded20ad49a..1d7bf61864f0 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example58.cs @@ -12,13 +12,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..dec4cfe3349a --- /dev/null +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,24 @@ +using SeedExhaustive; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index 07d52b568d4b..fe6753fc6508 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -54,6 +54,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index e19f987527b4..e5e3d1c11cc9 100644 --- a/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/redact-response-body-on-error/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -568,6 +568,76 @@ private async Task< } } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + null, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -883,6 +953,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/reference.md b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/reference.md index 2ee12cac4ad3..c6d02038caca 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/reference.md +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/reference.md @@ -1192,6 +1192,54 @@ await client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(Dictionary<string, object?> { ... }) -> WithRawResponseTask<Dictionary<string, object?>> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Dictionary` + +
+
+
+
+ +
diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/snippet.json b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/snippet.json index ecd4037a5f23..5e3d37f5e36d 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/snippet.json +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/snippet.json @@ -289,6 +289,18 @@ "client": "using SeedExhaustive.Types;\nusing SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnWithDocumentedUnknownTypeAsync(\n new ObjectWithDocumentedUnknownType\n {\n DocumentedUnknownType = new Dictionary() { { \"key\", \"value\" } },\n }\n);\n" } }, + { + "example_identifier": null, + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "csharp", + "client": "using SeedExhaustive;\n\nvar client = new SeedExhaustiveClient(\"TOKEN\");\nawait client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync(\n new Dictionary()\n {\n {\n \"string\",\n new Dictionary() { { \"key\", \"value\" } }\n },\n }\n);\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example25.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example25.cs index 45729480b4d4..bfc0b0be8d4c 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example25.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example25.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,10 +12,13 @@ public async Task Do() { } ); - await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( - new ObjectWithDatetimeLikeString { - DatetimeLikeString = "2023-08-31T14:15:22Z", - ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary(){ + ["string"] = new Dictionary() + { + ["key"] = "value", + } + , } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example26.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example26.cs index d3471773d6e0..46c6d2dbba6d 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example26.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example26.cs @@ -16,8 +16,8 @@ public async Task Do() { await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( new ObjectWithDatetimeLikeString { - DatetimeLikeString = "datetimeLikeString", - ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + DatetimeLikeString = "2023-08-31T14:15:22Z", + ActualDatetime = DateTime.Parse("2023-08-31T14:15:22Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example27.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example27.cs index 1eb39feac319..e37eae416a33 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example27.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example27.cs @@ -1,5 +1,6 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -13,10 +14,10 @@ public async Task Do() { } ); - await client.Endpoints.Pagination.ListItemsAsync( - new ListItemsRequest { - Cursor = "cursor", - Limit = 1 + await client.Endpoints.Object.GetAndReturnWithDatetimeLikeStringAsync( + new ObjectWithDatetimeLikeString { + DatetimeLikeString = "datetimeLikeString", + ActualDatetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example28.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example28.cs index 85ad67dd6341..6a2eb49dd0fb 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example28.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example28.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,8 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAsync( - "param" + await client.Endpoints.Pagination.ListItemsAsync( + new ListItemsRequest { + Cursor = "cursor", + Limit = 1 + } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example30.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example30.cs index 27001b64a21b..3ab82e909a63 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example30.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example30.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,11 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithQueryAsync( - new GetWithQuery { - Query = "query", - Number = 1 - } + await client.Endpoints.Params.GetWithPathAsync( + "param" ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example31.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example31.cs index 618b64e9ab2f..36c79d7d46ff 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example31.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example31.cs @@ -13,16 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( - new GetWithMultipleQuery { - Query = new List(){ - "query", - } - , - Number = new List(){ - 1, - } - + await client.Endpoints.Params.GetWithQueryAsync( + new GetWithQuery { + Query = "query", + Number = 1 } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example32.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example32.cs index 5378a281fc2d..8a9793f9d790 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example32.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example32.cs @@ -13,10 +13,16 @@ public async Task Do() { } ); - await client.Endpoints.Params.GetWithPathAndQueryAsync( - "param", - new GetWithPathAndQuery { - Query = "query" + await client.Endpoints.Params.GetWithAllowMultipleQueryAsync( + new GetWithMultipleQuery { + Query = new List(){ + "query", + } + , + Number = new List(){ + 1, + } + } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example34.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example34.cs index 9a50ef3f51bc..32a33ef8278b 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example34.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example34.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Endpoints; namespace Usage; @@ -12,9 +13,11 @@ public async Task Do() { } ); - await client.Endpoints.Params.ModifyWithPathAsync( + await client.Endpoints.Params.GetWithPathAndQueryAsync( "param", - "string" + new GetWithPathAndQuery { + Query = "query" + } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example36.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example36.cs index d28c377a8572..c11e5b963972 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example36.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example36.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Text; namespace Usage; @@ -13,9 +12,9 @@ public async Task Do() { } ); - await client.Endpoints.Params.UploadWithPathAsync( - "upload-path", - new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) + await client.Endpoints.Params.ModifyWithPathAsync( + "param", + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example37.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example37.cs index a01f498935e6..9c5a07c40012 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example37.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example37.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Text; namespace Usage; @@ -12,8 +13,9 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnStringAsync( - "string" + await client.Endpoints.Params.UploadWithPathAsync( + "upload-path", + new MemoryStream(Encoding.UTF8.GetBytes("[bytes]")) ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example38.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example38.cs index dcb9bd7b6b49..0162c0df3ffe 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example38.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example38.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnIntAsync( - 1 + await client.Endpoints.Primitive.GetAndReturnStringAsync( + "string" ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example39.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example39.cs index 73384163854e..a08db1f8823e 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example39.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example39.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnLongAsync( - 1000000L + await client.Endpoints.Primitive.GetAndReturnIntAsync( + 1 ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example40.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example40.cs index 7ca3f5a36b71..11a125978ae2 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example40.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example40.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDoubleAsync( - 1.1 + await client.Endpoints.Primitive.GetAndReturnLongAsync( + 1000000L ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example41.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example41.cs index b07e32e34fb8..eccd108befee 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example41.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example41.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBoolAsync( - true + await client.Endpoints.Primitive.GetAndReturnDoubleAsync( + 1.1 ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example42.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example42.cs index 187d0c8bcf4e..36a56598fad0 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example42.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example42.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using System.Globalization; namespace Usage; @@ -13,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( - DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) + await client.Endpoints.Primitive.GetAndReturnBoolAsync( + true ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example43.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example43.cs index 97c1422cac68..b293d43be9c4 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example43.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example43.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using System.Globalization; namespace Usage; @@ -12,8 +13,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnDateAsync( - DateOnly.Parse("2023-01-15") + await client.Endpoints.Primitive.GetAndReturnDatetimeAsync( + DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal) ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example44.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example44.cs index 90253d9f7419..e724a2e6b705 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example44.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example44.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnUuidAsync( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" + await client.Endpoints.Primitive.GetAndReturnDateAsync( + DateOnly.Parse("2023-01-15") ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example45.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example45.cs index 99e2b8319cee..357d18808134 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example45.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example45.cs @@ -12,8 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Primitive.GetAndReturnBase64Async( - "SGVsbG8gd29ybGQh" + await client.Endpoints.Primitive.GetAndReturnUuidAsync( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example46.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example46.cs index 9c56f7b4be4b..1a4ac07dc4c7 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example46.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example46.cs @@ -1,5 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Endpoints; namespace Usage; @@ -13,10 +12,8 @@ public async Task Do() { } ); - await client.Endpoints.Put.AddAsync( - new PutRequest { - Id = "id" - } + await client.Endpoints.Primitive.GetAndReturnBase64Async( + "SGVsbG8gd29ybGQh" ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example47.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example47.cs index e2c2ae12ed3a..36e1041e477a 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example47.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example47.cs @@ -1,5 +1,5 @@ using SeedExhaustive; -using SeedExhaustive.Types; +using SeedExhaustive.Endpoints; namespace Usage; @@ -13,13 +13,10 @@ public async Task Do() { } ); - await client.Endpoints.Union.GetAndReturnUnionAsync( - new Animal( - new Dog { - Name = "name", - LikesToWoof = true - } - ) + await client.Endpoints.Put.AddAsync( + new PutRequest { + Id = "id" + } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example48.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example48.cs index 916114b028b0..13cb670c8e95 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example48.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example48.cs @@ -1,4 +1,5 @@ using SeedExhaustive; +using SeedExhaustive.Types; namespace Usage; @@ -12,7 +13,14 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithMixedCaseAsync(); + await client.Endpoints.Union.GetAndReturnUnionAsync( + new Animal( + new Dog { + Name = "name", + LikesToWoof = true + } + ) + ); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example49.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example49.cs index a0807724838a..2243556d5310 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example49.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example49.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.NoEndingSlashAsync(); + await client.Endpoints.Urls.WithMixedCaseAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example50.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example50.cs index 71cd9d82940d..6fa8e7d370ca 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example50.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example50.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithEndingSlashAsync(); + await client.Endpoints.Urls.NoEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example51.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example51.cs index 3ed251dd318a..4e735913f2c5 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example51.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example51.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.Endpoints.Urls.WithUnderscoresAsync(); + await client.Endpoints.Urls.WithEndingSlashAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example52.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example52.cs index 0a1e26b0878f..0e4ca4edbd69 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example52.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example52.cs @@ -1,6 +1,4 @@ using SeedExhaustive; -using SeedExhaustive.Types; -using System.Globalization; namespace Usage; @@ -14,37 +12,7 @@ public async Task Do() { } ); - await client.InlinedRequests.PostWithObjectBodyandResponseAsync( - new PostWithObjectBody { - String = "string", - Integer = 1, - NestedObject = new ObjectWithOptionalField { - String = "string", - Integer = 1, - Long = 1000000L, - Double = 1.1, - Bool = true, - Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), - Date = DateOnly.Parse("2023-01-15"), - Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - Base64 = "SGVsbG8gd29ybGQh", - List = new List(){ - "list", - "list", - } - , - Set = new HashSet(){ - "set", - } - , - Map = new Dictionary(){ - [1] = "map", - } - , - Bigint = "1000000" - } - } - ); + await client.Endpoints.Urls.WithUnderscoresAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example54.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example54.cs index 469510a3e032..e26d6e90bb58 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example54.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example54.cs @@ -1,4 +1,6 @@ using SeedExhaustive; +using SeedExhaustive.Types; +using System.Globalization; namespace Usage; @@ -12,10 +14,35 @@ public async Task Do() { } ); - await client.NoAuth.PostWithNoAuthAsync( - new Dictionary() - { - ["key"] = "value", + await client.InlinedRequests.PostWithObjectBodyandResponseAsync( + new PostWithObjectBody { + String = "string", + Integer = 1, + NestedObject = new ObjectWithOptionalField { + String = "string", + Integer = 1, + Long = 1000000L, + Double = 1.1, + Bool = true, + Datetime = DateTime.Parse("2024-01-15T09:30:00Z", null, DateTimeStyles.AdjustToUniversal), + Date = DateOnly.Parse("2023-01-15"), + Uuid = "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + Base64 = "SGVsbG8gd29ybGQh", + List = new List(){ + "list", + "list", + } + , + Set = new HashSet(){ + "set", + } + , + Map = new Dictionary(){ + [1] = "map", + } + , + Bigint = "1000000" + } } ); } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example56.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example56.cs index a6e2cebe1f8c..3d6fadb35105 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example56.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example56.cs @@ -12,7 +12,12 @@ public async Task Do() { } ); - await client.NoReqBody.GetWithNoRequestBodyAsync(); + await client.NoAuth.PostWithNoAuthAsync( + new Dictionary() + { + ["key"] = "value", + } + ); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example57.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example57.cs index 6be95a2ffb84..7c1ab283625a 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example57.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example57.cs @@ -12,7 +12,7 @@ public async Task Do() { } ); - await client.NoReqBody.PostWithNoRequestBodyAsync(); + await client.NoReqBody.GetWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example58.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example58.cs index 53ded20ad49a..1d7bf61864f0 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example58.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example58.cs @@ -12,13 +12,7 @@ public async Task Do() { } ); - await client.ReqWithHeaders.GetWithCustomHeaderAsync( - new ReqWithHeaders { - XTestServiceHeader = "X-TEST-SERVICE-HEADER", - XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", - Body = "string" - } - ); + await client.NoReqBody.PostWithNoRequestBodyAsync(); } } diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example59.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example59.cs new file mode 100644 index 000000000000..dec4cfe3349a --- /dev/null +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedApi.DynamicSnippets/Example59.cs @@ -0,0 +1,24 @@ +using SeedExhaustive; + +namespace Usage; + +public class Example59 +{ + public async Task Do() { + var client = new SeedExhaustiveClient( + token: "", + clientOptions: new ClientOptions { + BaseUrl = "https://api.fern.com" + } + ); + + await client.ReqWithHeaders.GetWithCustomHeaderAsync( + new ReqWithHeaders { + XTestServiceHeader = "X-TEST-SERVICE-HEADER", + XTestEndpointHeader = "X-TEST-ENDPOINT-HEADER", + Body = "string" + } + ); + } + +} diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs new file mode 100644 index 000000000000..c61410228d0d --- /dev/null +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive.Test/Unit/MockServer/Endpoints/Object/GetAndReturnMapOfDocumentedUnknownTypeTest.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using SeedExhaustive.Test.Unit.MockServer; +using SeedExhaustive.Test.Utils; + +namespace SeedExhaustive.Test.Unit.MockServer.Endpoints.Object; + +[TestFixture] +[Parallelizable(ParallelScope.Self)] +public class GetAndReturnMapOfDocumentedUnknownTypeTest : BaseMockServerTest +{ + [NUnit.Framework.Test] + public async Task MockServerTest() + { + const string requestJson = """ + { + "string": { + "key": "value" + } + } + """; + + const string mockResponse = """ + { + "string": { + "key": "value" + } + } + """; + + Server + .Given( + WireMock + .RequestBuilders.Request.Create() + .WithPath("/object/get-and-return-map-of-documented-unknown-type") + .UsingPost() + .WithBodyAsJson(requestJson) + ) + .RespondWith( + WireMock + .ResponseBuilders.Response.Create() + .WithStatusCode(200) + .WithBody(mockResponse) + ); + + var response = await Client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + new Dictionary() + { + { + "string", + new Dictionary() { { "key", "value" } } + }, + } + ); + JsonAssert.AreEqual(response, mockResponse); + } +} diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs index 07d52b568d4b..fe6753fc6508 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/IObjectClient.cs @@ -54,6 +54,12 @@ WithRawResponseTask GetAndReturnWithDocumentedU CancellationToken cancellationToken = default ); + WithRawResponseTask> GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ); + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs index 1d3ede2bc61a..ba9a182c9824 100644 --- a/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs +++ b/seed/csharp-sdk/exhaustive/use-undiscriminated-unions/src/SeedExhaustive/Endpoints/Object/ObjectClient.cs @@ -568,6 +568,76 @@ private async Task< } } + private async Task< + WithRawResponse> + > GetAndReturnMapOfDocumentedUnknownTypeAsyncCore( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + var _headers = await new SeedExhaustive.Core.HeadersBuilder.Builder() + .Add(_client.Options.Headers) + .Add(_client.Options.AdditionalHeaders) + .Add(options?.AdditionalHeaders) + .BuildAsync() + .ConfigureAwait(false); + var response = await _client + .SendRequestAsync( + new JsonRequest + { + Method = HttpMethod.Post, + Path = "/object/get-and-return-map-of-documented-unknown-type", + Body = request, + Headers = _headers, + Options = options, + }, + cancellationToken + ) + .ConfigureAwait(false); + if (response.StatusCode is >= 200 and < 400) + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + try + { + var responseData = JsonUtils.Deserialize>( + responseBody + )!; + return new WithRawResponse>() + { + Data = responseData, + RawResponse = new RawResponse() + { + StatusCode = response.Raw.StatusCode, + Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"), + Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw), + }, + }; + } + catch (JsonException e) + { + throw new SeedExhaustiveApiException( + "Failed to deserialize response", + response.StatusCode, + responseBody, + e + ); + } + } + { + var responseBody = await response + .Raw.Content.ReadAsStringAsync(cancellationToken) + .ConfigureAwait(false); + throw new SeedExhaustiveApiException( + $"Error with status code {response.StatusCode}", + response.StatusCode, + responseBody + ); + } + } + private async Task< WithRawResponse > GetAndReturnWithDatetimeLikeStringAsyncCore( @@ -883,6 +953,30 @@ public WithRawResponseTask GetAndReturnWithDocu ); } + /// + /// await client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownTypeAsync( + /// new Dictionary<string, object>() + /// { + /// { + /// "string", + /// new Dictionary<object, object?>() { { "key", "value" } } + /// }, + /// } + /// ); + /// + public WithRawResponseTask< + Dictionary + > GetAndReturnMapOfDocumentedUnknownTypeAsync( + Dictionary request, + RequestOptions? options = null, + CancellationToken cancellationToken = default + ) + { + return new WithRawResponseTask>( + GetAndReturnMapOfDocumentedUnknownTypeAsyncCore(request, options, cancellationToken) + ); + } + /// /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/csharp-sdk/seed.yml b/seed/csharp-sdk/seed.yml index fc2588283b30..d4f3f5fdd0ca 100644 --- a/seed/csharp-sdk/seed.yml +++ b/seed/csharp-sdk/seed.yml @@ -258,6 +258,12 @@ fixtures: experimental-fully-qualified-namespaces: true experimental-dotnet-format: true outputFolder: fully-qualified-namespaces + - customConfig: + namespace: "Contoso.Net" + client-class-name: "Contoso" + explicit-namespaces: true + experimental-fully-qualified-namespaces: true + outputFolder: namespace-client-collision csharp-system-collision: - customConfig: client-class-name: System @@ -311,6 +317,7 @@ fixtures: redact-response-body-on-error: true outputFolder: redact-response-body-on-error allowedFailures: + - csharp-namespace-collision:namespace-client-collision - enum:forward-compatible-enums - enum:plain-enums - examples:no-custom-config diff --git a/seed/fastapi/alias/types/object.py b/seed/fastapi/alias/types/object.py index f759cc7aa4f9..92e7325ff2c7 100644 --- a/seed/fastapi/alias/types/object.py +++ b/seed/fastapi/alias/types/object.py @@ -11,3 +11,6 @@ ) """ Object = Type +""" +Object is an alias for a type. +""" diff --git a/seed/fastapi/alias/types/type_id.py b/seed/fastapi/alias/types/type_id.py index c5f3b3bb32eb..d01007d247b7 100644 --- a/seed/fastapi/alias/types/type_id.py +++ b/seed/fastapi/alias/types/type_id.py @@ -5,3 +5,6 @@ """ TypeId = str +""" +An alias for type IDs. +""" diff --git a/seed/fastapi/examples/generate-package-deps/poetry.lock b/seed/fastapi/examples/generate-package-deps/poetry.lock index 3ce4b84f111c..b6ed52012b6a 100644 --- a/seed/fastapi/examples/generate-package-deps/poetry.lock +++ b/seed/fastapi/examples/generate-package-deps/poetry.lock @@ -41,6 +41,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "colorama" version = "0.4.6" @@ -375,44 +386,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -600,4 +628,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "40a29052c44e8bb3fc1d6d3a5abc14cf41f6ae77705c90a83e181f238eb96e0d" +content-hash = "41de4db2bb6bc9c2de1094bba16355c5ba00c5987880aedd4ad833522fdcf6c1" diff --git a/seed/fastapi/file-upload-openapi/types/file_id.py b/seed/fastapi/file-upload-openapi/types/file_id.py index bd87e9f6ceca..6f30b3763b28 100644 --- a/seed/fastapi/file-upload-openapi/types/file_id.py +++ b/seed/fastapi/file-upload-openapi/types/file_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. FileId = str +""" +The unique identifier for a File in the database +""" diff --git a/seed/fastapi/literals-unions/resources/literals/types/literal_string.py b/seed/fastapi/literals-unions/resources/literals/types/literal_string.py index 573525de4a6e..5f3f6384e5c3 100644 --- a/seed/fastapi/literals-unions/resources/literals/types/literal_string.py +++ b/seed/fastapi/literals-unions/resources/literals/types/literal_string.py @@ -3,3 +3,6 @@ import typing LiteralString = typing.Literal["literally"] +""" +A string literal. +""" diff --git a/seed/fastapi/nullable-optional/resources/nullable_optional/types/nullable_user_id.py b/seed/fastapi/nullable-optional/resources/nullable_optional/types/nullable_user_id.py index b770129bb6ab..72acaaa923b0 100644 --- a/seed/fastapi/nullable-optional/resources/nullable_optional/types/nullable_user_id.py +++ b/seed/fastapi/nullable-optional/resources/nullable_optional/types/nullable_user_id.py @@ -3,3 +3,6 @@ import typing NullableUserId = typing.Optional[str] +""" +An alias for a nullable user ID +""" diff --git a/seed/fastapi/nullable-optional/resources/nullable_optional/types/optional_user_id.py b/seed/fastapi/nullable-optional/resources/nullable_optional/types/optional_user_id.py index 8eb13fde68b4..6c1d26fa708a 100644 --- a/seed/fastapi/nullable-optional/resources/nullable_optional/types/optional_user_id.py +++ b/seed/fastapi/nullable-optional/resources/nullable_optional/types/optional_user_id.py @@ -3,3 +3,6 @@ import typing OptionalUserId = typing.Optional[str] +""" +An alias for an optional user ID +""" diff --git a/seed/fastapi/undiscriminated-unions/resources/union/types/metadata.py b/seed/fastapi/undiscriminated-unions/resources/union/types/metadata.py index 793bb560d840..83b28a5cd42c 100644 --- a/seed/fastapi/undiscriminated-unions/resources/union/types/metadata.py +++ b/seed/fastapi/undiscriminated-unions/resources/union/types/metadata.py @@ -10,3 +10,8 @@ {KeyType.NAME: "exampleName", KeyType.VALUE: "exampleValue"} """ Metadata = typing.Dict[Key, str] +""" +Undiscriminated unions can act as a map key +as long as all of their values are valid keys +(i.e. do they have a valid string representation). +""" diff --git a/seed/fastapi/undiscriminated-unions/resources/union/types/name.py b/seed/fastapi/undiscriminated-unions/resources/union/types/name.py index 46548346abdc..c3c6a9ad17f2 100644 --- a/seed/fastapi/undiscriminated-unions/resources/union/types/name.py +++ b/seed/fastapi/undiscriminated-unions/resources/union/types/name.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. Name = str +""" +A name (alias for string) +""" diff --git a/seed/fastapi/undiscriminated-unions/resources/union/types/user_id.py b/seed/fastapi/undiscriminated-unions/resources/union/types/user_id.py index 15911041b772..7d8187da9e50 100644 --- a/seed/fastapi/undiscriminated-unions/resources/union/types/user_id.py +++ b/seed/fastapi/undiscriminated-unions/resources/union/types/user_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. UserId = str +""" +A user identifier (alias for string) +""" diff --git a/seed/go-model/exhaustive/types/object.go b/seed/go-model/exhaustive/types/object.go index d89cf03c0287..631fac6f96aa 100644 --- a/seed/go-model/exhaustive/types/object.go +++ b/seed/go-model/exhaustive/types/object.go @@ -642,3 +642,6 @@ func (o *ObjectWithDocumentedUnknownType) String() string { // Tests that unknown types are able to preserve their docstrings. type DocumentedUnknownType = any + +// Tests that map value types with unknown types don't get spurious | undefined. +type MapOfDocumentedUnknownType = map[string]DocumentedUnknownType diff --git a/seed/go-sdk/accept-header/errors.go b/seed/go-sdk/accept-header/errors.go index d49754b25455..c2f880d9587f 100644 --- a/seed/go-sdk/accept-header/errors.go +++ b/seed/go-sdk/accept-header/errors.go @@ -10,11 +10,11 @@ import ( // Admin not found type NotFoundError struct { *core.APIError - Body interface{} + Body any } func (n *NotFoundError) UnmarshalJSON(data []byte) error { - var body interface{} + var body any if err := json.Unmarshal(data, &body); err != nil { return err } diff --git a/seed/go-sdk/client-side-params/service.go b/seed/go-sdk/client-side-params/service.go index 12d0ec31ed3a..553e18a75eb0 100644 --- a/seed/go-sdk/client-side-params/service.go +++ b/seed/go-sdk/client-side-params/service.go @@ -479,8 +479,8 @@ type SearchResourcesRequest struct { // Offset for pagination Offset int `json:"-" url:"offset"` // Search query text - Query *string `json:"query,omitempty" url:"-"` - Filters map[string]interface{} `json:"filters,omitempty" url:"-"` + Query *string `json:"query,omitempty" url:"-"` + Filters map[string]any `json:"filters,omitempty" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -516,7 +516,7 @@ func (s *SearchResourcesRequest) SetQuery(query *string) { // SetFilters sets the Filters field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (s *SearchResourcesRequest) SetFilters(filters map[string]interface{}) { +func (s *SearchResourcesRequest) SetFilters(filters map[string]any) { s.Filters = filters s.require(searchResourcesRequestFieldFilters) } diff --git a/seed/go-sdk/client-side-params/service_test.go b/seed/go-sdk/client-side-params/service_test.go index 0e91189362b3..c294d13417d1 100644 --- a/seed/go-sdk/client-side-params/service_test.go +++ b/seed/go-sdk/client-side-params/service_test.go @@ -1371,7 +1371,7 @@ func TestSettersSearchResourcesRequest(t *testing.T) { t.Run("SetFilters", func(t *testing.T) { obj := &SearchResourcesRequest{} - var fernTestValueFilters map[string]interface{} + var fernTestValueFilters map[string]any obj.SetFilters(fernTestValueFilters) assert.Equal(t, fernTestValueFilters, obj.Filters) assert.NotNil(t, obj.explicitFields) @@ -1477,7 +1477,7 @@ func TestSettersMarkExplicitSearchResourcesRequest(t *testing.T) { t.Parallel() // Arrange obj := &SearchResourcesRequest{} - var fernTestValueFilters map[string]interface{} + var fernTestValueFilters map[string]any // Act obj.SetFilters(fernTestValueFilters) diff --git a/seed/go-sdk/client-side-params/snippet.json b/seed/go-sdk/client-side-params/snippet.json index 0721838134a3..c84476836f77 100644 --- a/seed/go-sdk/client-side-params/snippet.json +++ b/seed/go-sdk/client-side-params/snippet.json @@ -63,7 +63,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.SearchResources(\n\tcontext.TODO(),\n\t\u0026fern.SearchResourcesRequest{\n\t\tLimit: 1,\n\t\tOffset: 1,\n\t\tQuery: fern.String(\n\t\t\t\"query\",\n\t\t),\n\t\tFilters: map[string]interface{}{\n\t\t\t\"filters\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.SearchResources(\n\tcontext.TODO(),\n\t\u0026fern.SearchResourcesRequest{\n\t\tLimit: 1,\n\t\tOffset: 1,\n\t\tQuery: fern.String(\n\t\t\t\"query\",\n\t\t),\n\t\tFilters: map[string]any{\n\t\t\t\"filters\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" } }, { @@ -96,7 +96,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.CreateUser(\n\tcontext.TODO(),\n\t\u0026fern.CreateUserRequest{\n\t\tEmail: \"email\",\n\t\tEmailVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUsername: fern.String(\n\t\t\t\"username\",\n\t\t),\n\t\tPassword: fern.String(\n\t\t\t\"password\",\n\t\t),\n\t\tPhoneNumber: fern.String(\n\t\t\t\"phone_number\",\n\t\t),\n\t\tPhoneVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUserMetadata: map[string]interface{}{\n\t\t\t\"user_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tAppMetadata: map[string]interface{}{\n\t\t\t\"app_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tConnection: \"connection\",\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.CreateUser(\n\tcontext.TODO(),\n\t\u0026fern.CreateUserRequest{\n\t\tEmail: \"email\",\n\t\tEmailVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUsername: fern.String(\n\t\t\t\"username\",\n\t\t),\n\t\tPassword: fern.String(\n\t\t\t\"password\",\n\t\t),\n\t\tPhoneNumber: fern.String(\n\t\t\t\"phone_number\",\n\t\t),\n\t\tPhoneVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUserMetadata: map[string]any{\n\t\t\t\"user_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tAppMetadata: map[string]any{\n\t\t\t\"app_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tConnection: \"connection\",\n\t},\n)\n" } }, { @@ -129,7 +129,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.UpdateUser(\n\tcontext.TODO(),\n\t\"userId\",\n\t\u0026fern.UpdateUserRequest{\n\t\tEmail: fern.String(\n\t\t\t\"email\",\n\t\t),\n\t\tEmailVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUsername: fern.String(\n\t\t\t\"username\",\n\t\t),\n\t\tPhoneNumber: fern.String(\n\t\t\t\"phone_number\",\n\t\t),\n\t\tPhoneVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUserMetadata: map[string]interface{}{\n\t\t\t\"user_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tAppMetadata: map[string]interface{}{\n\t\t\t\"app_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tPassword: fern.String(\n\t\t\t\"password\",\n\t\t),\n\t\tBlocked: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/client-side-params/fern\"\n\tfernclient \"github.com/client-side-params/fern/client\"\n\toption \"github.com/client-side-params/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Service.UpdateUser(\n\tcontext.TODO(),\n\t\"userId\",\n\t\u0026fern.UpdateUserRequest{\n\t\tEmail: fern.String(\n\t\t\t\"email\",\n\t\t),\n\t\tEmailVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUsername: fern.String(\n\t\t\t\"username\",\n\t\t),\n\t\tPhoneNumber: fern.String(\n\t\t\t\"phone_number\",\n\t\t),\n\t\tPhoneVerified: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tUserMetadata: map[string]any{\n\t\t\t\"user_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tAppMetadata: map[string]any{\n\t\t\t\"app_metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tPassword: fern.String(\n\t\t\t\"password\",\n\t\t),\n\t\tBlocked: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t},\n)\n" } } ] diff --git a/seed/go-sdk/client-side-params/types.go b/seed/go-sdk/client-side-params/types.go index e6d2a0a0f83e..8325f5189dc3 100644 --- a/seed/go-sdk/client-side-params/types.go +++ b/seed/go-sdk/client-side-params/types.go @@ -74,11 +74,11 @@ type Client struct { // Allowed grant types GrantTypes []string `json:"grant_types,omitempty" url:"grant_types,omitempty"` // JWT configuration for the client - JwtConfiguration map[string]interface{} `json:"jwt_configuration,omitempty" url:"jwt_configuration,omitempty"` + JwtConfiguration map[string]any `json:"jwt_configuration,omitempty" url:"jwt_configuration,omitempty"` // Client signing keys - SigningKeys []map[string]interface{} `json:"signing_keys,omitempty" url:"signing_keys,omitempty"` + SigningKeys []map[string]any `json:"signing_keys,omitempty" url:"signing_keys,omitempty"` // Encryption key - EncryptionKey map[string]interface{} `json:"encryption_key,omitempty" url:"encryption_key,omitempty"` + EncryptionKey map[string]any `json:"encryption_key,omitempty" url:"encryption_key,omitempty"` // Whether SSO is enabled Sso *bool `json:"sso,omitempty" url:"sso,omitempty"` // Whether SSO is disabled @@ -98,13 +98,13 @@ type Client struct { // Whether this is a Heroku application IsHerokuApp *bool `json:"is_heroku_app,omitempty" url:"is_heroku_app,omitempty"` // Addons enabled for this client - Addons map[string]interface{} `json:"addons,omitempty" url:"addons,omitempty"` + Addons map[string]any `json:"addons,omitempty" url:"addons,omitempty"` // Requested authentication method for the token endpoint TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty" url:"token_endpoint_auth_method,omitempty"` // Metadata associated with the client - ClientMetadata map[string]interface{} `json:"client_metadata,omitempty" url:"client_metadata,omitempty"` + ClientMetadata map[string]any `json:"client_metadata,omitempty" url:"client_metadata,omitempty"` // Mobile app settings - Mobile map[string]interface{} `json:"mobile,omitempty" url:"mobile,omitempty"` + Mobile map[string]any `json:"mobile,omitempty" url:"mobile,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -211,21 +211,21 @@ func (c *Client) GetGrantTypes() []string { return c.GrantTypes } -func (c *Client) GetJwtConfiguration() map[string]interface{} { +func (c *Client) GetJwtConfiguration() map[string]any { if c == nil { return nil } return c.JwtConfiguration } -func (c *Client) GetSigningKeys() []map[string]interface{} { +func (c *Client) GetSigningKeys() []map[string]any { if c == nil { return nil } return c.SigningKeys } -func (c *Client) GetEncryptionKey() map[string]interface{} { +func (c *Client) GetEncryptionKey() map[string]any { if c == nil { return nil } @@ -295,7 +295,7 @@ func (c *Client) GetIsHerokuApp() *bool { return c.IsHerokuApp } -func (c *Client) GetAddons() map[string]interface{} { +func (c *Client) GetAddons() map[string]any { if c == nil { return nil } @@ -309,14 +309,14 @@ func (c *Client) GetTokenEndpointAuthMethod() *string { return c.TokenEndpointAuthMethod } -func (c *Client) GetClientMetadata() map[string]interface{} { +func (c *Client) GetClientMetadata() map[string]any { if c == nil { return nil } return c.ClientMetadata } -func (c *Client) GetMobile() map[string]interface{} { +func (c *Client) GetMobile() map[string]any { if c == nil { return nil } @@ -437,21 +437,21 @@ func (c *Client) SetGrantTypes(grantTypes []string) { // SetJwtConfiguration sets the JwtConfiguration field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetJwtConfiguration(jwtConfiguration map[string]interface{}) { +func (c *Client) SetJwtConfiguration(jwtConfiguration map[string]any) { c.JwtConfiguration = jwtConfiguration c.require(clientFieldJwtConfiguration) } // SetSigningKeys sets the SigningKeys field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetSigningKeys(signingKeys []map[string]interface{}) { +func (c *Client) SetSigningKeys(signingKeys []map[string]any) { c.SigningKeys = signingKeys c.require(clientFieldSigningKeys) } // SetEncryptionKey sets the EncryptionKey field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetEncryptionKey(encryptionKey map[string]interface{}) { +func (c *Client) SetEncryptionKey(encryptionKey map[string]any) { c.EncryptionKey = encryptionKey c.require(clientFieldEncryptionKey) } @@ -521,7 +521,7 @@ func (c *Client) SetIsHerokuApp(isHerokuApp *bool) { // SetAddons sets the Addons field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetAddons(addons map[string]interface{}) { +func (c *Client) SetAddons(addons map[string]any) { c.Addons = addons c.require(clientFieldAddons) } @@ -535,14 +535,14 @@ func (c *Client) SetTokenEndpointAuthMethod(tokenEndpointAuthMethod *string) { // SetClientMetadata sets the ClientMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetClientMetadata(clientMetadata map[string]interface{}) { +func (c *Client) SetClientMetadata(clientMetadata map[string]any) { c.ClientMetadata = clientMetadata c.require(clientFieldClientMetadata) } // SetMobile sets the Mobile field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Client) SetMobile(mobile map[string]interface{}) { +func (c *Client) SetMobile(mobile map[string]any) { c.Mobile = mobile c.require(clientFieldMobile) } @@ -612,7 +612,7 @@ type Connection struct { // The identity provider identifier (auth0, google-oauth2, facebook, etc.) Strategy string `json:"strategy" url:"strategy"` // Connection-specific configuration options - Options map[string]interface{} `json:"options,omitempty" url:"options,omitempty"` + Options map[string]any `json:"options,omitempty" url:"options,omitempty"` // List of client IDs that can use this connection EnabledClients []string `json:"enabled_clients,omitempty" url:"enabled_clients,omitempty"` // Applicable realms for enterprise connections @@ -620,7 +620,7 @@ type Connection struct { // Whether this is a domain connection IsDomainConnection *bool `json:"is_domain_connection,omitempty" url:"is_domain_connection,omitempty"` // Additional metadata - Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"` + Metadata map[string]any `json:"metadata,omitempty" url:"metadata,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -657,7 +657,7 @@ func (c *Connection) GetStrategy() string { return c.Strategy } -func (c *Connection) GetOptions() map[string]interface{} { +func (c *Connection) GetOptions() map[string]any { if c == nil { return nil } @@ -685,7 +685,7 @@ func (c *Connection) GetIsDomainConnection() *bool { return c.IsDomainConnection } -func (c *Connection) GetMetadata() map[string]interface{} { +func (c *Connection) GetMetadata() map[string]any { if c == nil { return nil } @@ -736,7 +736,7 @@ func (c *Connection) SetStrategy(strategy string) { // SetOptions sets the Options field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Connection) SetOptions(options map[string]interface{}) { +func (c *Connection) SetOptions(options map[string]any) { c.Options = options c.require(connectionFieldOptions) } @@ -764,7 +764,7 @@ func (c *Connection) SetIsDomainConnection(isDomainConnection *bool) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *Connection) SetMetadata(metadata map[string]interface{}) { +func (c *Connection) SetMetadata(metadata map[string]any) { c.Metadata = metadata c.require(connectionFieldMetadata) } @@ -824,15 +824,15 @@ var ( ) type CreateUserRequest struct { - Email string `json:"email" url:"email"` - EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"` - Username *string `json:"username,omitempty" url:"username,omitempty"` - Password *string `json:"password,omitempty" url:"password,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` - PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` - UserMetadata map[string]interface{} `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` - AppMetadata map[string]interface{} `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` - Connection string `json:"connection" url:"connection"` + Email string `json:"email" url:"email"` + EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"` + Username *string `json:"username,omitempty" url:"username,omitempty"` + Password *string `json:"password,omitempty" url:"password,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` + UserMetadata map[string]any `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` + AppMetadata map[string]any `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` + Connection string `json:"connection" url:"connection"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -883,14 +883,14 @@ func (c *CreateUserRequest) GetPhoneVerified() *bool { return c.PhoneVerified } -func (c *CreateUserRequest) GetUserMetadata() map[string]interface{} { +func (c *CreateUserRequest) GetUserMetadata() map[string]any { if c == nil { return nil } return c.UserMetadata } -func (c *CreateUserRequest) GetAppMetadata() map[string]interface{} { +func (c *CreateUserRequest) GetAppMetadata() map[string]any { if c == nil { return nil } @@ -962,14 +962,14 @@ func (c *CreateUserRequest) SetPhoneVerified(phoneVerified *bool) { // SetUserMetadata sets the UserMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *CreateUserRequest) SetUserMetadata(userMetadata map[string]interface{}) { +func (c *CreateUserRequest) SetUserMetadata(userMetadata map[string]any) { c.UserMetadata = userMetadata c.require(createUserRequestFieldUserMetadata) } // SetAppMetadata sets the AppMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (c *CreateUserRequest) SetAppMetadata(appMetadata map[string]interface{}) { +func (c *CreateUserRequest) SetAppMetadata(appMetadata map[string]any) { c.AppMetadata = appMetadata c.require(createUserRequestFieldAppMetadata) } @@ -1500,12 +1500,12 @@ var ( ) type Resource struct { - Id string `json:"id" url:"id"` - Name string `json:"name" url:"name"` - Description *string `json:"description,omitempty" url:"description,omitempty"` - CreatedAt time.Time `json:"created_at" url:"created_at"` - UpdatedAt time.Time `json:"updated_at" url:"updated_at"` - Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"` + Id string `json:"id" url:"id"` + Name string `json:"name" url:"name"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + CreatedAt time.Time `json:"created_at" url:"created_at"` + UpdatedAt time.Time `json:"updated_at" url:"updated_at"` + Metadata map[string]any `json:"metadata,omitempty" url:"metadata,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1549,7 +1549,7 @@ func (r *Resource) GetUpdatedAt() time.Time { return r.UpdatedAt } -func (r *Resource) GetMetadata() map[string]interface{} { +func (r *Resource) GetMetadata() map[string]any { if r == nil { return nil } @@ -1607,7 +1607,7 @@ func (r *Resource) SetUpdatedAt(updatedAt time.Time) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Resource) SetMetadata(metadata map[string]interface{}) { +func (r *Resource) SetMetadata(metadata map[string]any) { r.Metadata = metadata r.require(resourceFieldMetadata) } @@ -1795,15 +1795,15 @@ var ( ) type UpdateUserRequest struct { - Email *string `json:"email,omitempty" url:"email,omitempty"` - EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"` - Username *string `json:"username,omitempty" url:"username,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` - PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` - UserMetadata map[string]interface{} `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` - AppMetadata map[string]interface{} `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` - Password *string `json:"password,omitempty" url:"password,omitempty"` - Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"` + Email *string `json:"email,omitempty" url:"email,omitempty"` + EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"` + Username *string `json:"username,omitempty" url:"username,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` + UserMetadata map[string]any `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` + AppMetadata map[string]any `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` + Password *string `json:"password,omitempty" url:"password,omitempty"` + Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1847,14 +1847,14 @@ func (u *UpdateUserRequest) GetPhoneVerified() *bool { return u.PhoneVerified } -func (u *UpdateUserRequest) GetUserMetadata() map[string]interface{} { +func (u *UpdateUserRequest) GetUserMetadata() map[string]any { if u == nil { return nil } return u.UserMetadata } -func (u *UpdateUserRequest) GetAppMetadata() map[string]interface{} { +func (u *UpdateUserRequest) GetAppMetadata() map[string]any { if u == nil { return nil } @@ -1926,14 +1926,14 @@ func (u *UpdateUserRequest) SetPhoneVerified(phoneVerified *bool) { // SetUserMetadata sets the UserMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (u *UpdateUserRequest) SetUserMetadata(userMetadata map[string]interface{}) { +func (u *UpdateUserRequest) SetUserMetadata(userMetadata map[string]any) { u.UserMetadata = userMetadata u.require(updateUserRequestFieldUserMetadata) } // SetAppMetadata sets the AppMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (u *UpdateUserRequest) SetAppMetadata(appMetadata map[string]interface{}) { +func (u *UpdateUserRequest) SetAppMetadata(appMetadata map[string]any) { u.AppMetadata = appMetadata u.require(updateUserRequestFieldAppMetadata) } @@ -2020,27 +2020,27 @@ var ( ) type User struct { - UserId string `json:"user_id" url:"user_id"` - Email string `json:"email" url:"email"` - EmailVerified bool `json:"email_verified" url:"email_verified"` - Username *string `json:"username,omitempty" url:"username,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` - PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` - CreatedAt time.Time `json:"created_at" url:"created_at"` - UpdatedAt time.Time `json:"updated_at" url:"updated_at"` - Identities []*Identity `json:"identities,omitempty" url:"identities,omitempty"` - AppMetadata map[string]interface{} `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` - UserMetadata map[string]interface{} `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` - Picture *string `json:"picture,omitempty" url:"picture,omitempty"` - Name *string `json:"name,omitempty" url:"name,omitempty"` - Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"` - Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"` - LastIp *string `json:"last_ip,omitempty" url:"last_ip,omitempty"` - LastLogin *time.Time `json:"last_login,omitempty" url:"last_login,omitempty"` - LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"` - Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"` - GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"` - FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"` + UserId string `json:"user_id" url:"user_id"` + Email string `json:"email" url:"email"` + EmailVerified bool `json:"email_verified" url:"email_verified"` + Username *string `json:"username,omitempty" url:"username,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + PhoneVerified *bool `json:"phone_verified,omitempty" url:"phone_verified,omitempty"` + CreatedAt time.Time `json:"created_at" url:"created_at"` + UpdatedAt time.Time `json:"updated_at" url:"updated_at"` + Identities []*Identity `json:"identities,omitempty" url:"identities,omitempty"` + AppMetadata map[string]any `json:"app_metadata,omitempty" url:"app_metadata,omitempty"` + UserMetadata map[string]any `json:"user_metadata,omitempty" url:"user_metadata,omitempty"` + Picture *string `json:"picture,omitempty" url:"picture,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` + Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"` + Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"` + LastIp *string `json:"last_ip,omitempty" url:"last_ip,omitempty"` + LastLogin *time.Time `json:"last_login,omitempty" url:"last_login,omitempty"` + LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"` + Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"` + GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"` + FamilyName *string `json:"family_name,omitempty" url:"family_name,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2112,14 +2112,14 @@ func (u *User) GetIdentities() []*Identity { return u.Identities } -func (u *User) GetAppMetadata() map[string]interface{} { +func (u *User) GetAppMetadata() map[string]any { if u == nil { return nil } return u.AppMetadata } -func (u *User) GetUserMetadata() map[string]interface{} { +func (u *User) GetUserMetadata() map[string]any { if u == nil { return nil } @@ -2275,14 +2275,14 @@ func (u *User) SetIdentities(identities []*Identity) { // SetAppMetadata sets the AppMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (u *User) SetAppMetadata(appMetadata map[string]interface{}) { +func (u *User) SetAppMetadata(appMetadata map[string]any) { u.AppMetadata = appMetadata u.require(userFieldAppMetadata) } // SetUserMetadata sets the UserMetadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (u *User) SetUserMetadata(userMetadata map[string]interface{}) { +func (u *User) SetUserMetadata(userMetadata map[string]any) { u.UserMetadata = userMetadata u.require(userFieldUserMetadata) } diff --git a/seed/go-sdk/client-side-params/types_test.go b/seed/go-sdk/client-side-params/types_test.go index 8776d226cb4e..96318f5a3898 100644 --- a/seed/go-sdk/client-side-params/types_test.go +++ b/seed/go-sdk/client-side-params/types_test.go @@ -125,7 +125,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetJwtConfiguration", func(t *testing.T) { obj := &Client{} - var fernTestValueJwtConfiguration map[string]interface{} + var fernTestValueJwtConfiguration map[string]any obj.SetJwtConfiguration(fernTestValueJwtConfiguration) assert.Equal(t, fernTestValueJwtConfiguration, obj.JwtConfiguration) assert.NotNil(t, obj.explicitFields) @@ -133,7 +133,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetSigningKeys", func(t *testing.T) { obj := &Client{} - var fernTestValueSigningKeys []map[string]interface{} + var fernTestValueSigningKeys []map[string]any obj.SetSigningKeys(fernTestValueSigningKeys) assert.Equal(t, fernTestValueSigningKeys, obj.SigningKeys) assert.NotNil(t, obj.explicitFields) @@ -141,7 +141,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetEncryptionKey", func(t *testing.T) { obj := &Client{} - var fernTestValueEncryptionKey map[string]interface{} + var fernTestValueEncryptionKey map[string]any obj.SetEncryptionKey(fernTestValueEncryptionKey) assert.Equal(t, fernTestValueEncryptionKey, obj.EncryptionKey) assert.NotNil(t, obj.explicitFields) @@ -221,7 +221,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetAddons", func(t *testing.T) { obj := &Client{} - var fernTestValueAddons map[string]interface{} + var fernTestValueAddons map[string]any obj.SetAddons(fernTestValueAddons) assert.Equal(t, fernTestValueAddons, obj.Addons) assert.NotNil(t, obj.explicitFields) @@ -237,7 +237,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetClientMetadata", func(t *testing.T) { obj := &Client{} - var fernTestValueClientMetadata map[string]interface{} + var fernTestValueClientMetadata map[string]any obj.SetClientMetadata(fernTestValueClientMetadata) assert.Equal(t, fernTestValueClientMetadata, obj.ClientMetadata) assert.NotNil(t, obj.explicitFields) @@ -245,7 +245,7 @@ func TestSettersClient(t *testing.T) { t.Run("SetMobile", func(t *testing.T) { obj := &Client{} - var fernTestValueMobile map[string]interface{} + var fernTestValueMobile map[string]any obj.SetMobile(fernTestValueMobile) assert.Equal(t, fernTestValueMobile, obj.Mobile) assert.NotNil(t, obj.explicitFields) @@ -700,7 +700,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected map[string]interface{} + var expected map[string]any obj.JwtConfiguration = expected // Act & Assert @@ -733,7 +733,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected []map[string]interface{} + var expected []map[string]any obj.SigningKeys = expected // Act & Assert @@ -766,7 +766,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected map[string]interface{} + var expected map[string]any obj.EncryptionKey = expected // Act & Assert @@ -1096,7 +1096,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected map[string]interface{} + var expected map[string]any obj.Addons = expected // Act & Assert @@ -1162,7 +1162,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected map[string]interface{} + var expected map[string]any obj.ClientMetadata = expected // Act & Assert @@ -1195,7 +1195,7 @@ func TestGettersClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var expected map[string]interface{} + var expected map[string]any obj.Mobile = expected // Act & Assert @@ -1665,7 +1665,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueJwtConfiguration map[string]interface{} + var fernTestValueJwtConfiguration map[string]any // Act obj.SetJwtConfiguration(fernTestValueJwtConfiguration) @@ -1696,7 +1696,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueSigningKeys []map[string]interface{} + var fernTestValueSigningKeys []map[string]any // Act obj.SetSigningKeys(fernTestValueSigningKeys) @@ -1727,7 +1727,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueEncryptionKey map[string]interface{} + var fernTestValueEncryptionKey map[string]any // Act obj.SetEncryptionKey(fernTestValueEncryptionKey) @@ -2037,7 +2037,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueAddons map[string]interface{} + var fernTestValueAddons map[string]any // Act obj.SetAddons(fernTestValueAddons) @@ -2099,7 +2099,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueClientMetadata map[string]interface{} + var fernTestValueClientMetadata map[string]any // Act obj.SetClientMetadata(fernTestValueClientMetadata) @@ -2130,7 +2130,7 @@ func TestSettersMarkExplicitClient(t *testing.T) { t.Parallel() // Arrange obj := &Client{} - var fernTestValueMobile map[string]interface{} + var fernTestValueMobile map[string]any // Act obj.SetMobile(fernTestValueMobile) @@ -2194,7 +2194,7 @@ func TestSettersConnection(t *testing.T) { t.Run("SetOptions", func(t *testing.T) { obj := &Connection{} - var fernTestValueOptions map[string]interface{} + var fernTestValueOptions map[string]any obj.SetOptions(fernTestValueOptions) assert.Equal(t, fernTestValueOptions, obj.Options) assert.NotNil(t, obj.explicitFields) @@ -2226,7 +2226,7 @@ func TestSettersConnection(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Connection{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2341,7 +2341,7 @@ func TestGettersConnection(t *testing.T) { t.Parallel() // Arrange obj := &Connection{} - var expected map[string]interface{} + var expected map[string]any obj.Options = expected // Act & Assert @@ -2473,7 +2473,7 @@ func TestGettersConnection(t *testing.T) { t.Parallel() // Arrange obj := &Connection{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2633,7 +2633,7 @@ func TestSettersMarkExplicitConnection(t *testing.T) { t.Parallel() // Arrange obj := &Connection{} - var fernTestValueOptions map[string]interface{} + var fernTestValueOptions map[string]any // Act obj.SetOptions(fernTestValueOptions) @@ -2757,7 +2757,7 @@ func TestSettersMarkExplicitConnection(t *testing.T) { t.Parallel() // Arrange obj := &Connection{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -2837,7 +2837,7 @@ func TestSettersCreateUserRequest(t *testing.T) { t.Run("SetUserMetadata", func(t *testing.T) { obj := &CreateUserRequest{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any obj.SetUserMetadata(fernTestValueUserMetadata) assert.Equal(t, fernTestValueUserMetadata, obj.UserMetadata) assert.NotNil(t, obj.explicitFields) @@ -2845,7 +2845,7 @@ func TestSettersCreateUserRequest(t *testing.T) { t.Run("SetAppMetadata", func(t *testing.T) { obj := &CreateUserRequest{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any obj.SetAppMetadata(fernTestValueAppMetadata) assert.Equal(t, fernTestValueAppMetadata, obj.AppMetadata) assert.NotNil(t, obj.explicitFields) @@ -3054,7 +3054,7 @@ func TestGettersCreateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &CreateUserRequest{} - var expected map[string]interface{} + var expected map[string]any obj.UserMetadata = expected // Act & Assert @@ -3087,7 +3087,7 @@ func TestGettersCreateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &CreateUserRequest{} - var expected map[string]interface{} + var expected map[string]any obj.AppMetadata = expected // Act & Assert @@ -3332,7 +3332,7 @@ func TestSettersMarkExplicitCreateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &CreateUserRequest{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any // Act obj.SetUserMetadata(fernTestValueUserMetadata) @@ -3363,7 +3363,7 @@ func TestSettersMarkExplicitCreateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &CreateUserRequest{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any // Act obj.SetAppMetadata(fernTestValueAppMetadata) @@ -4545,7 +4545,7 @@ func TestSettersResource(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Resource{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -4683,7 +4683,7 @@ func TestGettersResource(t *testing.T) { t.Parallel() // Arrange obj := &Resource{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4874,7 +4874,7 @@ func TestSettersMarkExplicitResource(t *testing.T) { t.Parallel() // Arrange obj := &Resource{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -5171,7 +5171,7 @@ func TestSettersUpdateUserRequest(t *testing.T) { t.Run("SetUserMetadata", func(t *testing.T) { obj := &UpdateUserRequest{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any obj.SetUserMetadata(fernTestValueUserMetadata) assert.Equal(t, fernTestValueUserMetadata, obj.UserMetadata) assert.NotNil(t, obj.explicitFields) @@ -5179,7 +5179,7 @@ func TestSettersUpdateUserRequest(t *testing.T) { t.Run("SetAppMetadata", func(t *testing.T) { obj := &UpdateUserRequest{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any obj.SetAppMetadata(fernTestValueAppMetadata) assert.Equal(t, fernTestValueAppMetadata, obj.AppMetadata) assert.NotNil(t, obj.explicitFields) @@ -5373,7 +5373,7 @@ func TestGettersUpdateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &UpdateUserRequest{} - var expected map[string]interface{} + var expected map[string]any obj.UserMetadata = expected // Act & Assert @@ -5406,7 +5406,7 @@ func TestGettersUpdateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &UpdateUserRequest{} - var expected map[string]interface{} + var expected map[string]any obj.AppMetadata = expected // Act & Assert @@ -5663,7 +5663,7 @@ func TestSettersMarkExplicitUpdateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &UpdateUserRequest{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any // Act obj.SetUserMetadata(fernTestValueUserMetadata) @@ -5694,7 +5694,7 @@ func TestSettersMarkExplicitUpdateUserRequest(t *testing.T) { t.Parallel() // Arrange obj := &UpdateUserRequest{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any // Act obj.SetAppMetadata(fernTestValueAppMetadata) @@ -5860,7 +5860,7 @@ func TestSettersUser(t *testing.T) { t.Run("SetAppMetadata", func(t *testing.T) { obj := &User{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any obj.SetAppMetadata(fernTestValueAppMetadata) assert.Equal(t, fernTestValueAppMetadata, obj.AppMetadata) assert.NotNil(t, obj.explicitFields) @@ -5868,7 +5868,7 @@ func TestSettersUser(t *testing.T) { t.Run("SetUserMetadata", func(t *testing.T) { obj := &User{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any obj.SetUserMetadata(fernTestValueUserMetadata) assert.Equal(t, fernTestValueUserMetadata, obj.UserMetadata) assert.NotNil(t, obj.explicitFields) @@ -6208,7 +6208,7 @@ func TestGettersUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var expected map[string]interface{} + var expected map[string]any obj.AppMetadata = expected // Act & Assert @@ -6241,7 +6241,7 @@ func TestGettersUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var expected map[string]interface{} + var expected map[string]any obj.UserMetadata = expected // Act & Assert @@ -6886,7 +6886,7 @@ func TestSettersMarkExplicitUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var fernTestValueAppMetadata map[string]interface{} + var fernTestValueAppMetadata map[string]any // Act obj.SetAppMetadata(fernTestValueAppMetadata) @@ -6917,7 +6917,7 @@ func TestSettersMarkExplicitUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var fernTestValueUserMetadata map[string]interface{} + var fernTestValueUserMetadata map[string]any // Act obj.SetUserMetadata(fernTestValueUserMetadata) diff --git a/seed/go-sdk/content-type/service.go b/seed/go-sdk/content-type/service.go index a152eb8e20f3..ad515feeb69f 100644 --- a/seed/go-sdk/content-type/service.go +++ b/seed/go-sdk/content-type/service.go @@ -223,16 +223,16 @@ var ( ) type PatchComplexRequest struct { - Name *string `json:"name,omitempty" url:"-"` - Age *int `json:"age,omitempty" url:"-"` - Active *bool `json:"active,omitempty" url:"-"` - Metadata map[string]interface{} `json:"metadata,omitempty" url:"-"` - Tags []string `json:"tags,omitempty" url:"-"` - Email *string `json:"email,omitempty" url:"-"` - Nickname *string `json:"nickname,omitempty" url:"-"` - Bio *string `json:"bio,omitempty" url:"-"` - ProfileImageUrl *string `json:"profileImageUrl,omitempty" url:"-"` - Settings map[string]interface{} `json:"settings,omitempty" url:"-"` + Name *string `json:"name,omitempty" url:"-"` + Age *int `json:"age,omitempty" url:"-"` + Active *bool `json:"active,omitempty" url:"-"` + Metadata map[string]any `json:"metadata,omitempty" url:"-"` + Tags []string `json:"tags,omitempty" url:"-"` + Email *string `json:"email,omitempty" url:"-"` + Nickname *string `json:"nickname,omitempty" url:"-"` + Bio *string `json:"bio,omitempty" url:"-"` + ProfileImageUrl *string `json:"profileImageUrl,omitempty" url:"-"` + Settings map[string]any `json:"settings,omitempty" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -268,7 +268,7 @@ func (p *PatchComplexRequest) SetActive(active *bool) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (p *PatchComplexRequest) SetMetadata(metadata map[string]interface{}) { +func (p *PatchComplexRequest) SetMetadata(metadata map[string]any) { p.Metadata = metadata p.require(patchComplexRequestFieldMetadata) } @@ -310,7 +310,7 @@ func (p *PatchComplexRequest) SetProfileImageUrl(profileImageUrl *string) { // SetSettings sets the Settings field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (p *PatchComplexRequest) SetSettings(settings map[string]interface{}) { +func (p *PatchComplexRequest) SetSettings(settings map[string]any) { p.Settings = settings p.require(patchComplexRequestFieldSettings) } diff --git a/seed/go-sdk/content-type/service_test.go b/seed/go-sdk/content-type/service_test.go index 0a28f16ae216..3682474d7342 100644 --- a/seed/go-sdk/content-type/service_test.go +++ b/seed/go-sdk/content-type/service_test.go @@ -444,7 +444,7 @@ func TestSettersPatchComplexRequest(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &PatchComplexRequest{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -492,7 +492,7 @@ func TestSettersPatchComplexRequest(t *testing.T) { t.Run("SetSettings", func(t *testing.T) { obj := &PatchComplexRequest{} - var fernTestValueSettings map[string]interface{} + var fernTestValueSettings map[string]any obj.SetSettings(fernTestValueSettings) assert.Equal(t, fernTestValueSettings, obj.Settings) assert.NotNil(t, obj.explicitFields) @@ -598,7 +598,7 @@ func TestSettersMarkExplicitPatchComplexRequest(t *testing.T) { t.Parallel() // Arrange obj := &PatchComplexRequest{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -784,7 +784,7 @@ func TestSettersMarkExplicitPatchComplexRequest(t *testing.T) { t.Parallel() // Arrange obj := &PatchComplexRequest{} - var fernTestValueSettings map[string]interface{} + var fernTestValueSettings map[string]any // Act obj.SetSettings(fernTestValueSettings) diff --git a/seed/go-sdk/content-type/snippet.json b/seed/go-sdk/content-type/snippet.json index 0f2393e736d9..382492c92e99 100644 --- a/seed/go-sdk/content-type/snippet.json +++ b/seed/go-sdk/content-type/snippet.json @@ -19,7 +19,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/content-type/fern\"\n\tfernclient \"github.com/content-type/fern/client\"\n)\n\nclient := fernclient.NewClient()\nerr := client.Service.PatchComplex(\n\tcontext.TODO(),\n\t\"id\",\n\t\u0026fern.PatchComplexRequest{\n\t\tName: fern.String(\n\t\t\t\"name\",\n\t\t),\n\t\tAge: fern.Int(\n\t\t\t1,\n\t\t),\n\t\tActive: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tTags: []string{\n\t\t\t\"tags\",\n\t\t\t\"tags\",\n\t\t},\n\t\tEmail: fern.String(\n\t\t\t\"email\",\n\t\t),\n\t\tNickname: fern.String(\n\t\t\t\"nickname\",\n\t\t),\n\t\tBio: fern.String(\n\t\t\t\"bio\",\n\t\t),\n\t\tProfileImageUrl: fern.String(\n\t\t\t\"profileImageUrl\",\n\t\t),\n\t\tSettings: map[string]interface{}{\n\t\t\t\"settings\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/content-type/fern\"\n\tfernclient \"github.com/content-type/fern/client\"\n)\n\nclient := fernclient.NewClient()\nerr := client.Service.PatchComplex(\n\tcontext.TODO(),\n\t\"id\",\n\t\u0026fern.PatchComplexRequest{\n\t\tName: fern.String(\n\t\t\t\"name\",\n\t\t),\n\t\tAge: fern.Int(\n\t\t\t1,\n\t\t),\n\t\tActive: fern.Bool(\n\t\t\ttrue,\n\t\t),\n\t\tMetadata: map[string]any{\n\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t\tTags: []string{\n\t\t\t\"tags\",\n\t\t\t\"tags\",\n\t\t},\n\t\tEmail: fern.String(\n\t\t\t\"email\",\n\t\t),\n\t\tNickname: fern.String(\n\t\t\t\"nickname\",\n\t\t),\n\t\tBio: fern.String(\n\t\t\t\"bio\",\n\t\t),\n\t\tProfileImageUrl: fern.String(\n\t\t\t\"profileImageUrl\",\n\t\t),\n\t\tSettings: map[string]any{\n\t\t\t\"settings\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/always-send-required-properties/snippet.json b/seed/go-sdk/examples/always-send-required-properties/snippet.json index 93752e205edd..9ae8c125b8c9 100644 --- a/seed/go-sdk/examples/always-send-required-properties/snippet.json +++ b/seed/go-sdk/examples/always-send-required-properties/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/always-send-required-properties/types.go b/seed/go-sdk/examples/always-send-required-properties/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/always-send-required-properties/types.go +++ b/seed/go-sdk/examples/always-send-required-properties/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/always-send-required-properties/types_test.go b/seed/go-sdk/examples/always-send-required-properties/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/always-send-required-properties/types_test.go +++ b/seed/go-sdk/examples/always-send-required-properties/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/client-name-with-custom-constructor-name/snippet.json b/seed/go-sdk/examples/client-name-with-custom-constructor-name/snippet.json index d7ebcac8c52d..b125550aebcf 100644 --- a/seed/go-sdk/examples/client-name-with-custom-constructor-name/snippet.json +++ b/seed/go-sdk/examples/client-name-with-custom-constructor-name/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/client-name-with-custom-constructor-name/types.go b/seed/go-sdk/examples/client-name-with-custom-constructor-name/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/client-name-with-custom-constructor-name/types.go +++ b/seed/go-sdk/examples/client-name-with-custom-constructor-name/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/client-name-with-custom-constructor-name/types_test.go b/seed/go-sdk/examples/client-name-with-custom-constructor-name/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/client-name-with-custom-constructor-name/types_test.go +++ b/seed/go-sdk/examples/client-name-with-custom-constructor-name/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/client-name/snippet.json b/seed/go-sdk/examples/client-name/snippet.json index 14a2167f92b7..21dc997cbf61 100644 --- a/seed/go-sdk/examples/client-name/snippet.json +++ b/seed/go-sdk/examples/client-name/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewAcme(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewAcme(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewAcme(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewAcme(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/client-name/types.go b/seed/go-sdk/examples/client-name/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/client-name/types.go +++ b/seed/go-sdk/examples/client-name/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/client-name/types_test.go b/seed/go-sdk/examples/client-name/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/client-name/types_test.go +++ b/seed/go-sdk/examples/client-name/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/export-all-requests-at-root/snippet.json b/seed/go-sdk/examples/export-all-requests-at-root/snippet.json index 93752e205edd..9ae8c125b8c9 100644 --- a/seed/go-sdk/examples/export-all-requests-at-root/snippet.json +++ b/seed/go-sdk/examples/export-all-requests-at-root/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/export-all-requests-at-root/types.go b/seed/go-sdk/examples/export-all-requests-at-root/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/export-all-requests-at-root/types.go +++ b/seed/go-sdk/examples/export-all-requests-at-root/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/export-all-requests-at-root/types_test.go b/seed/go-sdk/examples/export-all-requests-at-root/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/export-all-requests-at-root/types_test.go +++ b/seed/go-sdk/examples/export-all-requests-at-root/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/exported-client-name/snippet.json b/seed/go-sdk/examples/exported-client-name/snippet.json index cbc3bedd3879..85944e44968c 100644 --- a/seed/go-sdk/examples/exported-client-name/snippet.json +++ b/seed/go-sdk/examples/exported-client-name/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewAcmeClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewAcmeClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewAcmeClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewAcmeClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/exported-client-name/types.go b/seed/go-sdk/examples/exported-client-name/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/exported-client-name/types.go +++ b/seed/go-sdk/examples/exported-client-name/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/exported-client-name/types_test.go b/seed/go-sdk/examples/exported-client-name/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/exported-client-name/types_test.go +++ b/seed/go-sdk/examples/exported-client-name/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/getters-pass-by-value/snippet.json b/seed/go-sdk/examples/getters-pass-by-value/snippet.json index 93752e205edd..9ae8c125b8c9 100644 --- a/seed/go-sdk/examples/getters-pass-by-value/snippet.json +++ b/seed/go-sdk/examples/getters-pass-by-value/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/getters-pass-by-value/types.go b/seed/go-sdk/examples/getters-pass-by-value/types.go index b960a51b2ba9..460bd5832185 100644 --- a/seed/go-sdk/examples/getters-pass-by-value/types.go +++ b/seed/go-sdk/examples/getters-pass-by-value/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() string { return *e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() string { return *m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/getters-pass-by-value/types_test.go b/seed/go-sdk/examples/getters-pass-by-value/types_test.go index 79dbed280d5c..81e6a315cb47 100644 --- a/seed/go-sdk/examples/getters-pass-by-value/types_test.go +++ b/seed/go-sdk/examples/getters-pass-by-value/types_test.go @@ -2489,7 +2489,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2701,7 +2701,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -3010,7 +3010,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3697,7 +3697,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3901,7 +3901,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4177,7 +4177,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4526,7 +4526,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4539,7 +4539,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4565,7 +4565,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4597,7 +4597,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4618,7 +4618,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4677,7 +4677,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/no-custom-config/snippet.json b/seed/go-sdk/examples/no-custom-config/snippet.json index 93752e205edd..9ae8c125b8c9 100644 --- a/seed/go-sdk/examples/no-custom-config/snippet.json +++ b/seed/go-sdk/examples/no-custom-config/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/no-custom-config/types.go b/seed/go-sdk/examples/no-custom-config/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/no-custom-config/types.go +++ b/seed/go-sdk/examples/no-custom-config/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/no-custom-config/types_test.go b/seed/go-sdk/examples/no-custom-config/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/no-custom-config/types_test.go +++ b/seed/go-sdk/examples/no-custom-config/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/package-path/pleaseinhere/types.go b/seed/go-sdk/examples/package-path/pleaseinhere/types.go index ed981a11cd8e..3daa5fb7454d 100644 --- a/seed/go-sdk/examples/package-path/pleaseinhere/types.go +++ b/seed/go-sdk/examples/package-path/pleaseinhere/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/package-path/pleaseinhere/types_test.go b/seed/go-sdk/examples/package-path/pleaseinhere/types_test.go index ef95267f282b..459fe1abd354 100644 --- a/seed/go-sdk/examples/package-path/pleaseinhere/types_test.go +++ b/seed/go-sdk/examples/package-path/pleaseinhere/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/package-path/snippet.json b/seed/go-sdk/examples/package-path/snippet.json index dcf9fb01bd98..7f4cd730ee9d 100644 --- a/seed/go-sdk/examples/package-path/snippet.json +++ b/seed/go-sdk/examples/package-path/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/pleaseinhere/commons\"\n\tcontext \"context\"\n\toption \"github.com/examples/fern/pleaseinhere/option\"\n\tpleaseinhere \"github.com/examples/fern/pleaseinhere\"\n\tpleaseinhereclient \"github.com/examples/fern/pleaseinhere/client\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := pleaseinhereclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tpleaseinhere.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026pleaseinhere.BigEntity{\n\t\tCastMember: \u0026pleaseinhere.CastMember{\n\t\t\tActor: \u0026pleaseinhere.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026pleaseinhere.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: pleaseinhere.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: pleaseinhere.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026pleaseinhere.Entity{\n\t\t\tType: \u0026pleaseinhere.Type{\n\t\t\t\tBasicType: pleaseinhere.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026pleaseinhere.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: pleaseinhere.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: pleaseinhere.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026pleaseinhere.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: pleaseinhere.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026pleaseinhere.Exception{\n\t\t\tGeneric: \u0026pleaseinhere.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026pleaseinhere.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026pleaseinhere.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\u0026pleaseinhere.Tree{\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Tree{\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026pleaseinhere.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026pleaseinhere.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: pleaseinhere.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: pleaseinhere.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/pleaseinhere/commons\"\n\tcontext \"context\"\n\toption \"github.com/examples/fern/pleaseinhere/option\"\n\tpleaseinhere \"github.com/examples/fern/pleaseinhere\"\n\tpleaseinhereclient \"github.com/examples/fern/pleaseinhere/client\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := pleaseinhereclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tpleaseinhere.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026pleaseinhere.BigEntity{\n\t\tCastMember: \u0026pleaseinhere.CastMember{\n\t\t\tActor: \u0026pleaseinhere.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026pleaseinhere.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: pleaseinhere.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: pleaseinhere.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026pleaseinhere.Entity{\n\t\t\tType: \u0026pleaseinhere.Type{\n\t\t\t\tBasicType: pleaseinhere.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026pleaseinhere.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: pleaseinhere.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: pleaseinhere.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026pleaseinhere.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: pleaseinhere.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026pleaseinhere.Exception{\n\t\t\tGeneric: \u0026pleaseinhere.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026pleaseinhere.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026pleaseinhere.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t\t\u0026pleaseinhere.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*pleaseinhere.Tree{\n\t\t\t\t\u0026pleaseinhere.Tree{\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Tree{\n\t\t\t\t\tNodes: []*pleaseinhere.Node{\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026pleaseinhere.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*pleaseinhere.File{\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*pleaseinhere.Directory{\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026pleaseinhere.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026pleaseinhere.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: pleaseinhere.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: pleaseinhere.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\toption \"github.com/examples/fern/pleaseinhere/option\"\n\tpleaseinhere \"github.com/examples/fern/pleaseinhere\"\n\tpleaseinhereclient \"github.com/examples/fern/pleaseinhere/client\"\n)\n\nclient := pleaseinhereclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tpleaseinhere.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026pleaseinhere.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: pleaseinhere.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\toption \"github.com/examples/fern/pleaseinhere/option\"\n\tpleaseinhere \"github.com/examples/fern/pleaseinhere\"\n\tpleaseinhereclient \"github.com/examples/fern/pleaseinhere/client\"\n)\n\nclient := pleaseinhereclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tpleaseinhere.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026pleaseinhere.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: pleaseinhere.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/readme-config/snippet.json b/seed/go-sdk/examples/readme-config/snippet.json index d7ebcac8c52d..b125550aebcf 100644 --- a/seed/go-sdk/examples/readme-config/snippet.json +++ b/seed/go-sdk/examples/readme-config/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: \u0026fern.CastMember{\n\t\t\tActor: \u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t},\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: \u0026fern.Type{\n\t\t\t\tBasicType: fern.BasicTypePrimitive,\n\t\t\t},\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: \u0026fern.Metadata{\n\t\t\tHtml: \"metadata\",\n\t\t},\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: \u0026commons.EventInfo{\n\t\t\tMetadata: \u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\tData: \u0026commons.Data{\n\t\t\tFieldString: \"data\",\n\t\t},\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: \u0026fern.Exception{\n\t\t\tGeneric: \u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t},\n\t\tTest: \u0026fern.Test{\n\t\t\tAnd: true,\n\t\t},\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.New(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/readme-config/types.go b/seed/go-sdk/examples/readme-config/types.go index 753bd359f529..157834279f63 100644 --- a/seed/go-sdk/examples/readme-config/types.go +++ b/seed/go-sdk/examples/readme-config/types.go @@ -1455,12 +1455,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast" url:"cast"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast" url:"cast"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1519,7 +1519,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1609,7 +1609,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2217,11 +2217,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata" url:"metadata"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata" url:"metadata"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2280,7 +2280,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2363,7 +2363,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2635,7 +2635,7 @@ var ( ) type Request struct { - Request interface{} `json:"request" url:"request"` + Request any `json:"request" url:"request"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2644,7 +2644,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2667,7 +2667,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2720,7 +2720,7 @@ var ( ) type Response struct { - Response interface{} `json:"response" url:"response"` + Response any `json:"response" url:"response"` Identifiers []*Identifier `json:"identifiers" url:"identifiers"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2730,7 +2730,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2760,7 +2760,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/readme-config/types_test.go b/seed/go-sdk/examples/readme-config/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/readme-config/types_test.go +++ b/seed/go-sdk/examples/readme-config/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/examples/v0/snippet.json b/seed/go-sdk/examples/v0/snippet.json index 459abd8954cc..e2546d90f00b 100644 --- a/seed/go-sdk/examples/v0/snippet.json +++ b/seed/go-sdk/examples/v0/snippet.json @@ -30,7 +30,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: fern.NewCastMemberFromActor(\n\t\t\t\u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t),\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]interface{}{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: fern.NewTypeFromBasicType(\n\t\t\t\tfern.BasicTypePrimitive,\n\t\t\t),\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: fern.NewMetadataFromHtml(\n\t\t\t\"metadata\",\n\t\t),\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: commons.NewEventInfoFromMetadata(\n\t\t\t\u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t),\n\t\tData: commons.NewDataFromString(\n\t\t\t\"data\",\n\t\t),\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: fern.NewExceptionFromGeneric(\n\t\t\t\u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t),\n\t\tTest: fern.NewTestFromAnd(\n\t\t\ttrue,\n\t\t),\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcommons \"github.com/examples/fern/commons\"\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n\tuuid \"github.com/google/uuid\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateBigEntity(\n\tcontext.TODO(),\n\t\u0026fern.BigEntity{\n\t\tCastMember: fern.NewCastMemberFromActor(\n\t\t\t\u0026fern.Actor{\n\t\t\t\tName: \"name\",\n\t\t\t\tId: \"id\",\n\t\t\t},\n\t\t),\n\t\tExtendedMovie: \u0026fern.ExtendedMovie{\n\t\t\tCast: []string{\n\t\t\t\t\"cast\",\n\t\t\t\t\"cast\",\n\t\t\t},\n\t\t\tId: \"id\",\n\t\t\tPrequel: fern.String(\n\t\t\t\t\"prequel\",\n\t\t\t),\n\t\t\tTitle: \"title\",\n\t\t\tFrom: \"from\",\n\t\t\tRating: 1.1,\n\t\t\tTag: \"tag\",\n\t\t\tBook: fern.String(\n\t\t\t\t\"book\",\n\t\t\t),\n\t\t\tMetadata: map[string]any{\n\t\t\t\t\"metadata\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tRevenue: 1000000,\n\t\t},\n\t\tEntity: \u0026fern.Entity{\n\t\t\tType: fern.NewTypeFromBasicType(\n\t\t\t\tfern.BasicTypePrimitive,\n\t\t\t),\n\t\t\tName: \"name\",\n\t\t},\n\t\tMetadata: fern.NewMetadataFromHtml(\n\t\t\t\"metadata\",\n\t\t),\n\t\tCommonMetadata: \u0026commons.Metadata{\n\t\t\tId: \"id\",\n\t\t\tData: map[string]string{\n\t\t\t\t\"data\": \"data\",\n\t\t\t},\n\t\t\tJsonString: fern.String(\n\t\t\t\t\"jsonString\",\n\t\t\t),\n\t\t},\n\t\tEventInfo: commons.NewEventInfoFromMetadata(\n\t\t\t\u0026commons.Metadata{\n\t\t\t\tId: \"id\",\n\t\t\t\tData: map[string]string{\n\t\t\t\t\t\"data\": \"data\",\n\t\t\t\t},\n\t\t\t\tJsonString: fern.String(\n\t\t\t\t\t\"jsonString\",\n\t\t\t\t),\n\t\t\t},\n\t\t),\n\t\tData: commons.NewDataFromString(\n\t\t\t\"data\",\n\t\t),\n\t\tMigration: \u0026fern.Migration{\n\t\t\tName: \"name\",\n\t\t\tStatus: fern.MigrationStatusRunning,\n\t\t},\n\t\tException: fern.NewExceptionFromGeneric(\n\t\t\t\u0026fern.ExceptionInfo{\n\t\t\t\tExceptionType: \"exceptionType\",\n\t\t\t\tExceptionMessage: \"exceptionMessage\",\n\t\t\t\tExceptionStacktrace: \"exceptionStacktrace\",\n\t\t\t},\n\t\t),\n\t\tTest: fern.NewTestFromAnd(\n\t\t\ttrue,\n\t\t),\n\t\tNode: \u0026fern.Node{\n\t\t\tName: \"name\",\n\t\t\tNodes: []*fern.Node{\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Node{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t\t\u0026fern.Tree{},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTrees: []*fern.Tree{\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Tree{\n\t\t\t\t\tNodes: []*fern.Node{\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Node{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tDirectory: \u0026fern.Directory{\n\t\t\tName: \"name\",\n\t\t\tFiles: []*fern.File{\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t\t\u0026fern.File{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tContents: \"contents\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\tName: \"name\",\n\t\t\t\t\tFiles: []*fern.File{\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.File{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t\tContents: \"contents\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tDirectories: []*fern.Directory{\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026fern.Directory{\n\t\t\t\t\t\t\tName: \"name\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tMoment: \u0026fern.Moment{\n\t\t\tId: uuid.MustParse(\n\t\t\t\t\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n\t\t\t),\n\t\t\tDate: fern.MustParseDate(\n\t\t\t\t\"2023-01-15\",\n\t\t\t),\n\t\t\tDatetime: fern.MustParseDateTime(\n\t\t\t\t\"2024-01-15T09:30:00Z\",\n\t\t\t),\n\t\t},\n\t},\n)\n" } }, { @@ -85,7 +85,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]interface{}{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/examples/fern\"\n\tfernclient \"github.com/examples/fern/client\"\n\toption \"github.com/examples/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n\toption.WithBaseURL(\n\t\tfern.Environments.Production,\n\t),\n)\nresponse, err := client.Service.CreateMovie(\n\tcontext.TODO(),\n\t\u0026fern.Movie{\n\t\tId: \"movie-c06a4ad7\",\n\t\tPrequel: fern.String(\n\t\t\t\"movie-cv9b914f\",\n\t\t),\n\t\tTitle: \"The Boy and the Heron\",\n\t\tFrom: \"Hayao Miyazaki\",\n\t\tRating: 8,\n\t\tTag: \"tag-wf9as23d\",\n\t\tMetadata: map[string]any{\n\t\t\t\"actors\": []interface{}{\n\t\t\t\t\"Christian Bale\",\n\t\t\t\t\"Florence Pugh\",\n\t\t\t\t\"Willem Dafoe\",\n\t\t\t},\n\t\t\t\"releaseDate\": \"2023-12-08\",\n\t\t\t\"ratings\": map[string]interface{}{\n\t\t\t\t\"imdb\": 7.6,\n\t\t\t\t\"rottenTomatoes\": 97,\n\t\t\t},\n\t\t},\n\t\tRevenue: 1000000,\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/examples/v0/types.go b/seed/go-sdk/examples/v0/types.go index 16c807cd216b..fda01065facb 100644 --- a/seed/go-sdk/examples/v0/types.go +++ b/seed/go-sdk/examples/v0/types.go @@ -1485,12 +1485,12 @@ type ExtendedMovie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"` - Revenue int64 `json:"revenue" url:"revenue"` - Cast []string `json:"cast,omitempty" url:"cast,omitempty"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata,omitempty" url:"metadata,omitempty"` + Revenue int64 `json:"revenue" url:"revenue"` + Cast []string `json:"cast,omitempty" url:"cast,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -1549,7 +1549,7 @@ func (e *ExtendedMovie) GetBook() *string { return e.Book } -func (e *ExtendedMovie) GetMetadata() map[string]interface{} { +func (e *ExtendedMovie) GetMetadata() map[string]any { if e == nil { return nil } @@ -1639,7 +1639,7 @@ func (e *ExtendedMovie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (e *ExtendedMovie) SetMetadata(metadata map[string]interface{}) { +func (e *ExtendedMovie) SetMetadata(metadata map[string]any) { e.Metadata = metadata e.require(extendedMovieFieldMetadata) } @@ -2257,11 +2257,11 @@ type Movie struct { Title string `json:"title" url:"title"` From string `json:"from" url:"from"` // The rating scale is one to five stars - Rating float64 `json:"rating" url:"rating"` - Tag commons.Tag `json:"tag" url:"tag"` - Book *string `json:"book,omitempty" url:"book,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"` - Revenue int64 `json:"revenue" url:"revenue"` + Rating float64 `json:"rating" url:"rating"` + Tag commons.Tag `json:"tag" url:"tag"` + Book *string `json:"book,omitempty" url:"book,omitempty"` + Metadata map[string]any `json:"metadata,omitempty" url:"metadata,omitempty"` + Revenue int64 `json:"revenue" url:"revenue"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2320,7 +2320,7 @@ func (m *Movie) GetBook() *string { return m.Book } -func (m *Movie) GetMetadata() map[string]interface{} { +func (m *Movie) GetMetadata() map[string]any { if m == nil { return nil } @@ -2403,7 +2403,7 @@ func (m *Movie) SetBook(book *string) { // SetMetadata sets the Metadata field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Movie) SetMetadata(metadata map[string]interface{}) { +func (m *Movie) SetMetadata(metadata map[string]any) { m.Metadata = metadata m.require(movieFieldMetadata) } @@ -2675,7 +2675,7 @@ var ( ) type Request struct { - Request interface{} `json:"request,omitempty" url:"request,omitempty"` + Request any `json:"request,omitempty" url:"request,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -2684,7 +2684,7 @@ type Request struct { rawJSON json.RawMessage } -func (r *Request) GetRequest() interface{} { +func (r *Request) GetRequest() any { if r == nil { return nil } @@ -2707,7 +2707,7 @@ func (r *Request) require(field *big.Int) { // SetRequest sets the Request field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Request) SetRequest(request interface{}) { +func (r *Request) SetRequest(request any) { r.Request = request r.require(requestFieldRequest) } @@ -2760,7 +2760,7 @@ var ( ) type Response struct { - Response interface{} `json:"response,omitempty" url:"response,omitempty"` + Response any `json:"response,omitempty" url:"response,omitempty"` Identifiers []*Identifier `json:"identifiers,omitempty" url:"identifiers,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted @@ -2770,7 +2770,7 @@ type Response struct { rawJSON json.RawMessage } -func (r *Response) GetResponse() interface{} { +func (r *Response) GetResponse() any { if r == nil { return nil } @@ -2800,7 +2800,7 @@ func (r *Response) require(field *big.Int) { // SetResponse sets the Response field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (r *Response) SetResponse(response interface{}) { +func (r *Response) SetResponse(response any) { r.Response = response r.require(responseFieldResponse) } diff --git a/seed/go-sdk/examples/v0/types_test.go b/seed/go-sdk/examples/v0/types_test.go index 9c0a803f46c1..3ad50c2835ba 100644 --- a/seed/go-sdk/examples/v0/types_test.go +++ b/seed/go-sdk/examples/v0/types_test.go @@ -2476,7 +2476,7 @@ func TestSettersExtendedMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -2686,7 +2686,7 @@ func TestGettersExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -2995,7 +2995,7 @@ func TestSettersMarkExplicitExtendedMovie(t *testing.T) { t.Parallel() // Arrange obj := &ExtendedMovie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -3682,7 +3682,7 @@ func TestSettersMovie(t *testing.T) { t.Run("SetMetadata", func(t *testing.T) { obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any obj.SetMetadata(fernTestValueMetadata) assert.Equal(t, fernTestValueMetadata, obj.Metadata) assert.NotNil(t, obj.explicitFields) @@ -3884,7 +3884,7 @@ func TestGettersMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var expected map[string]interface{} + var expected map[string]any obj.Metadata = expected // Act & Assert @@ -4160,7 +4160,7 @@ func TestSettersMarkExplicitMovie(t *testing.T) { t.Parallel() // Arrange obj := &Movie{} - var fernTestValueMetadata map[string]interface{} + var fernTestValueMetadata map[string]any // Act obj.SetMetadata(fernTestValueMetadata) @@ -4509,7 +4509,7 @@ func TestSettersMarkExplicitRefreshTokenRequest(t *testing.T) { func TestSettersRequest(t *testing.T) { t.Run("SetRequest", func(t *testing.T) { obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any obj.SetRequest(fernTestValueRequest) assert.Equal(t, fernTestValueRequest, obj.Request) assert.NotNil(t, obj.explicitFields) @@ -4522,7 +4522,7 @@ func TestGettersRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var expected interface{} + var expected any obj.Request = expected // Act & Assert @@ -4548,7 +4548,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { t.Parallel() // Arrange obj := &Request{} - var fernTestValueRequest interface{} + var fernTestValueRequest any // Act obj.SetRequest(fernTestValueRequest) @@ -4580,7 +4580,7 @@ func TestSettersMarkExplicitRequest(t *testing.T) { func TestSettersResponse(t *testing.T) { t.Run("SetResponse", func(t *testing.T) { obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any obj.SetResponse(fernTestValueResponse) assert.Equal(t, fernTestValueResponse, obj.Response) assert.NotNil(t, obj.explicitFields) @@ -4601,7 +4601,7 @@ func TestGettersResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var expected interface{} + var expected any obj.Response = expected // Act & Assert @@ -4660,7 +4660,7 @@ func TestSettersMarkExplicitResponse(t *testing.T) { t.Parallel() // Arrange obj := &Response{} - var fernTestValueResponse interface{} + var fernTestValueResponse any // Act obj.SetResponse(fernTestValueResponse) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example25/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example25/snippet.go index c3649632400e..e9931b9b14fa 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example25/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example25/snippet.go @@ -4,7 +4,6 @@ import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" types "github.com/exhaustive/fern/types" - fern "github.com/exhaustive/fern" context "context" ) @@ -17,13 +16,12 @@ func do() { "", ), ) - request := &types.ObjectWithDatetimeLikeString{ - DatetimeLikeString: "2023-08-31T14:15:22Z", - ActualDatetime: fern.MustParseDateTime( - "2023-08-31T14:15:22Z", - ), + request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, } - client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( + client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example26/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example26/snippet.go index d5cd21747bbf..c3649632400e 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example26/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example26/snippet.go @@ -18,9 +18,9 @@ func do() { ), ) request := &types.ObjectWithDatetimeLikeString{ - DatetimeLikeString: "datetimeLikeString", + DatetimeLikeString: "2023-08-31T14:15:22Z", ActualDatetime: fern.MustParseDateTime( - "2024-01-15T09:30:00Z", + "2023-08-31T14:15:22Z", ), } client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example27/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example27/snippet.go index 6a233b05d9e1..d5cd21747bbf 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example27/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example27/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" + types "github.com/exhaustive/fern/types" fern "github.com/exhaustive/fern" context "context" ) @@ -17,15 +17,13 @@ func do() { "", ), ) - request := &endpoints.ListItemsRequest{ - Cursor: fern.String( - "cursor", - ), - Limit: fern.Int( - 1, + request := &types.ObjectWithDatetimeLikeString{ + DatetimeLikeString: "datetimeLikeString", + ActualDatetime: fern.MustParseDateTime( + "2024-01-15T09:30:00Z", ), } - client.Endpoints.Pagination.ListItems( + client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example28/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example28/snippet.go index edd276a81094..6a233b05d9e1 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example28/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example28/snippet.go @@ -3,6 +3,8 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + endpoints "github.com/exhaustive/fern/endpoints" + fern "github.com/exhaustive/fern" context "context" ) @@ -15,8 +17,16 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithPath( + request := &endpoints.ListItemsRequest{ + Cursor: fern.String( + "cursor", + ), + Limit: fern.Int( + 1, + ), + } + client.Endpoints.Pagination.ListItems( context.TODO(), - "param", + request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example30/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example30/snippet.go index 57c6670f81a6..edd276a81094 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example30/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example30/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,12 +15,8 @@ func do() { "", ), ) - request := &endpoints.GetWithQuery{ - Query: "query", - Number: 1, - } - client.Endpoints.Params.GetWithQuery( + client.Endpoints.Params.GetWithPath( context.TODO(), - request, + "param", ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example32/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example32/snippet.go index 384466f2515c..57c6670f81a6 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example32/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example32/snippet.go @@ -16,12 +16,12 @@ func do() { "", ), ) - request := &endpoints.GetWithPathAndQuery{ + request := &endpoints.GetWithQuery{ Query: "query", + Number: 1, } - client.Endpoints.Params.GetWithPathAndQuery( + client.Endpoints.Params.GetWithQuery( context.TODO(), - "param", request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example34/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example34/snippet.go index 1d8b3b466240..384466f2515c 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example34/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example34/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -15,8 +16,10 @@ func do() { "", ), ) - request := "string" - client.Endpoints.Params.ModifyWithPath( + request := &endpoints.GetWithPathAndQuery{ + Query: "query", + } + client.Endpoints.Params.GetWithPathAndQuery( context.TODO(), "param", request, diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example36/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example36/snippet.go index b77a552bf984..1d8b3b466240 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example36/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example36/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - bytes "bytes" context "context" ) @@ -16,12 +15,10 @@ func do() { "", ), ) - request := bytes.NewReader( - []byte(""), - ) - client.Endpoints.Params.UploadWithPath( + request := "string" + client.Endpoints.Params.ModifyWithPath( context.TODO(), - "upload-path", + "param", request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example37/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example37/snippet.go index 82e8b5bfdff2..b77a552bf984 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example37/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example37/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + bytes "bytes" context "context" ) @@ -15,9 +16,12 @@ func do() { "", ), ) - request := "string" - client.Endpoints.Primitive.GetAndReturnString( + request := bytes.NewReader( + []byte(""), + ) + client.Endpoints.Params.UploadWithPath( context.TODO(), + "upload-path", request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example38/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example38/snippet.go index 403baa1b07e9..82e8b5bfdff2 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example38/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example38/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := 1 - client.Endpoints.Primitive.GetAndReturnInt( + request := "string" + client.Endpoints.Primitive.GetAndReturnString( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example39/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example39/snippet.go index b742da0bcba8..403baa1b07e9 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example39/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example39/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := int64(1000000) - client.Endpoints.Primitive.GetAndReturnLong( + request := 1 + client.Endpoints.Primitive.GetAndReturnInt( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example40/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example40/snippet.go index 2031ce5e4b7e..b742da0bcba8 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example40/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example40/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := 1.1 - client.Endpoints.Primitive.GetAndReturnDouble( + request := int64(1000000) + client.Endpoints.Primitive.GetAndReturnLong( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example41/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example41/snippet.go index bca4aba3cf63..2031ce5e4b7e 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example41/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example41/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := true - client.Endpoints.Primitive.GetAndReturnBool( + request := 1.1 + client.Endpoints.Primitive.GetAndReturnDouble( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example42/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example42/snippet.go index 7ba6d5781b6f..bca4aba3cf63 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example42/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example42/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" context "context" ) @@ -16,10 +15,8 @@ func do() { "", ), ) - request := fern.MustParseDateTime( - "2024-01-15T09:30:00Z", - ) - client.Endpoints.Primitive.GetAndReturnDatetime( + request := true + client.Endpoints.Primitive.GetAndReturnBool( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example43/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example43/snippet.go index ea7354d71684..7ba6d5781b6f 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example43/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example43/snippet.go @@ -16,10 +16,10 @@ func do() { "", ), ) - request := fern.MustParseDate( - "2023-01-15", + request := fern.MustParseDateTime( + "2024-01-15T09:30:00Z", ) - client.Endpoints.Primitive.GetAndReturnDate( + client.Endpoints.Primitive.GetAndReturnDatetime( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example44/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example44/snippet.go index 0fc23739435d..ea7354d71684 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example44/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example44/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - uuid "github.com/google/uuid" + fern "github.com/exhaustive/fern" context "context" ) @@ -16,10 +16,10 @@ func do() { "", ), ) - request := uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + request := fern.MustParseDate( + "2023-01-15", ) - client.Endpoints.Primitive.GetAndReturnUuid( + client.Endpoints.Primitive.GetAndReturnDate( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example45/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example45/snippet.go index 4123137454c5..0fc23739435d 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example45/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example45/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + uuid "github.com/google/uuid" context "context" ) @@ -15,8 +16,10 @@ func do() { "", ), ) - request := []byte("SGVsbG8gd29ybGQh") - client.Endpoints.Primitive.GetAndReturnBase64( + request := uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ) + client.Endpoints.Primitive.GetAndReturnUuid( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example46/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example46/snippet.go index cdd2596e18c8..4123137454c5 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example46/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example46/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,10 +15,8 @@ func do() { "", ), ) - request := &endpoints.PutRequest{ - Id: "id", - } - client.Endpoints.Put.Add( + request := []byte("SGVsbG8gd29ybGQh") + client.Endpoints.Primitive.GetAndReturnBase64( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example47/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example47/snippet.go index 8cf7dffd3bf9..cdd2596e18c8 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example47/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example47/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - types "github.com/exhaustive/fern/types" + endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,13 +16,10 @@ func do() { "", ), ) - request := &types.Animal{ - Dog: &types.Dog{ - Name: "name", - LikesToWoof: true, - }, + request := &endpoints.PutRequest{ + Id: "id", } - client.Endpoints.Union.GetAndReturnUnion( + client.Endpoints.Put.Add( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example48/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example48/snippet.go index a93ae3386722..8cf7dffd3bf9 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example48/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example48/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + types "github.com/exhaustive/fern/types" context "context" ) @@ -15,7 +16,14 @@ func do() { "", ), ) - client.Endpoints.Urls.WithMixedCase( + request := &types.Animal{ + Dog: &types.Dog{ + Name: "name", + LikesToWoof: true, + }, + } + client.Endpoints.Union.GetAndReturnUnion( context.TODO(), + request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example49/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example49/snippet.go index 577186ecde11..a93ae3386722 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example49/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example49/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.NoEndingSlash( + client.Endpoints.Urls.WithMixedCase( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example50/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example50/snippet.go index 5aa07b141f00..577186ecde11 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example50/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example50/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.WithEndingSlash( + client.Endpoints.Urls.NoEndingSlash( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example51/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example51/snippet.go index 0a34c1ef6699..5aa07b141f00 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example51/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example51/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.WithUnderscores( + client.Endpoints.Urls.WithEndingSlash( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example52/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example52/snippet.go index 84c79c102c7b..0a34c1ef6699 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example52/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example52/snippet.go @@ -3,9 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" - types "github.com/exhaustive/fern/types" - uuid "github.com/google/uuid" context "context" ) @@ -18,60 +15,7 @@ func do() { "", ), ) - request := &fern.PostWithObjectBody{ - FieldString: "string", - Integer: 1, - NestedObject: &types.ObjectWithOptionalField{ - FieldString: fern.String( - "string", - ), - Integer: fern.Int( - 1, - ), - Long: fern.Int64( - int64(1000000), - ), - Double: fern.Float64( - 1.1, - ), - Bool: fern.Bool( - true, - ), - Datetime: fern.Time( - fern.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: fern.Time( - fern.MustParseDate( - "2023-01-15", - ), - ), - Uuid: fern.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: fern.Bytes( - []byte("SGVsbG8gd29ybGQh"), - ), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", - }, - Bigint: fern.String( - "1000000", - ), - }, - } - client.InlinedRequests.PostWithObjectBodyandResponse( + client.Endpoints.Urls.WithUnderscores( context.TODO(), - request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example54/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example54/snippet.go index 3b27a0d640a2..84c79c102c7b 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example54/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example54/snippet.go @@ -3,6 +3,9 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + fern "github.com/exhaustive/fern" + types "github.com/exhaustive/fern/types" + uuid "github.com/google/uuid" context "context" ) @@ -15,10 +18,59 @@ func do() { "", ), ) - request := map[string]any{ - "key": "value", + request := &fern.PostWithObjectBody{ + FieldString: "string", + Integer: 1, + NestedObject: &types.ObjectWithOptionalField{ + FieldString: fern.String( + "string", + ), + Integer: fern.Int( + 1, + ), + Long: fern.Int64( + int64(1000000), + ), + Double: fern.Float64( + 1.1, + ), + Bool: fern.Bool( + true, + ), + Datetime: fern.Time( + fern.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: fern.Time( + fern.MustParseDate( + "2023-01-15", + ), + ), + Uuid: fern.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: fern.Bytes( + []byte("SGVsbG8gd29ybGQh"), + ), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: fern.String( + "1000000", + ), + }, } - client.NoAuth.PostWithNoAuth( + client.InlinedRequests.PostWithObjectBodyandResponse( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example56/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example56/snippet.go index fab0508ce294..3b27a0d640a2 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example56/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example56/snippet.go @@ -15,7 +15,11 @@ func do() { "", ), ) - client.NoReqBody.GetWithNoRequestBody( + request := map[string]any{ + "key": "value", + } + client.NoAuth.PostWithNoAuth( context.TODO(), + request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example57/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example57/snippet.go index 6715197c4533..fab0508ce294 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example57/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example57/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.NoReqBody.PostWithNoRequestBody( + client.NoReqBody.GetWithNoRequestBody( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example58/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example58/snippet.go index 1e71655744a0..6715197c4533 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example58/snippet.go +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example58/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" context "context" ) @@ -16,13 +15,7 @@ func do() { "", ), ) - request := &fern.ReqWithHeaders{ - XTestServiceHeader: "X-TEST-SERVICE-HEADER", - XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", - Body: "string", - } - client.ReqWithHeaders.GetWithCustomHeader( + client.NoReqBody.PostWithNoRequestBody( context.TODO(), - request, ) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example59/snippet.go b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example59/snippet.go new file mode 100644 index 000000000000..1e71655744a0 --- /dev/null +++ b/seed/go-sdk/exhaustive/no-custom-config/dynamic-snippets/example59/snippet.go @@ -0,0 +1,28 @@ +package example + +import ( + client "github.com/exhaustive/fern/client" + option "github.com/exhaustive/fern/option" + fern "github.com/exhaustive/fern" + context "context" +) + +func do() { + client := client.NewClient( + option.WithBaseURL( + "https://api.fern.com", + ), + option.WithToken( + "", + ), + ) + request := &fern.ReqWithHeaders{ + XTestServiceHeader: "X-TEST-SERVICE-HEADER", + XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", + Body: "string", + } + client.ReqWithHeaders.GetWithCustomHeader( + context.TODO(), + request, + ) +} diff --git a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/client.go b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/client.go index 59262ba40fee..b83de27acec1 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/client.go +++ b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/client.go @@ -162,6 +162,22 @@ func (c *Client) GetAndReturnWithDocumentedUnknownType( return response.Body, nil } +func (c *Client) GetAndReturnMapOfDocumentedUnknownType( + ctx context.Context, + request types.MapOfDocumentedUnknownType, + opts ...option.RequestOption, +) (types.MapOfDocumentedUnknownType, error) { + response, err := c.WithRawResponse.GetAndReturnMapOfDocumentedUnknownType( + ctx, + request, + opts..., + ) + if err != nil { + return nil, err + } + return response.Body, nil +} + // Tests that string fields containing datetime-like values are NOT reformatted. // The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" // without being converted to "2023-08-31T14:15:22.000Z". diff --git a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/endpoints_object_test/endpoints_object_test.go b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/endpoints_object_test/endpoints_object_test.go index 4b1746c39c6a..8a3b032e4c20 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/endpoints_object_test/endpoints_object_test.go +++ b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/endpoints_object_test/endpoints_object_test.go @@ -517,6 +517,33 @@ func TestEndpointsObjectGetAndReturnWithDocumentedUnknownTypeWithWireMock( VerifyRequestCount(t, "TestEndpointsObjectGetAndReturnWithDocumentedUnknownTypeWithWireMock", "POST", "/object/get-and-return-with-documented-unknown-type", nil, 1) } +func TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, + } + _, invocationErr := client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock", "POST", "/object/get-and-return-map-of-documented-unknown-type", nil, 1) +} + func TestEndpointsObjectGetAndReturnWithDatetimeLikeStringWithWireMock( t *testing.T, ) { diff --git a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/raw_client.go b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/raw_client.go index 7d7864be8967..8d9ab6f07d6c 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/raw_client.go +++ b/seed/go-sdk/exhaustive/no-custom-config/endpoints/object/raw_client.go @@ -362,6 +362,47 @@ func (r *RawClient) GetAndReturnWithDocumentedUnknownType( }, nil } +func (r *RawClient) GetAndReturnMapOfDocumentedUnknownType( + ctx context.Context, + request types.MapOfDocumentedUnknownType, + opts ...option.RequestOption, +) (*core.Response[types.MapOfDocumentedUnknownType], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + r.baseURL, + "", + ) + endpointURL := baseURL + "/object/get-and-return-map-of-documented-unknown-type" + headers := internal.MergeHeaders( + r.options.ToHeader(), + options.ToHeader(), + ) + var response types.MapOfDocumentedUnknownType + raw, err := r.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, + }, + ) + if err != nil { + return nil, err + } + return &core.Response[types.MapOfDocumentedUnknownType]{ + StatusCode: raw.StatusCode, + Header: raw.Header, + Body: response, + }, nil +} + func (r *RawClient) GetAndReturnWithDatetimeLikeString( ctx context.Context, request *types.ObjectWithDatetimeLikeString, diff --git a/seed/go-sdk/exhaustive/no-custom-config/reference.md b/seed/go-sdk/exhaustive/no-custom-config/reference.md index eb6793276728..26af22f34ac0 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/reference.md +++ b/seed/go-sdk/exhaustive/no-custom-config/reference.md @@ -1545,6 +1545,55 @@ client.Endpoints.Object.GetAndReturnWithDocumentedUnknownType( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType(request) -> types.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```go +request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, + } +client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( + context.TODO(), + request, + ) +} +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `types.MapOfDocumentedUnknownType` + +
+
+
+
+ +
diff --git a/seed/go-sdk/exhaustive/no-custom-config/snippet.json b/seed/go-sdk/exhaustive/no-custom-config/snippet.json index 5270429cba48..db6ad29f18ca 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/snippet.json +++ b/seed/go-sdk/exhaustive/no-custom-config/snippet.json @@ -209,6 +209,17 @@ "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/exhaustive/fern/client\"\n\toption \"github.com/exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.NoReqBody.PostWithNoRequestBody(\n\tcontext.TODO(),\n)\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "go", + "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/exhaustive/fern/client\"\n\toption \"github.com/exhaustive/fern/option\"\n\ttypes \"github.com/exhaustive/fern/types\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType(\n\tcontext.TODO(),\n\tmap[string]types.DocumentedUnknownType{\n\t\t\"string\": map[string]interface{}{\n\t\t\t\"key\": \"value\",\n\t\t},\n\t},\n)\n" + } + }, { "id": { "path": "/object/get-and-return-nested-with-optional-field", diff --git a/seed/go-sdk/exhaustive/no-custom-config/types/object.go b/seed/go-sdk/exhaustive/no-custom-config/types/object.go index 6e5c37735406..1b2f6ee818bc 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/types/object.go +++ b/seed/go-sdk/exhaustive/no-custom-config/types/object.go @@ -12,7 +12,7 @@ import ( ) // Tests that unknown types are able to preserve their docstrings. -type DocumentedUnknownType = interface{} +type DocumentedUnknownType = any var ( doubleOptionalFieldOptionalAlias = big.NewInt(1 << 0) @@ -98,6 +98,9 @@ func (d *DoubleOptional) String() string { return fmt.Sprintf("%#v", d) } +// Tests that map value types with unknown types don't get spurious | undefined. +type MapOfDocumentedUnknownType = map[string]DocumentedUnknownType + var ( nestedObjectWithOptionalFieldFieldFieldString = big.NewInt(1 << 0) nestedObjectWithOptionalFieldFieldNestedObject = big.NewInt(1 << 1) @@ -960,7 +963,7 @@ var ( ) type ObjectWithUnknownField struct { - Unknown interface{} `json:"unknown" url:"unknown"` + Unknown any `json:"unknown" url:"unknown"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -969,7 +972,7 @@ type ObjectWithUnknownField struct { rawJSON json.RawMessage } -func (o *ObjectWithUnknownField) GetUnknown() interface{} { +func (o *ObjectWithUnknownField) GetUnknown() any { if o == nil { return nil } @@ -992,7 +995,7 @@ func (o *ObjectWithUnknownField) require(field *big.Int) { // SetUnknown sets the Unknown field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (o *ObjectWithUnknownField) SetUnknown(unknown interface{}) { +func (o *ObjectWithUnknownField) SetUnknown(unknown any) { o.Unknown = unknown o.require(objectWithUnknownFieldFieldUnknown) } diff --git a/seed/go-sdk/exhaustive/no-custom-config/types/object_test.go b/seed/go-sdk/exhaustive/no-custom-config/types/object_test.go index 9dd7addf117a..3c49c1671ea0 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/types/object_test.go +++ b/seed/go-sdk/exhaustive/no-custom-config/types/object_test.go @@ -1619,7 +1619,7 @@ func TestSettersMarkExplicitObjectWithRequiredField(t *testing.T) { func TestSettersObjectWithUnknownField(t *testing.T) { t.Run("SetUnknown", func(t *testing.T) { obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any obj.SetUnknown(fernTestValueUnknown) assert.Equal(t, fernTestValueUnknown, obj.Unknown) assert.NotNil(t, obj.explicitFields) @@ -1632,7 +1632,7 @@ func TestGettersObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var expected interface{} + var expected any obj.Unknown = expected // Act & Assert @@ -1658,7 +1658,7 @@ func TestSettersMarkExplicitObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any // Act obj.SetUnknown(fernTestValueUnknown) diff --git a/seed/go-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json b/seed/go-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json index c907c269bebe..c932107ed38e 100644 --- a/seed/go-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json +++ b/seed/go-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example25/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example25/snippet.go index c3649632400e..e9931b9b14fa 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example25/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example25/snippet.go @@ -4,7 +4,6 @@ import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" types "github.com/exhaustive/fern/types" - fern "github.com/exhaustive/fern" context "context" ) @@ -17,13 +16,12 @@ func do() { "", ), ) - request := &types.ObjectWithDatetimeLikeString{ - DatetimeLikeString: "2023-08-31T14:15:22Z", - ActualDatetime: fern.MustParseDateTime( - "2023-08-31T14:15:22Z", - ), + request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, } - client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( + client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example26/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example26/snippet.go index d5cd21747bbf..c3649632400e 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example26/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example26/snippet.go @@ -18,9 +18,9 @@ func do() { ), ) request := &types.ObjectWithDatetimeLikeString{ - DatetimeLikeString: "datetimeLikeString", + DatetimeLikeString: "2023-08-31T14:15:22Z", ActualDatetime: fern.MustParseDateTime( - "2024-01-15T09:30:00Z", + "2023-08-31T14:15:22Z", ), } client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example27/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example27/snippet.go index 6a233b05d9e1..d5cd21747bbf 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example27/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example27/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" + types "github.com/exhaustive/fern/types" fern "github.com/exhaustive/fern" context "context" ) @@ -17,15 +17,13 @@ func do() { "", ), ) - request := &endpoints.ListItemsRequest{ - Cursor: fern.String( - "cursor", - ), - Limit: fern.Int( - 1, + request := &types.ObjectWithDatetimeLikeString{ + DatetimeLikeString: "datetimeLikeString", + ActualDatetime: fern.MustParseDateTime( + "2024-01-15T09:30:00Z", ), } - client.Endpoints.Pagination.ListItems( + client.Endpoints.Object.GetAndReturnWithDatetimeLikeString( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example28/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example28/snippet.go index edd276a81094..6a233b05d9e1 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example28/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example28/snippet.go @@ -3,6 +3,8 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + endpoints "github.com/exhaustive/fern/endpoints" + fern "github.com/exhaustive/fern" context "context" ) @@ -15,8 +17,16 @@ func do() { "", ), ) - client.Endpoints.Params.GetWithPath( + request := &endpoints.ListItemsRequest{ + Cursor: fern.String( + "cursor", + ), + Limit: fern.Int( + 1, + ), + } + client.Endpoints.Pagination.ListItems( context.TODO(), - "param", + request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example30/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example30/snippet.go index 57c6670f81a6..edd276a81094 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example30/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example30/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,12 +15,8 @@ func do() { "", ), ) - request := &endpoints.GetWithQuery{ - Query: "query", - Number: 1, - } - client.Endpoints.Params.GetWithQuery( + client.Endpoints.Params.GetWithPath( context.TODO(), - request, + "param", ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example32/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example32/snippet.go index 384466f2515c..57c6670f81a6 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example32/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example32/snippet.go @@ -16,12 +16,12 @@ func do() { "", ), ) - request := &endpoints.GetWithPathAndQuery{ + request := &endpoints.GetWithQuery{ Query: "query", + Number: 1, } - client.Endpoints.Params.GetWithPathAndQuery( + client.Endpoints.Params.GetWithQuery( context.TODO(), - "param", request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example34/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example34/snippet.go index 1d8b3b466240..384466f2515c 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example34/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example34/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -15,8 +16,10 @@ func do() { "", ), ) - request := "string" - client.Endpoints.Params.ModifyWithPath( + request := &endpoints.GetWithPathAndQuery{ + Query: "query", + } + client.Endpoints.Params.GetWithPathAndQuery( context.TODO(), "param", request, diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example36/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example36/snippet.go index b77a552bf984..1d8b3b466240 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example36/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example36/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - bytes "bytes" context "context" ) @@ -16,12 +15,10 @@ func do() { "", ), ) - request := bytes.NewReader( - []byte(""), - ) - client.Endpoints.Params.UploadWithPath( + request := "string" + client.Endpoints.Params.ModifyWithPath( context.TODO(), - "upload-path", + "param", request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example37/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example37/snippet.go index 82e8b5bfdff2..b77a552bf984 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example37/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example37/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + bytes "bytes" context "context" ) @@ -15,9 +16,12 @@ func do() { "", ), ) - request := "string" - client.Endpoints.Primitive.GetAndReturnString( + request := bytes.NewReader( + []byte(""), + ) + client.Endpoints.Params.UploadWithPath( context.TODO(), + "upload-path", request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example38/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example38/snippet.go index 403baa1b07e9..82e8b5bfdff2 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example38/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example38/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := 1 - client.Endpoints.Primitive.GetAndReturnInt( + request := "string" + client.Endpoints.Primitive.GetAndReturnString( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example39/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example39/snippet.go index b742da0bcba8..403baa1b07e9 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example39/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example39/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := int64(1000000) - client.Endpoints.Primitive.GetAndReturnLong( + request := 1 + client.Endpoints.Primitive.GetAndReturnInt( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example40/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example40/snippet.go index 2031ce5e4b7e..b742da0bcba8 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example40/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example40/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := 1.1 - client.Endpoints.Primitive.GetAndReturnDouble( + request := int64(1000000) + client.Endpoints.Primitive.GetAndReturnLong( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example41/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example41/snippet.go index bca4aba3cf63..2031ce5e4b7e 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example41/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example41/snippet.go @@ -15,8 +15,8 @@ func do() { "", ), ) - request := true - client.Endpoints.Primitive.GetAndReturnBool( + request := 1.1 + client.Endpoints.Primitive.GetAndReturnDouble( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example42/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example42/snippet.go index 7ba6d5781b6f..bca4aba3cf63 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example42/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example42/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" context "context" ) @@ -16,10 +15,8 @@ func do() { "", ), ) - request := fern.MustParseDateTime( - "2024-01-15T09:30:00Z", - ) - client.Endpoints.Primitive.GetAndReturnDatetime( + request := true + client.Endpoints.Primitive.GetAndReturnBool( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example43/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example43/snippet.go index ea7354d71684..7ba6d5781b6f 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example43/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example43/snippet.go @@ -16,10 +16,10 @@ func do() { "", ), ) - request := fern.MustParseDate( - "2023-01-15", + request := fern.MustParseDateTime( + "2024-01-15T09:30:00Z", ) - client.Endpoints.Primitive.GetAndReturnDate( + client.Endpoints.Primitive.GetAndReturnDatetime( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example44/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example44/snippet.go index 0fc23739435d..ea7354d71684 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example44/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example44/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - uuid "github.com/google/uuid" + fern "github.com/exhaustive/fern" context "context" ) @@ -16,10 +16,10 @@ func do() { "", ), ) - request := uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + request := fern.MustParseDate( + "2023-01-15", ) - client.Endpoints.Primitive.GetAndReturnUuid( + client.Endpoints.Primitive.GetAndReturnDate( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example45/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example45/snippet.go index 4123137454c5..0fc23739435d 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example45/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example45/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + uuid "github.com/google/uuid" context "context" ) @@ -15,8 +16,10 @@ func do() { "", ), ) - request := []byte("SGVsbG8gd29ybGQh") - client.Endpoints.Primitive.GetAndReturnBase64( + request := uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ) + client.Endpoints.Primitive.GetAndReturnUuid( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example46/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example46/snippet.go index cdd2596e18c8..4123137454c5 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example46/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example46/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,10 +15,8 @@ func do() { "", ), ) - request := &endpoints.PutRequest{ - Id: "id", - } - client.Endpoints.Put.Add( + request := []byte("SGVsbG8gd29ybGQh") + client.Endpoints.Primitive.GetAndReturnBase64( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example47/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example47/snippet.go index 8cf7dffd3bf9..cdd2596e18c8 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example47/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example47/snippet.go @@ -3,7 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - types "github.com/exhaustive/fern/types" + endpoints "github.com/exhaustive/fern/endpoints" context "context" ) @@ -16,13 +16,10 @@ func do() { "", ), ) - request := &types.Animal{ - Dog: &types.Dog{ - Name: "name", - LikesToWoof: true, - }, + request := &endpoints.PutRequest{ + Id: "id", } - client.Endpoints.Union.GetAndReturnUnion( + client.Endpoints.Put.Add( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example48/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example48/snippet.go index a93ae3386722..8cf7dffd3bf9 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example48/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example48/snippet.go @@ -3,6 +3,7 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + types "github.com/exhaustive/fern/types" context "context" ) @@ -15,7 +16,14 @@ func do() { "", ), ) - client.Endpoints.Urls.WithMixedCase( + request := &types.Animal{ + Dog: &types.Dog{ + Name: "name", + LikesToWoof: true, + }, + } + client.Endpoints.Union.GetAndReturnUnion( context.TODO(), + request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example49/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example49/snippet.go index 577186ecde11..a93ae3386722 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example49/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example49/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.NoEndingSlash( + client.Endpoints.Urls.WithMixedCase( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example50/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example50/snippet.go index 5aa07b141f00..577186ecde11 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example50/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example50/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.WithEndingSlash( + client.Endpoints.Urls.NoEndingSlash( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example51/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example51/snippet.go index 0a34c1ef6699..5aa07b141f00 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example51/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example51/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.Endpoints.Urls.WithUnderscores( + client.Endpoints.Urls.WithEndingSlash( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example52/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example52/snippet.go index 84c79c102c7b..0a34c1ef6699 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example52/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example52/snippet.go @@ -3,9 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" - types "github.com/exhaustive/fern/types" - uuid "github.com/google/uuid" context "context" ) @@ -18,60 +15,7 @@ func do() { "", ), ) - request := &fern.PostWithObjectBody{ - FieldString: "string", - Integer: 1, - NestedObject: &types.ObjectWithOptionalField{ - FieldString: fern.String( - "string", - ), - Integer: fern.Int( - 1, - ), - Long: fern.Int64( - int64(1000000), - ), - Double: fern.Float64( - 1.1, - ), - Bool: fern.Bool( - true, - ), - Datetime: fern.Time( - fern.MustParseDateTime( - "2024-01-15T09:30:00Z", - ), - ), - Date: fern.Time( - fern.MustParseDate( - "2023-01-15", - ), - ), - Uuid: fern.UUID( - uuid.MustParse( - "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - ), - ), - Base64: fern.Bytes( - []byte("SGVsbG8gd29ybGQh"), - ), - List: []string{ - "list", - "list", - }, - Set: []string{ - "set", - }, - Map: map[int]string{ - 1: "map", - }, - Bigint: fern.String( - "1000000", - ), - }, - } - client.InlinedRequests.PostWithObjectBodyandResponse( + client.Endpoints.Urls.WithUnderscores( context.TODO(), - request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example54/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example54/snippet.go index 3b27a0d640a2..84c79c102c7b 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example54/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example54/snippet.go @@ -3,6 +3,9 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" + fern "github.com/exhaustive/fern" + types "github.com/exhaustive/fern/types" + uuid "github.com/google/uuid" context "context" ) @@ -15,10 +18,59 @@ func do() { "", ), ) - request := map[string]any{ - "key": "value", + request := &fern.PostWithObjectBody{ + FieldString: "string", + Integer: 1, + NestedObject: &types.ObjectWithOptionalField{ + FieldString: fern.String( + "string", + ), + Integer: fern.Int( + 1, + ), + Long: fern.Int64( + int64(1000000), + ), + Double: fern.Float64( + 1.1, + ), + Bool: fern.Bool( + true, + ), + Datetime: fern.Time( + fern.MustParseDateTime( + "2024-01-15T09:30:00Z", + ), + ), + Date: fern.Time( + fern.MustParseDate( + "2023-01-15", + ), + ), + Uuid: fern.UUID( + uuid.MustParse( + "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + ), + ), + Base64: fern.Bytes( + []byte("SGVsbG8gd29ybGQh"), + ), + List: []string{ + "list", + "list", + }, + Set: []string{ + "set", + }, + Map: map[int]string{ + 1: "map", + }, + Bigint: fern.String( + "1000000", + ), + }, } - client.NoAuth.PostWithNoAuth( + client.InlinedRequests.PostWithObjectBodyandResponse( context.TODO(), request, ) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example56/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example56/snippet.go index fab0508ce294..3b27a0d640a2 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example56/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example56/snippet.go @@ -15,7 +15,11 @@ func do() { "", ), ) - client.NoReqBody.GetWithNoRequestBody( + request := map[string]any{ + "key": "value", + } + client.NoAuth.PostWithNoAuth( context.TODO(), + request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example57/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example57/snippet.go index 6715197c4533..fab0508ce294 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example57/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example57/snippet.go @@ -15,7 +15,7 @@ func do() { "", ), ) - client.NoReqBody.PostWithNoRequestBody( + client.NoReqBody.GetWithNoRequestBody( context.TODO(), ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example58/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example58/snippet.go index 1e71655744a0..6715197c4533 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example58/snippet.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example58/snippet.go @@ -3,7 +3,6 @@ package example import ( client "github.com/exhaustive/fern/client" option "github.com/exhaustive/fern/option" - fern "github.com/exhaustive/fern" context "context" ) @@ -16,13 +15,7 @@ func do() { "", ), ) - request := &fern.ReqWithHeaders{ - XTestServiceHeader: "X-TEST-SERVICE-HEADER", - XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", - Body: "string", - } - client.ReqWithHeaders.GetWithCustomHeader( + client.NoReqBody.PostWithNoRequestBody( context.TODO(), - request, ) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example59/snippet.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example59/snippet.go new file mode 100644 index 000000000000..1e71655744a0 --- /dev/null +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/dynamic-snippets/example59/snippet.go @@ -0,0 +1,28 @@ +package example + +import ( + client "github.com/exhaustive/fern/client" + option "github.com/exhaustive/fern/option" + fern "github.com/exhaustive/fern" + context "context" +) + +func do() { + client := client.NewClient( + option.WithBaseURL( + "https://api.fern.com", + ), + option.WithToken( + "", + ), + ) + request := &fern.ReqWithHeaders{ + XTestServiceHeader: "X-TEST-SERVICE-HEADER", + XTestEndpointHeader: "X-TEST-ENDPOINT-HEADER", + Body: "string", + } + client.ReqWithHeaders.GetWithCustomHeader( + context.TODO(), + request, + ) +} diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/client.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/client.go index 59262ba40fee..b83de27acec1 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/client.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/client.go @@ -162,6 +162,22 @@ func (c *Client) GetAndReturnWithDocumentedUnknownType( return response.Body, nil } +func (c *Client) GetAndReturnMapOfDocumentedUnknownType( + ctx context.Context, + request types.MapOfDocumentedUnknownType, + opts ...option.RequestOption, +) (types.MapOfDocumentedUnknownType, error) { + response, err := c.WithRawResponse.GetAndReturnMapOfDocumentedUnknownType( + ctx, + request, + opts..., + ) + if err != nil { + return nil, err + } + return response.Body, nil +} + // Tests that string fields containing datetime-like values are NOT reformatted. // The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" // without being converted to "2023-08-31T14:15:22.000Z". diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/endpoints_object_test/endpoints_object_test.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/endpoints_object_test/endpoints_object_test.go index 4b1746c39c6a..8a3b032e4c20 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/endpoints_object_test/endpoints_object_test.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/endpoints_object_test/endpoints_object_test.go @@ -517,6 +517,33 @@ func TestEndpointsObjectGetAndReturnWithDocumentedUnknownTypeWithWireMock( VerifyRequestCount(t, "TestEndpointsObjectGetAndReturnWithDocumentedUnknownTypeWithWireMock", "POST", "/object/get-and-return-with-documented-unknown-type", nil, 1) } +func TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, + } + _, invocationErr := client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEndpointsObjectGetAndReturnMapOfDocumentedUnknownTypeWithWireMock", "POST", "/object/get-and-return-map-of-documented-unknown-type", nil, 1) +} + func TestEndpointsObjectGetAndReturnWithDatetimeLikeStringWithWireMock( t *testing.T, ) { diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/raw_client.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/raw_client.go index 7d7864be8967..8d9ab6f07d6c 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/raw_client.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/endpoints/object/raw_client.go @@ -362,6 +362,47 @@ func (r *RawClient) GetAndReturnWithDocumentedUnknownType( }, nil } +func (r *RawClient) GetAndReturnMapOfDocumentedUnknownType( + ctx context.Context, + request types.MapOfDocumentedUnknownType, + opts ...option.RequestOption, +) (*core.Response[types.MapOfDocumentedUnknownType], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + r.baseURL, + "", + ) + endpointURL := baseURL + "/object/get-and-return-map-of-documented-unknown-type" + headers := internal.MergeHeaders( + r.options.ToHeader(), + options.ToHeader(), + ) + var response types.MapOfDocumentedUnknownType + raw, err := r.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, + }, + ) + if err != nil { + return nil, err + } + return &core.Response[types.MapOfDocumentedUnknownType]{ + StatusCode: raw.StatusCode, + Header: raw.Header, + Body: response, + }, nil +} + func (r *RawClient) GetAndReturnWithDatetimeLikeString( ctx context.Context, request *types.ObjectWithDatetimeLikeString, diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/reference.md b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/reference.md index eb6793276728..26af22f34ac0 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/reference.md +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/reference.md @@ -1545,6 +1545,55 @@ client.Endpoints.Object.GetAndReturnWithDocumentedUnknownType( + + + + +
client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType(request) -> types.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```go +request := map[string]types.DocumentedUnknownType{ + "string": map[string]any{ + "key": "value", + }, + } +client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType( + context.TODO(), + request, + ) +} +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `types.MapOfDocumentedUnknownType` + +
+
+
+
+ +
diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/snippet.json b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/snippet.json index 5270429cba48..db6ad29f18ca 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/snippet.json +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/snippet.json @@ -209,6 +209,17 @@ "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/exhaustive/fern/client\"\n\toption \"github.com/exhaustive/fern/option\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.NoReqBody.PostWithNoRequestBody(\n\tcontext.TODO(),\n)\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "go", + "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/exhaustive/fern/client\"\n\toption \"github.com/exhaustive/fern/option\"\n\ttypes \"github.com/exhaustive/fern/types\"\n)\n\nclient := fernclient.NewClient(\n\toption.WithToken(\n\t\t\"\u003cYOUR_AUTH_TOKEN\u003e\",\n\t),\n)\nresponse, err := client.Endpoints.Object.GetAndReturnMapOfDocumentedUnknownType(\n\tcontext.TODO(),\n\tmap[string]types.DocumentedUnknownType{\n\t\t\"string\": map[string]interface{}{\n\t\t\t\"key\": \"value\",\n\t\t},\n\t},\n)\n" + } + }, { "id": { "path": "/object/get-and-return-nested-with-optional-field", diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object.go index 6e5c37735406..1b2f6ee818bc 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object.go @@ -12,7 +12,7 @@ import ( ) // Tests that unknown types are able to preserve their docstrings. -type DocumentedUnknownType = interface{} +type DocumentedUnknownType = any var ( doubleOptionalFieldOptionalAlias = big.NewInt(1 << 0) @@ -98,6 +98,9 @@ func (d *DoubleOptional) String() string { return fmt.Sprintf("%#v", d) } +// Tests that map value types with unknown types don't get spurious | undefined. +type MapOfDocumentedUnknownType = map[string]DocumentedUnknownType + var ( nestedObjectWithOptionalFieldFieldFieldString = big.NewInt(1 << 0) nestedObjectWithOptionalFieldFieldNestedObject = big.NewInt(1 << 1) @@ -960,7 +963,7 @@ var ( ) type ObjectWithUnknownField struct { - Unknown interface{} `json:"unknown" url:"unknown"` + Unknown any `json:"unknown" url:"unknown"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -969,7 +972,7 @@ type ObjectWithUnknownField struct { rawJSON json.RawMessage } -func (o *ObjectWithUnknownField) GetUnknown() interface{} { +func (o *ObjectWithUnknownField) GetUnknown() any { if o == nil { return nil } @@ -992,7 +995,7 @@ func (o *ObjectWithUnknownField) require(field *big.Int) { // SetUnknown sets the Unknown field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (o *ObjectWithUnknownField) SetUnknown(unknown interface{}) { +func (o *ObjectWithUnknownField) SetUnknown(unknown any) { o.Unknown = unknown o.require(objectWithUnknownFieldFieldUnknown) } diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object_test.go b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object_test.go index 9dd7addf117a..3c49c1671ea0 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object_test.go +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/types/object_test.go @@ -1619,7 +1619,7 @@ func TestSettersMarkExplicitObjectWithRequiredField(t *testing.T) { func TestSettersObjectWithUnknownField(t *testing.T) { t.Run("SetUnknown", func(t *testing.T) { obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any obj.SetUnknown(fernTestValueUnknown) assert.Equal(t, fernTestValueUnknown, obj.Unknown) assert.NotNil(t, obj.explicitFields) @@ -1632,7 +1632,7 @@ func TestGettersObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var expected interface{} + var expected any obj.Unknown = expected // Act & Assert @@ -1658,7 +1658,7 @@ func TestSettersMarkExplicitObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any // Act obj.SetUnknown(fernTestValueUnknown) diff --git a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/wiremock/wiremock-mappings.json b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/wiremock/wiremock-mappings.json index c907c269bebe..c932107ed38e 100644 --- a/seed/go-sdk/exhaustive/omit-empty-request-wrappers/wiremock/wiremock-mappings.json +++ b/seed/go-sdk/exhaustive/omit-empty-request-wrappers/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/go-sdk/file-upload/no-custom-config/service.go b/seed/go-sdk/file-upload/no-custom-config/service.go index 448dc870010b..acdc4f2d28a0 100644 --- a/seed/go-sdk/file-upload/no-custom-config/service.go +++ b/seed/go-sdk/file-upload/no-custom-config/service.go @@ -164,8 +164,8 @@ func (j *JustFileWithQueryParamsRequest) MarshalJSON() ([]byte, error) { } type OptionalArgsRequest struct { - ImageFile io.Reader `json:"-" url:"-"` - Request interface{} `json:"request,omitempty" url:"-"` + ImageFile io.Reader `json:"-" url:"-"` + Request any `json:"request,omitempty" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -188,7 +188,7 @@ type MyRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` AliasObject MyAliasObject `json:"alias_object" url:"-"` @@ -556,7 +556,7 @@ type MyOtherRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` ListOfObjectsWithOptionals []*MyObjectWithOptional `json:"list_of_objects_with_optionals" url:"-"` diff --git a/seed/go-sdk/file-upload/package-name/service.go b/seed/go-sdk/file-upload/package-name/service.go index 7c6c7efb9467..11c1b23e423c 100644 --- a/seed/go-sdk/file-upload/package-name/service.go +++ b/seed/go-sdk/file-upload/package-name/service.go @@ -164,8 +164,8 @@ func (j *JustFileWithQueryParamsRequest) MarshalJSON() ([]byte, error) { } type OptionalArgsRequest struct { - ImageFile io.Reader `json:"-" url:"-"` - Request interface{} `json:"request,omitempty" url:"-"` + ImageFile io.Reader `json:"-" url:"-"` + Request any `json:"request,omitempty" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -188,7 +188,7 @@ type MyRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` AliasObject MyAliasObject `json:"alias_object" url:"-"` @@ -556,7 +556,7 @@ type MyOtherRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` ListOfObjectsWithOptionals []*MyObjectWithOptional `json:"list_of_objects_with_optionals" url:"-"` diff --git a/seed/go-sdk/file-upload/v0/service.go b/seed/go-sdk/file-upload/v0/service.go index 345be46ed265..e850c98be3d4 100644 --- a/seed/go-sdk/file-upload/v0/service.go +++ b/seed/go-sdk/file-upload/v0/service.go @@ -147,7 +147,7 @@ func (j *JustFileWithQueryParamsRequest) MarshalJSON() ([]byte, error) { } type OptionalArgsRequest struct { - Request interface{} `json:"request,omitempty" url:"-"` + Request any `json:"request,omitempty" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -166,7 +166,7 @@ type MyRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects,omitempty" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` AliasObject MyAliasObject `json:"alias_object,omitempty" url:"-"` @@ -529,7 +529,7 @@ type MyOtherRequest struct { MaybeInteger *int `json:"maybe_integer,omitempty" url:"-"` OptionalListOfStrings []string `json:"optional_list_of_strings,omitempty" url:"-"` ListOfObjects []*MyObject `json:"list_of_objects,omitempty" url:"-"` - OptionalMetadata interface{} `json:"optional_metadata,omitempty" url:"-"` + OptionalMetadata any `json:"optional_metadata,omitempty" url:"-"` OptionalObjectType *ObjectType `json:"optional_object_type,omitempty" url:"-"` OptionalId *Id `json:"optional_id,omitempty" url:"-"` ListOfObjectsWithOptionals []*MyObjectWithOptional `json:"list_of_objects_with_optionals,omitempty" url:"-"` diff --git a/seed/go-sdk/go-deterministic-ordering/types/object.go b/seed/go-sdk/go-deterministic-ordering/types/object.go index 5b1d89599601..46950ba3f312 100644 --- a/seed/go-sdk/go-deterministic-ordering/types/object.go +++ b/seed/go-sdk/go-deterministic-ordering/types/object.go @@ -872,7 +872,7 @@ var ( ) type ObjectWithUnknownField struct { - Unknown interface{} `json:"unknown" url:"unknown"` + Unknown any `json:"unknown" url:"unknown"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -881,7 +881,7 @@ type ObjectWithUnknownField struct { rawJSON json.RawMessage } -func (o *ObjectWithUnknownField) GetUnknown() interface{} { +func (o *ObjectWithUnknownField) GetUnknown() any { if o == nil { return nil } @@ -904,7 +904,7 @@ func (o *ObjectWithUnknownField) require(field *big.Int) { // SetUnknown sets the Unknown field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (o *ObjectWithUnknownField) SetUnknown(unknown interface{}) { +func (o *ObjectWithUnknownField) SetUnknown(unknown any) { o.Unknown = unknown o.require(objectWithUnknownFieldFieldUnknown) } diff --git a/seed/go-sdk/go-deterministic-ordering/types/object_test.go b/seed/go-sdk/go-deterministic-ordering/types/object_test.go index c8a3a44db266..d3f7c09e250d 100644 --- a/seed/go-sdk/go-deterministic-ordering/types/object_test.go +++ b/seed/go-sdk/go-deterministic-ordering/types/object_test.go @@ -1548,7 +1548,7 @@ func TestSettersMarkExplicitObjectWithRequiredField(t *testing.T) { func TestSettersObjectWithUnknownField(t *testing.T) { t.Run("SetUnknown", func(t *testing.T) { obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any obj.SetUnknown(fernTestValueUnknown) assert.Equal(t, fernTestValueUnknown, obj.Unknown) assert.NotNil(t, obj.explicitFields) @@ -1561,7 +1561,7 @@ func TestGettersObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var expected interface{} + var expected any obj.Unknown = expected // Act & Assert @@ -1587,7 +1587,7 @@ func TestSettersMarkExplicitObjectWithUnknownField(t *testing.T) { t.Parallel() // Arrange obj := &ObjectWithUnknownField{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any // Act obj.SetUnknown(fernTestValueUnknown) diff --git a/seed/go-sdk/mixed-file-directory/user/events/metadata.go b/seed/go-sdk/mixed-file-directory/user/events/metadata.go index 9a96b1c73cdd..ff558602b7bc 100644 --- a/seed/go-sdk/mixed-file-directory/user/events/metadata.go +++ b/seed/go-sdk/mixed-file-directory/user/events/metadata.go @@ -41,8 +41,8 @@ var ( ) type Metadata struct { - Id fern.Id `json:"id" url:"id"` - Value interface{} `json:"value" url:"value"` + Id fern.Id `json:"id" url:"id"` + Value any `json:"value" url:"value"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -58,7 +58,7 @@ func (m *Metadata) GetId() fern.Id { return m.Id } -func (m *Metadata) GetValue() interface{} { +func (m *Metadata) GetValue() any { if m == nil { return nil } @@ -88,7 +88,7 @@ func (m *Metadata) SetId(id fern.Id) { // SetValue sets the Value field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *Metadata) SetValue(value interface{}) { +func (m *Metadata) SetValue(value any) { m.Value = value m.require(metadataFieldValue) } diff --git a/seed/go-sdk/mixed-file-directory/user/events/metadata_test.go b/seed/go-sdk/mixed-file-directory/user/events/metadata_test.go index a9931dcfe092..55ff527e7f0d 100644 --- a/seed/go-sdk/mixed-file-directory/user/events/metadata_test.go +++ b/seed/go-sdk/mixed-file-directory/user/events/metadata_test.go @@ -12,7 +12,7 @@ import ( func TestSettersMetadata(t *testing.T) { t.Run("SetValue", func(t *testing.T) { obj := &Metadata{} - var fernTestValueValue interface{} + var fernTestValueValue any obj.SetValue(fernTestValueValue) assert.Equal(t, fernTestValueValue, obj.Value) assert.NotNil(t, obj.explicitFields) @@ -25,7 +25,7 @@ func TestGettersMetadata(t *testing.T) { t.Parallel() // Arrange obj := &Metadata{} - var expected interface{} + var expected any obj.Value = expected // Act & Assert @@ -51,7 +51,7 @@ func TestSettersMarkExplicitMetadata(t *testing.T) { t.Parallel() // Arrange obj := &Metadata{} - var fernTestValueValue interface{} + var fernTestValueValue any // Act obj.SetValue(fernTestValueValue) diff --git a/seed/go-sdk/multiple-request-bodies/types.go b/seed/go-sdk/multiple-request-bodies/types.go index 5b9e125fb94d..42bda195e8a2 100644 --- a/seed/go-sdk/multiple-request-bodies/types.go +++ b/seed/go-sdk/multiple-request-bodies/types.go @@ -17,10 +17,10 @@ var ( ) type DocumentMetadata struct { - Author *string `json:"author,omitempty" url:"author,omitempty"` - Id *int `json:"id,omitempty" url:"id,omitempty"` - Tags []interface{} `json:"tags,omitempty" url:"tags,omitempty"` - Title *string `json:"title,omitempty" url:"title,omitempty"` + Author *string `json:"author,omitempty" url:"author,omitempty"` + Id *int `json:"id,omitempty" url:"id,omitempty"` + Tags []any `json:"tags,omitempty" url:"tags,omitempty"` + Title *string `json:"title,omitempty" url:"title,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -43,7 +43,7 @@ func (d *DocumentMetadata) GetId() *int { return d.Id } -func (d *DocumentMetadata) GetTags() []interface{} { +func (d *DocumentMetadata) GetTags() []any { if d == nil { return nil } @@ -87,7 +87,7 @@ func (d *DocumentMetadata) SetId(id *int) { // SetTags sets the Tags field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (d *DocumentMetadata) SetTags(tags []interface{}) { +func (d *DocumentMetadata) SetTags(tags []any) { d.Tags = tags d.require(documentMetadataFieldTags) } diff --git a/seed/go-sdk/multiple-request-bodies/types_test.go b/seed/go-sdk/multiple-request-bodies/types_test.go index 337e0da3f7de..e6528e0320ca 100644 --- a/seed/go-sdk/multiple-request-bodies/types_test.go +++ b/seed/go-sdk/multiple-request-bodies/types_test.go @@ -28,7 +28,7 @@ func TestSettersDocumentMetadata(t *testing.T) { t.Run("SetTags", func(t *testing.T) { obj := &DocumentMetadata{} - var fernTestValueTags []interface{} + var fernTestValueTags []any obj.SetTags(fernTestValueTags) assert.Equal(t, fernTestValueTags, obj.Tags) assert.NotNil(t, obj.explicitFields) @@ -115,7 +115,7 @@ func TestGettersDocumentMetadata(t *testing.T) { t.Parallel() // Arrange obj := &DocumentMetadata{} - var expected []interface{} + var expected []any obj.Tags = expected // Act & Assert @@ -246,7 +246,7 @@ func TestSettersMarkExplicitDocumentMetadata(t *testing.T) { t.Parallel() // Arrange obj := &DocumentMetadata{} - var fernTestValueTags []interface{} + var fernTestValueTags []any // Act obj.SetTags(fernTestValueTags) diff --git a/seed/go-sdk/nullable/nullable.go b/seed/go-sdk/nullable/nullable.go index d60baa46fbff..9a160c61d025 100644 --- a/seed/go-sdk/nullable/nullable.go +++ b/seed/go-sdk/nullable/nullable.go @@ -547,14 +547,14 @@ var ( ) type User struct { - Name string `json:"name" url:"name"` - Id UserId `json:"id" url:"id"` - Tags []string `json:"tags,omitempty" url:"tags,omitempty"` - Metadata *Metadata `json:"metadata,omitempty" url:"metadata,omitempty"` - Email Email `json:"email,omitempty" url:"email,omitempty"` - FavoriteNumber *WeirdNumber `json:"favorite-number" url:"favorite-number"` - Numbers []int `json:"numbers,omitempty" url:"numbers,omitempty"` - Strings map[string]interface{} `json:"strings,omitempty" url:"strings,omitempty"` + Name string `json:"name" url:"name"` + Id UserId `json:"id" url:"id"` + Tags []string `json:"tags,omitempty" url:"tags,omitempty"` + Metadata *Metadata `json:"metadata,omitempty" url:"metadata,omitempty"` + Email Email `json:"email,omitempty" url:"email,omitempty"` + FavoriteNumber *WeirdNumber `json:"favorite-number" url:"favorite-number"` + Numbers []int `json:"numbers,omitempty" url:"numbers,omitempty"` + Strings map[string]any `json:"strings,omitempty" url:"strings,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -612,7 +612,7 @@ func (u *User) GetNumbers() []int { return u.Numbers } -func (u *User) GetStrings() map[string]interface{} { +func (u *User) GetStrings() map[string]any { if u == nil { return nil } @@ -684,7 +684,7 @@ func (u *User) SetNumbers(numbers []int) { // SetStrings sets the Strings field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (u *User) SetStrings(strings map[string]interface{}) { +func (u *User) SetStrings(strings map[string]any) { u.Strings = strings u.require(userFieldStrings) } diff --git a/seed/go-sdk/nullable/nullable_test.go b/seed/go-sdk/nullable/nullable_test.go index 6a5b8cf97b98..ef72ace104a7 100644 --- a/seed/go-sdk/nullable/nullable_test.go +++ b/seed/go-sdk/nullable/nullable_test.go @@ -1013,7 +1013,7 @@ func TestSettersUser(t *testing.T) { t.Run("SetStrings", func(t *testing.T) { obj := &User{} - var fernTestValueStrings map[string]interface{} + var fernTestValueStrings map[string]any obj.SetStrings(fernTestValueStrings) assert.Equal(t, fernTestValueStrings, obj.Strings) assert.NotNil(t, obj.explicitFields) @@ -1227,7 +1227,7 @@ func TestGettersUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var expected map[string]interface{} + var expected map[string]any obj.Strings = expected // Act & Assert @@ -1480,7 +1480,7 @@ func TestSettersMarkExplicitUser(t *testing.T) { t.Parallel() // Arrange obj := &User{} - var fernTestValueStrings map[string]interface{} + var fernTestValueStrings map[string]any // Act obj.SetStrings(fernTestValueStrings) diff --git a/seed/go-sdk/object/types.go b/seed/go-sdk/object/types.go index ee4a340f8707..4a449fd7a2e0 100644 --- a/seed/go-sdk/object/types.go +++ b/seed/go-sdk/object/types.go @@ -153,7 +153,7 @@ type Type struct { Eleven []float64 `json:"eleven" url:"eleven"` Twelve map[string]bool `json:"twelve" url:"twelve"` Thirteen *int64 `json:"thirteen,omitempty" url:"thirteen,omitempty"` - Fourteen interface{} `json:"fourteen" url:"fourteen"` + Fourteen any `json:"fourteen" url:"fourteen"` Fifteen [][]int `json:"fifteen" url:"fifteen"` Sixteen []map[string]int `json:"sixteen" url:"sixteen"` Seventeen []*uuid.UUID `json:"seventeen" url:"seventeen"` @@ -264,7 +264,7 @@ func (t *Type) GetThirteen() *int64 { return t.Thirteen } -func (t *Type) GetFourteen() interface{} { +func (t *Type) GetFourteen() any { if t == nil { return nil } @@ -452,7 +452,7 @@ func (t *Type) SetThirteen(thirteen *int64) { // SetFourteen sets the Fourteen field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (t *Type) SetFourteen(fourteen interface{}) { +func (t *Type) SetFourteen(fourteen any) { t.Fourteen = fourteen t.require(typeFieldFourteen) } diff --git a/seed/go-sdk/object/types_test.go b/seed/go-sdk/object/types_test.go index 6a3b60bccb3c..afbc293ec8fd 100644 --- a/seed/go-sdk/object/types_test.go +++ b/seed/go-sdk/object/types_test.go @@ -242,7 +242,7 @@ func TestSettersType(t *testing.T) { t.Run("SetFourteen", func(t *testing.T) { obj := &Type{} - var fernTestValueFourteen interface{} + var fernTestValueFourteen any obj.SetFourteen(fernTestValueFourteen) assert.Equal(t, fernTestValueFourteen, obj.Fourteen) assert.NotNil(t, obj.explicitFields) @@ -653,7 +653,7 @@ func TestGettersType(t *testing.T) { t.Parallel() // Arrange obj := &Type{} - var expected interface{} + var expected any obj.Fourteen = expected // Act & Assert @@ -1308,7 +1308,7 @@ func TestSettersMarkExplicitType(t *testing.T) { t.Parallel() // Arrange obj := &Type{} - var fernTestValueFourteen interface{} + var fernTestValueFourteen any // Act obj.SetFourteen(fernTestValueFourteen) diff --git a/seed/go-sdk/optional/snippet.json b/seed/go-sdk/optional/snippet.json index 65a77b4d2676..f6bcc69f8bbb 100644 --- a/seed/go-sdk/optional/snippet.json +++ b/seed/go-sdk/optional/snippet.json @@ -19,7 +19,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/optional/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Optional.SendOptionalBody(\n\tcontext.TODO(),\n\tmap[string]interface{}{\n\t\t\"string\": map[string]interface{}{\n\t\t\t\"key\": \"value\",\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfernclient \"github.com/optional/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Optional.SendOptionalBody(\n\tcontext.TODO(),\n\tmap[string]any{\n\t\t\"string\": map[string]interface{}{\n\t\t\t\"key\": \"value\",\n\t\t},\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/undiscriminated-unions/no-custom-config/snippet.json b/seed/go-sdk/undiscriminated-unions/no-custom-config/snippet.json index 323ac82ff052..8bd7eba0df2a 100644 --- a/seed/go-sdk/undiscriminated-unions/no-custom-config/snippet.json +++ b/seed/go-sdk/undiscriminated-unions/no-custom-config/snippet.json @@ -19,7 +19,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tundiscriminatedgo \"github.com/fern-api/undiscriminated-go\"\n\tundiscriminatedgoclient \"github.com/fern-api/undiscriminated-go/client\"\n)\n\nclient := undiscriminatedgoclient.NewClient()\nresponse, err := client.Union.Call(\n\tcontext.TODO(),\n\t\u0026undiscriminatedgo.Request{\n\t\tUnion: \u0026undiscriminatedgo.MetadataUnion{\n\t\t\tOptionalMetadata: map[string]interface{}{\n\t\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tundiscriminatedgo \"github.com/fern-api/undiscriminated-go\"\n\tundiscriminatedgoclient \"github.com/fern-api/undiscriminated-go/client\"\n)\n\nclient := undiscriminatedgoclient.NewClient()\nresponse, err := client.Union.Call(\n\tcontext.TODO(),\n\t\u0026undiscriminatedgo.Request{\n\t\tUnion: \u0026undiscriminatedgo.MetadataUnion{\n\t\t\tOptionalMetadata: map[string]any{\n\t\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n)\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tundiscriminatedgo \"github.com/fern-api/undiscriminated-go\"\n\tundiscriminatedgoclient \"github.com/fern-api/undiscriminated-go/client\"\n)\n\nclient := undiscriminatedgoclient.NewClient()\nresponse, err := client.Union.UpdateMetadata(\n\tcontext.TODO(),\n\t\u0026undiscriminatedgo.MetadataUnion{\n\t\tOptionalMetadata: map[string]interface{}{\n\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tundiscriminatedgo \"github.com/fern-api/undiscriminated-go\"\n\tundiscriminatedgoclient \"github.com/fern-api/undiscriminated-go/client\"\n)\n\nclient := undiscriminatedgoclient.NewClient()\nresponse, err := client.Union.UpdateMetadata(\n\tcontext.TODO(),\n\t\u0026undiscriminatedgo.MetadataUnion{\n\t\tOptionalMetadata: map[string]any{\n\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t},\n)\n" } }, { diff --git a/seed/go-sdk/undiscriminated-unions/no-custom-config/union.go b/seed/go-sdk/undiscriminated-unions/no-custom-config/union.go index 321507233303..77d8d8355bf6 100644 --- a/seed/go-sdk/undiscriminated-unions/no-custom-config/union.go +++ b/seed/go-sdk/undiscriminated-unions/no-custom-config/union.go @@ -462,8 +462,8 @@ var ( ) type NamedMetadata struct { - Name string `json:"name" url:"name"` - Value map[string]interface{} `json:"value" url:"value"` + Name string `json:"name" url:"name"` + Value map[string]any `json:"value" url:"value"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -479,7 +479,7 @@ func (n *NamedMetadata) GetName() string { return n.Name } -func (n *NamedMetadata) GetValue() map[string]interface{} { +func (n *NamedMetadata) GetValue() map[string]any { if n == nil { return nil } @@ -509,7 +509,7 @@ func (n *NamedMetadata) SetName(name string) { // SetValue sets the Value field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (n *NamedMetadata) SetValue(value map[string]interface{}) { +func (n *NamedMetadata) SetValue(value map[string]any) { n.Value = value n.require(namedMetadataFieldValue) } @@ -829,7 +829,7 @@ func (n *NestedUnionRoot) Accept(visitor NestedUnionRootVisitor) error { return fmt.Errorf("type %T does not include a non-empty union type", n) } -type OptionalMetadata = map[string]interface{} +type OptionalMetadata = map[string]any // Tests that nested properties with camelCase wire names are properly // converted from snake_case Ruby keys when passed as Hash values. diff --git a/seed/go-sdk/undiscriminated-unions/no-custom-config/union_test.go b/seed/go-sdk/undiscriminated-unions/no-custom-config/union_test.go index f7ecfb2c9b78..68fbc3bf9b0f 100644 --- a/seed/go-sdk/undiscriminated-unions/no-custom-config/union_test.go +++ b/seed/go-sdk/undiscriminated-unions/no-custom-config/union_test.go @@ -464,7 +464,7 @@ func TestSettersNamedMetadata(t *testing.T) { t.Run("SetValue", func(t *testing.T) { obj := &NamedMetadata{} - var fernTestValueValue map[string]interface{} + var fernTestValueValue map[string]any obj.SetValue(fernTestValueValue) assert.Equal(t, fernTestValueValue, obj.Value) assert.NotNil(t, obj.explicitFields) @@ -500,7 +500,7 @@ func TestGettersNamedMetadata(t *testing.T) { t.Parallel() // Arrange obj := &NamedMetadata{} - var expected map[string]interface{} + var expected map[string]any obj.Value = expected // Act & Assert @@ -567,7 +567,7 @@ func TestSettersMarkExplicitNamedMetadata(t *testing.T) { t.Parallel() // Arrange obj := &NamedMetadata{} - var fernTestValueValue map[string]interface{} + var fernTestValueValue map[string]any // Act obj.SetValue(fernTestValueValue) diff --git a/seed/go-sdk/undiscriminated-unions/v0/snippet.json b/seed/go-sdk/undiscriminated-unions/v0/snippet.json index 884ea418a558..c836426bddad 100644 --- a/seed/go-sdk/undiscriminated-unions/v0/snippet.json +++ b/seed/go-sdk/undiscriminated-unions/v0/snippet.json @@ -19,7 +19,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/undiscriminated-unions/fern\"\n\tfernclient \"github.com/undiscriminated-unions/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Union.Call(\n\tcontext.TODO(),\n\t\u0026fern.Request{\n\t\tUnion: fern.NewMetadataUnionFromOptionalMetadata(\n\t\t\tmap[string]interface{}{\n\t\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t),\n\t},\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/undiscriminated-unions/fern\"\n\tfernclient \"github.com/undiscriminated-unions/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Union.Call(\n\tcontext.TODO(),\n\t\u0026fern.Request{\n\t\tUnion: fern.NewMetadataUnionFromOptionalMetadata(\n\t\t\tmap[string]any{\n\t\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\t\"key\": \"value\",\n\t\t\t\t},\n\t\t\t},\n\t\t),\n\t},\n)\n" } }, { @@ -63,7 +63,7 @@ }, "snippet": { "type": "go", - "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/undiscriminated-unions/fern\"\n\tfernclient \"github.com/undiscriminated-unions/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Union.UpdateMetadata(\n\tcontext.TODO(),\n\tfern.NewMetadataUnionFromOptionalMetadata(\n\t\tmap[string]interface{}{\n\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t),\n)\n" + "client": "import (\n\tcontext \"context\"\n\tfern \"github.com/undiscriminated-unions/fern\"\n\tfernclient \"github.com/undiscriminated-unions/fern/client\"\n)\n\nclient := fernclient.NewClient()\nresponse, err := client.Union.UpdateMetadata(\n\tcontext.TODO(),\n\tfern.NewMetadataUnionFromOptionalMetadata(\n\t\tmap[string]any{\n\t\t\t\"string\": map[string]interface{}{\n\t\t\t\t\"key\": \"value\",\n\t\t\t},\n\t\t},\n\t),\n)\n" } }, { diff --git a/seed/go-sdk/undiscriminated-unions/v0/union.go b/seed/go-sdk/undiscriminated-unions/v0/union.go index 5eb849b11a03..6a2fc5f025a3 100644 --- a/seed/go-sdk/undiscriminated-unions/v0/union.go +++ b/seed/go-sdk/undiscriminated-unions/v0/union.go @@ -498,8 +498,8 @@ var ( ) type NamedMetadata struct { - Name string `json:"name" url:"name"` - Value map[string]interface{} `json:"value,omitempty" url:"value,omitempty"` + Name string `json:"name" url:"name"` + Value map[string]any `json:"value,omitempty" url:"value,omitempty"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -515,7 +515,7 @@ func (n *NamedMetadata) GetName() string { return n.Name } -func (n *NamedMetadata) GetValue() map[string]interface{} { +func (n *NamedMetadata) GetValue() map[string]any { if n == nil { return nil } @@ -545,7 +545,7 @@ func (n *NamedMetadata) SetName(name string) { // SetValue sets the Value field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (n *NamedMetadata) SetValue(value map[string]interface{}) { +func (n *NamedMetadata) SetValue(value map[string]any) { n.Value = value n.require(namedMetadataFieldValue) } @@ -905,7 +905,7 @@ func (n *NestedUnionRoot) Accept(visitor NestedUnionRootVisitor) error { return fmt.Errorf("type %T does not include a non-empty union type", n) } -type OptionalMetadata = map[string]interface{} +type OptionalMetadata = map[string]any // Tests that nested properties with camelCase wire names are properly // converted from snake_case Ruby keys when passed as Hash values. diff --git a/seed/go-sdk/undiscriminated-unions/v0/union_test.go b/seed/go-sdk/undiscriminated-unions/v0/union_test.go index ad5511b39a81..99ffae0881ae 100644 --- a/seed/go-sdk/undiscriminated-unions/v0/union_test.go +++ b/seed/go-sdk/undiscriminated-unions/v0/union_test.go @@ -464,7 +464,7 @@ func TestSettersNamedMetadata(t *testing.T) { t.Run("SetValue", func(t *testing.T) { obj := &NamedMetadata{} - var fernTestValueValue map[string]interface{} + var fernTestValueValue map[string]any obj.SetValue(fernTestValueValue) assert.Equal(t, fernTestValueValue, obj.Value) assert.NotNil(t, obj.explicitFields) @@ -500,7 +500,7 @@ func TestGettersNamedMetadata(t *testing.T) { t.Parallel() // Arrange obj := &NamedMetadata{} - var expected map[string]interface{} + var expected map[string]any obj.Value = expected // Act & Assert @@ -567,7 +567,7 @@ func TestSettersMarkExplicitNamedMetadata(t *testing.T) { t.Parallel() // Arrange obj := &NamedMetadata{} - var fernTestValueValue map[string]interface{} + var fernTestValueValue map[string]any // Act obj.SetValue(fernTestValueValue) diff --git a/seed/go-sdk/unknown/unknown.go b/seed/go-sdk/unknown/unknown.go index 02d494b65024..1066b9ca96ed 100644 --- a/seed/go-sdk/unknown/unknown.go +++ b/seed/go-sdk/unknown/unknown.go @@ -9,14 +9,14 @@ import ( big "math/big" ) -type MyAlias = interface{} +type MyAlias = any var ( myObjectFieldUnknown = big.NewInt(1 << 0) ) type MyObject struct { - Unknown interface{} `json:"unknown" url:"unknown"` + Unknown any `json:"unknown" url:"unknown"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -25,7 +25,7 @@ type MyObject struct { rawJSON json.RawMessage } -func (m *MyObject) GetUnknown() interface{} { +func (m *MyObject) GetUnknown() any { if m == nil { return nil } @@ -48,7 +48,7 @@ func (m *MyObject) require(field *big.Int) { // SetUnknown sets the Unknown field and marks it as non-optional; // this prevents an empty or null value for this field from being omitted during serialization. -func (m *MyObject) SetUnknown(unknown interface{}) { +func (m *MyObject) SetUnknown(unknown any) { m.Unknown = unknown m.require(myObjectFieldUnknown) } diff --git a/seed/go-sdk/unknown/unknown_test.go b/seed/go-sdk/unknown/unknown_test.go index d2939c7a1e9d..41dee9db5fe8 100644 --- a/seed/go-sdk/unknown/unknown_test.go +++ b/seed/go-sdk/unknown/unknown_test.go @@ -12,7 +12,7 @@ import ( func TestSettersMyObject(t *testing.T) { t.Run("SetUnknown", func(t *testing.T) { obj := &MyObject{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any obj.SetUnknown(fernTestValueUnknown) assert.Equal(t, fernTestValueUnknown, obj.Unknown) assert.NotNil(t, obj.explicitFields) @@ -25,7 +25,7 @@ func TestGettersMyObject(t *testing.T) { t.Parallel() // Arrange obj := &MyObject{} - var expected interface{} + var expected any obj.Unknown = expected // Act & Assert @@ -51,7 +51,7 @@ func TestSettersMarkExplicitMyObject(t *testing.T) { t.Parallel() // Arrange obj := &MyObject{} - var fernTestValueUnknown interface{} + var fernTestValueUnknown any // Act obj.SetUnknown(fernTestValueUnknown) diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/reference.md b/seed/java-sdk/exhaustive/custom-client-class-name/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/reference.md +++ b/seed/java-sdk/exhaustive/custom-client-class-name/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/snippet.json b/seed/java-sdk/exhaustive/custom-client-class-name/snippet.json index 1580a9ca5de2..90409c5a244a 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/snippet.json +++ b/seed/java-sdk/exhaustive/custom-client-class-name/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.Best;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n Best client = Best\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.Best;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n Best client = Best\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.Best;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n Best client = Best\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 3515758fd1eb..437aa0f602d6 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.BestApiException; import com.seed.exhaustive.core.BestException; import com.seed.exhaustive.core.BestHttpResponse; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -569,6 +571,70 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BestException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new BestHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new BestApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new BestException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new BestException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 73fa3281f314..b597f875e747 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.BestApiException; import com.seed.exhaustive.core.BestException; import com.seed.exhaustive.core.BestHttpResponse; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -451,6 +453,56 @@ public BestHttpResponse getAndReturnWithDocumen } } + public BestHttpResponse> getAndReturnMapOfDocumentedUnknownType(Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public BestHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new BestException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new BestHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new BestApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new BestException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example25.java index b7cf6a038c1a..1a49314bb741 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example25.java @@ -1,19 +1,21 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example26.java index 3e025efa0778..1ebc699b6c71 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example26.java @@ -12,8 +12,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example27.java index d1f034274a2c..f9f9d4c2d624 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -9,7 +10,10 @@ public static void main(String[] args) { Best.builder().token("").url("https://api.fern.com").build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example28.java index a8929ddd0844..3e1581767601 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example28.java @@ -1,12 +1,15 @@ package com.snippets; import com.seed.exhaustive.Best; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example30.java index 1902fa319567..233c0764d581 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example30.java @@ -1,15 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example32.java index 22daeec8fead..4c514f83fb8f 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -10,7 +10,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example34.java index 9966f5122013..90c759fe7fab 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example34.java @@ -1,12 +1,16 @@ package com.snippets; import com.seed.exhaustive.Best; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example36.java index 3b3eb10da66c..18377b2b7e87 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example36.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example37.java index dd389063e33e..c6f6cbbbc593 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example37.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example38.java index 098bcbbe261a..2eaddde19868 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example38.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example39.java index 9f267a1ac290..378e0e64497e 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example39.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example40.java index bec4fec86a0f..1d8f3d6a3816 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example40.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example41.java index f7512bb1473a..bfa035866719 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example41.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example42.java index a4633ab7bd8e..8293ba4225bd 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example42.java @@ -1,13 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example43.java index fc1a2374c1af..ea8c6cf73cc2 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example43.java @@ -1,12 +1,13 @@ package com.snippets; import com.seed.exhaustive.Best; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example44.java index 8e7e1cdd8bca..ded79136f4b3 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example44.java @@ -1,13 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import java.util.UUID; public class Example44 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example45.java index 1bd231e1928d..67d03de6fdac 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example45.java @@ -1,12 +1,13 @@ package com.snippets; import com.seed.exhaustive.Best; +import java.util.UUID; public class Example45 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example46.java index 6aadacfd4d03..d19e63400aef 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example46.java @@ -1,13 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example47.java index 15fd0293fdf6..09fc936791ad 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example47.java @@ -1,17 +1,13 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example48.java index 40f625da2bba..de8ac92df882 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example48.java @@ -1,12 +1,17 @@ package com.snippets; import com.seed.exhaustive.Best; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example49.java index b815960af48a..83bbe4697d79 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example49.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example50.java index e44915c9af85..bdef3c88ea89 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example50.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example51.java index b29f6401a467..3c475d1cea31 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example51.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example52.java index 9eebf5e0fdbd..fbd4e100d4da 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example52.java @@ -1,44 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example54.java index 8cd2bbd18693..6ff15edda1e0 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example54.java @@ -1,17 +1,44 @@ package com.snippets; import com.seed.exhaustive.Best; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example56.java index a5259794c6ee..433bab76e851 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example56.java @@ -1,12 +1,17 @@ package com.snippets; import com.seed.exhaustive.Best; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example57.java index 2f9209955a3b..805152f03d53 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example57.java @@ -7,6 +7,6 @@ public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example58.java index 61e4f6087f7e..ab259fca2a9d 100644 --- a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example58.java @@ -1,18 +1,12 @@ package com.snippets; import com.seed.exhaustive.Best; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { Best client = Best.builder().token("").url("https://api.fern.com").build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..1119f0a875f8 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-client-class-name/src/main/java/com/snippets/Example59.java @@ -0,0 +1,18 @@ +package com.snippets; + +import com.seed.exhaustive.Best; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + Best client = + Best.builder().token("").url("https://api.fern.com").build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/custom-dependency/reference.md b/seed/java-sdk/exhaustive/custom-dependency/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/reference.md +++ b/seed/java-sdk/exhaustive/custom-dependency/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-dependency/snippet.json b/seed/java-sdk/exhaustive/custom-dependency/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/snippet.json +++ b/seed/java-sdk/exhaustive/custom-dependency/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-dependency/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/custom-error-names/reference.md b/seed/java-sdk/exhaustive/custom-error-names/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/reference.md +++ b/seed/java-sdk/exhaustive/custom-error-names/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-error-names/snippet.json b/seed/java-sdk/exhaustive/custom-error-names/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/snippet.json +++ b/seed/java-sdk/exhaustive/custom-error-names/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2995412cab1e..5c871604d2f8 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.CustomApiException; import com.seed.exhaustive.core.CustomException; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -574,6 +576,70 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new CustomException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new CustomApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally(new CustomException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new CustomException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 05f6226b2f80..b689e8a222b5 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.CustomApiException; import com.seed.exhaustive.core.CustomException; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new CustomException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new CustomApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new CustomException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-error-names/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/custom-interceptors/reference.md b/seed/java-sdk/exhaustive/custom-interceptors/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/reference.md +++ b/seed/java-sdk/exhaustive/custom-interceptors/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-interceptors/snippet.json b/seed/java-sdk/exhaustive/custom-interceptors/snippet.json index 7db312ef3e76..dda9334c8aae 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/snippet.json +++ b/seed/java-sdk/exhaustive/custom-interceptors/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example46.java index 8182e5616c34..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d40cd063d9cf 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-interceptors/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/custom-license/reference.md b/seed/java-sdk/exhaustive/custom-license/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/custom-license/reference.md +++ b/seed/java-sdk/exhaustive/custom-license/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-license/snippet.json b/seed/java-sdk/exhaustive/custom-license/snippet.json index 7db312ef3e76..dda9334c8aae 100644 --- a/seed/java-sdk/exhaustive/custom-license/snippet.json +++ b/seed/java-sdk/exhaustive/custom-license/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example46.java index 8182e5616c34..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d40cd063d9cf 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-license/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/custom-plugins/reference.md b/seed/java-sdk/exhaustive/custom-plugins/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/reference.md +++ b/seed/java-sdk/exhaustive/custom-plugins/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/custom-plugins/snippet.json b/seed/java-sdk/exhaustive/custom-plugins/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/snippet.json +++ b/seed/java-sdk/exhaustive/custom-plugins/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/custom-plugins/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/reference.md b/seed/java-sdk/exhaustive/enable-public-constructors/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/reference.md +++ b/seed/java-sdk/exhaustive/enable-public-constructors/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/snippet.json b/seed/java-sdk/exhaustive/enable-public-constructors/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/snippet.json +++ b/seed/java-sdk/exhaustive/enable-public-constructors/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/enable-public-constructors/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/flat-package-layout/reference.md b/seed/java-sdk/exhaustive/flat-package-layout/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/reference.md +++ b/seed/java-sdk/exhaustive/flat-package-layout/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/flat-package-layout/snippet.json b/seed/java-sdk/exhaustive/flat-package-layout/snippet.json index 1750223fe69d..33e36ad59151 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/snippet.json +++ b/seed/java-sdk/exhaustive/flat-package-layout/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.types.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncObjectClient.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncObjectClient.java index 2f76d07e350b..92f81f219ef2 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.types.types.ObjectWithRequiredField; import com.seed.exhaustive.types.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncRawObjectClient.java index 9684ff7cac42..03c03ecd7853 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.endpoints; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.types.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/ObjectClient.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/ObjectClient.java index 71a3ba365c0b..1660f02927f8 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/ObjectClient.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.types.types.ObjectWithRequiredField; import com.seed.exhaustive.types.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/RawObjectClient.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/RawObjectClient.java index 00931f2dc840..18e4c909d47c 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/seed/exhaustive/endpoints/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.endpoints; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.types.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example25.java index 864c07b8c577..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.types.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example26.java index 51d415645c54..24355545b91c 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example27.java index 367d8e6b5d01..19c1a884927f 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.endpoints.types.ListItemsRequest; +import com.seed.exhaustive.types.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b2e1ba0d52e7 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.endpoints.types.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example30.java index 627ee5a80de6..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.endpoints.types.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example32.java index e50d07b45c0e..3663b1313798 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.endpoints.types.GetWithPathAndQuery; +import com.seed.exhaustive.endpoints.types.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example34.java index 74f4a05b7098..d43ad4f6095b 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.endpoints.types.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example46.java index b95d5053a2d7..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.endpoints.types.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example47.java index 1a795654d881..cada7f14631b 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.types.types.Animal; -import com.seed.exhaustive.types.types.Dog; +import com.seed.exhaustive.endpoints.types.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example48.java index cd04672b875b..e6cf8e919ef9 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.types.types.Animal; +import com.seed.exhaustive.types.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example52.java index ea94e4e8f44e..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.types.PostWithObjectBody; -import com.seed.exhaustive.types.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..b882fa5151d8 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.types.PostWithObjectBody; +import com.seed.exhaustive.types.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example58.java index 44a7ff6a3a83..76733b760736 100644 --- a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.types.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..aefd85a5980f --- /dev/null +++ b/seed/java-sdk/exhaustive/flat-package-layout/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.types.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/reference.md b/seed/java-sdk/exhaustive/forward-compatible-enums/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/reference.md +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/snippet.json b/seed/java-sdk/exhaustive/forward-compatible-enums/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/snippet.json +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/forward-compatible-enums/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/reference.md b/seed/java-sdk/exhaustive/json-include-non-empty/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/reference.md +++ b/seed/java-sdk/exhaustive/json-include-non-empty/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/snippet.json b/seed/java-sdk/exhaustive/json-include-non-empty/snippet.json index e97991651cb8..14b83a1f428d 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/snippet.json +++ b/seed/java-sdk/exhaustive/json-include-non-empty/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example46.java index dcb816f2d8f8..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add(PutRequest.builder().id("id").build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d9c25320b975 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add(PutRequest.builder().id("id").build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/json-include-non-empty/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/local-files/reference.md b/seed/java-sdk/exhaustive/local-files/reference.md index e076ea7989dc..f5e12e1b27ea 100644 --- a/seed/java-sdk/exhaustive/local-files/reference.md +++ b/seed/java-sdk/exhaustive/local-files/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/local-files/snippet.json b/seed/java-sdk/exhaustive/local-files/snippet.json index f54121f477bc..991e6e4ccc13 100644 --- a/seed/java-sdk/exhaustive/local-files/snippet.json +++ b/seed/java-sdk/exhaustive/local-files/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.fern.sdk.SeedExhaustiveClient;\nimport com.fern.sdk.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.fern.sdk.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.fern.sdk.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example25.java index 30680dca7201..da73903ae211 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -12,12 +11,12 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().object().getAndReturnWithDatetimeLikeString( - ObjectWithDatetimeLikeString - .builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build() + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example26.java index 0d3533cec422..38ef9529518b 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example26.java @@ -15,8 +15,8 @@ public static void main(String[] args) { client.endpoints().object().getAndReturnWithDatetimeLikeString( ObjectWithDatetimeLikeString .builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build() ); } diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example27.java index 6151eb886227..8f10c5191759 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.endpoints.pagination.requests.ListItemsRequest; +import com.fern.sdk.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,11 +12,11 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().pagination().listItems( - ListItemsRequest + client.endpoints().object().getAndReturnWithDatetimeLikeString( + ObjectWithDatetimeLikeString .builder() - .cursor("cursor") - .limit(1) + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) .build() ); } diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example28.java index 1d5b7ebc13bd..d601f29b77a8 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import com.fern.sdk.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -10,6 +11,12 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints().pagination().listItems( + ListItemsRequest + .builder() + .cursor("cursor") + .limit(1) + .build() + ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example30.java index 806c73370f35..00fa9cf977c1 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -11,12 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithQuery( - GetWithQuery - .builder() - .query("query") - .number(1) - .build() - ); + client.endpoints().params().getWithPath("param"); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example32.java index e1ad7b53154f..c9ae97a84cca 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.fern.sdk.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -11,11 +11,11 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPathAndQuery( - "param", - GetWithPathAndQuery + client.endpoints().params().getWithQuery( + GetWithQuery .builder() .query("query") + .number(1) .build() ); } diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example34.java index e02bf239d780..bbb36d6a2807 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import com.fern.sdk.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -10,6 +11,12 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints().params().getWithPathAndQuery( + "param", + GetWithPathAndQuery + .builder() + .query("query") + .build() + ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example36.java index 0b03296e3ddd..ba233dab6fd9 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example36.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example37.java index f6c2de9ef88b..2ebd4a8ccc86 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example37.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example38.java index 96e58e9b9bef..9197f26a491d 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example38.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example39.java index 0fc6bbb643e7..b4bcbfb1fb0f 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example39.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example40.java index fdeff6130c9a..b0b55e32c05d 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example40.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example41.java index 7885d53ae840..25fbd2bd39be 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example41.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example42.java index 9d8d36483f34..d874cd362555 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -11,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example43.java index 812faa45ef3e..1ce4d47a1609 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -10,6 +11,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example44.java index 78e0970e663e..33bd12c43106 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -11,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example45.java index 097cf1256403..d50754f78be9 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -10,6 +11,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example46.java index dfa868719963..cd298f162edb 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -11,11 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add( - PutRequest - .builder() - .id("id") - .build() - ); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example47.java index 9d63da9ffe48..3be92e9c68fb 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.types.union.types.Animal; -import com.fern.sdk.resources.types.union.types.Dog; +import com.fern.sdk.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -12,14 +11,11 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().union().getAndReturnUnion( - Animal.dog( - Dog - .builder() - .name("name") - .likesToWoof(true) - .build() - ) + client.endpoints().put().add( + PutRequest + .builder() + .id("id") + .build() ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example48.java index 13fc4419a686..28ffe062e289 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import com.fern.sdk.resources.types.union.types.Animal; +import com.fern.sdk.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -10,6 +12,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints().union().getAndReturnUnion( + Animal.dog( + Dog + .builder() + .name("name") + .likesToWoof(true) + .build() + ) + ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example49.java index 0eaec411fe40..6d28a9489a50 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example49.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example50.java index 511e48a105ce..bb87ab2844d6 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example50.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example51.java index 6bcfb5ab6347..5336cc008d82 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example51.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example52.java index fd27cb75fab4..d30deca70fca 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.inlinedrequests.requests.PostWithObjectBody; -import com.fern.sdk.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -19,42 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests().postWithObjectBodyandResponse( - PostWithObjectBody - .builder() - .string("string") - .integer(1) - .nestedObject( - ObjectWithOptionalField - .builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list( - Optional.of( - Arrays.asList("list", "list") - ) - ) - .set( - new HashSet( - Arrays.asList("set") - ) - ) - .map( - new HashMap() {{ - put(1, "map"); - }} - ) - .bigint(new BigInteger("1000000")) - .build() - ) - .build() - ); + client.endpoints().urls().withUnderscores(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example54.java index c987282666f5..4e54932f331b 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import com.fern.sdk.resources.inlinedrequests.requests.PostWithObjectBody; +import com.fern.sdk.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -11,8 +19,42 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new - HashMap() {{put("key", "value"); - }}); + client.inlinedRequests().postWithObjectBodyandResponse( + PostWithObjectBody + .builder() + .string("string") + .integer(1) + .nestedObject( + ObjectWithOptionalField + .builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list( + Optional.of( + Arrays.asList("list", "list") + ) + ) + .set( + new HashSet( + Arrays.asList("set") + ) + ) + .map( + new HashMap() {{ + put(1, "map"); + }} + ) + .bigint(new BigInteger("1000000")) + .build() + ) + .build() + ); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example56.java index 691ae918ac04..5a30f114fecd 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -10,6 +11,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new + HashMap() {{put("key", "value"); + }}); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example57.java index ebcd06bbdaba..7232f2c51c1c 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example57.java @@ -10,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example58.java index 7520c0409804..24b3c3e29b6c 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.fern.sdk.SeedExhaustiveClient; -import com.fern.sdk.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -11,13 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders().getWithCustomHeader( - ReqWithHeaders - .builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build() - ); + client.noReqBody().postWithNoRequestBody(); } } \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..0ae13b16ff5e --- /dev/null +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/com/snippets/Example59.java @@ -0,0 +1,23 @@ +package com.snippets; + +import com.fern.sdk.SeedExhaustiveClient; +import com.fern.sdk.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient + .builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders().getWithCustomHeader( + ReqWithHeaders + .builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build() + ); + } +} \ No newline at end of file diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncObjectClient.java index 928851b5c924..f4ba8a6bfd9c 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncObjectClient.java @@ -14,8 +14,10 @@ import com.fern.sdk.resources.types.object.types.ObjectWithOptionalField; import com.fern.sdk.resources.types.object.types.ObjectWithRequiredField; import com.fern.sdk.resources.types.object.types.ObjectWithUnknownField; +import java.lang.Object; import java.lang.String; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -133,6 +135,16 @@ public CompletableFuture getAndReturnWithDocume return this.rawClient.getAndReturnWithDocumentedUnknownType(request, requestOptions).thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request, requestOptions).thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncRawObjectClient.java index 2d34e5f9bb59..000dd720db12 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/AsyncRawObjectClient.java @@ -5,6 +5,7 @@ package com.fern.sdk.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fern.sdk.core.ClientOptions; import com.fern.sdk.core.MediaTypes; import com.fern.sdk.core.ObjectMappers; @@ -25,6 +26,7 @@ import java.lang.Override; import java.lang.String; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -537,26 +539,16 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } - /** - * Tests that string fields containing datetime-like values are NOT reformatted. - * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" - * without being converted to "2023-08-31T14:15:22.000Z". - */ - public CompletableFuture> getAndReturnWithDatetimeLikeString( - ObjectWithDatetimeLikeString request) { - return getAndReturnWithDatetimeLikeString(request,null); + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request,null); } - /** - * Tests that string fields containing datetime-like values are NOT reformatted. - * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" - * without being converted to "2023-08-31T14:15:22.000Z". - */ - public CompletableFuture> getAndReturnWithDatetimeLikeString( - ObjectWithDatetimeLikeString request, RequestOptions requestOptions) { + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()).newBuilder() .addPathSegments("object") - .addPathSegments("get-and-return-with-datetime-like-string");if (requestOptions != null) { + .addPathSegments("get-and-return-map-of-documented-unknown-type");if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); } ); @@ -579,14 +571,14 @@ public CompletableFuture> future = new CompletableFuture<>(); + CompletableFuture>> future = new CompletableFuture<>(); client.newCall(okhttpRequest).enqueue(new Callback() { @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { try (ResponseBody responseBody = response.body()) { String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - future.complete(new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ObjectWithDatetimeLikeString.class), response)); + future.complete(new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, new TypeReference>() {}), response)); return; } Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); @@ -605,4 +597,73 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { }); return future; } - } + + /** + * Tests that string fields containing datetime-like values are NOT reformatted. + * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" + * without being converted to "2023-08-31T14:15:22.000Z". + */ + public CompletableFuture> getAndReturnWithDatetimeLikeString( + ObjectWithDatetimeLikeString request) { + return getAndReturnWithDatetimeLikeString(request,null); + } + + /** + * Tests that string fields containing datetime-like values are NOT reformatted. + * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" + * without being converted to "2023-08-31T14:15:22.000Z". + */ + public CompletableFuture> getAndReturnWithDatetimeLikeString( + ObjectWithDatetimeLikeString request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()).newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-with-datetime-like-string");if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + } ); + } + RequestBody body; + try { + body = RequestBody.create(ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } + catch(JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ObjectWithDatetimeLikeString.class), response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException("Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } + catch (IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + } diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/ObjectClient.java index 3f3dd00afdd3..2f42b44cc7f5 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/ObjectClient.java @@ -14,8 +14,10 @@ import com.fern.sdk.resources.types.object.types.ObjectWithOptionalField; import com.fern.sdk.resources.types.object.types.ObjectWithRequiredField; import com.fern.sdk.resources.types.object.types.ObjectWithUnknownField; +import java.lang.Object; import java.lang.String; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -127,6 +129,15 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( return this.rawClient.getAndReturnWithDocumentedUnknownType(request, requestOptions).body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType(Map request, + RequestOptions requestOptions) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request, requestOptions).body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/RawObjectClient.java index ed76f669329e..c8183bc8863d 100644 --- a/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/local-files/src/main/java/resources/endpoints/object/RawObjectClient.java @@ -5,6 +5,7 @@ package com.fern.sdk.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fern.sdk.core.ClientOptions; import com.fern.sdk.core.MediaTypes; import com.fern.sdk.core.ObjectMappers; @@ -24,6 +25,7 @@ import java.lang.Object; import java.lang.String; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -427,26 +429,16 @@ public SeedExhaustiveHttpResponse getAndReturnW } } - /** - * Tests that string fields containing datetime-like values are NOT reformatted. - * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" - * without being converted to "2023-08-31T14:15:22.000Z". - */ - public SeedExhaustiveHttpResponse getAndReturnWithDatetimeLikeString( - ObjectWithDatetimeLikeString request) { - return getAndReturnWithDatetimeLikeString(request,null); + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request,null); } - /** - * Tests that string fields containing datetime-like values are NOT reformatted. - * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" - * without being converted to "2023-08-31T14:15:22.000Z". - */ - public SeedExhaustiveHttpResponse getAndReturnWithDatetimeLikeString( - ObjectWithDatetimeLikeString request, RequestOptions requestOptions) { + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()).newBuilder() .addPathSegments("object") - .addPathSegments("get-and-return-with-datetime-like-string");if (requestOptions != null) { + .addPathSegments("get-and-return-map-of-documented-unknown-type");if (requestOptions != null) { requestOptions.getQueryParameters().forEach((_key, _value) -> { httpUrl.addQueryParameter(_key, _value); } ); @@ -473,7 +465,7 @@ public SeedExhaustiveHttpResponse getAndReturnWith ResponseBody responseBody = response.body(); String responseBodyString = responseBody != null ? responseBody.string() : "{}"; if (response.isSuccessful()) { - return new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ObjectWithDatetimeLikeString.class), response); + return new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, new TypeReference>() {}), response); } Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); throw new SeedExhaustiveApiException("Error with status code " + response.code(), response.code(), errorBody, response); @@ -482,4 +474,60 @@ public SeedExhaustiveHttpResponse getAndReturnWith throw new SeedExhaustiveException("Network error executing HTTP request", e); } } - } + + /** + * Tests that string fields containing datetime-like values are NOT reformatted. + * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" + * without being converted to "2023-08-31T14:15:22.000Z". + */ + public SeedExhaustiveHttpResponse getAndReturnWithDatetimeLikeString( + ObjectWithDatetimeLikeString request) { + return getAndReturnWithDatetimeLikeString(request,null); + } + + /** + * Tests that string fields containing datetime-like values are NOT reformatted. + * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" + * without being converted to "2023-08-31T14:15:22.000Z". + */ + public SeedExhaustiveHttpResponse getAndReturnWithDatetimeLikeString( + ObjectWithDatetimeLikeString request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()).newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-with-datetime-like-string");if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + } ); + } + RequestBody body; + try { + body = RequestBody.create(ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } + catch(JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>(ObjectMappers.JSON_MAPPER.readValue(responseBodyString, ObjectWithDatetimeLikeString.class), response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException("Error with status code " + response.code(), response.code(), errorBody, response); + } + catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + } diff --git a/seed/java-sdk/exhaustive/no-custom-config/reference.md b/seed/java-sdk/exhaustive/no-custom-config/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/reference.md +++ b/seed/java-sdk/exhaustive/no-custom-config/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/no-custom-config/snippet.json b/seed/java-sdk/exhaustive/no-custom-config/snippet.json index 7db312ef3e76..dda9334c8aae 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/snippet.json +++ b/seed/java-sdk/exhaustive/no-custom-config/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example46.java index 8182e5616c34..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d40cd063d9cf 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/no-custom-config/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/no-custom-config/src/test/java/com/seed/exhaustive/EndpointsObjectWireTest.java b/seed/java-sdk/exhaustive/no-custom-config/src/test/java/com/seed/exhaustive/EndpointsObjectWireTest.java index e3ff714c91b0..ea85f9de8350 100644 --- a/seed/java-sdk/exhaustive/no-custom-config/src/test/java/com/seed/exhaustive/EndpointsObjectWireTest.java +++ b/seed/java-sdk/exhaustive/no-custom-config/src/test/java/com/seed/exhaustive/EndpointsObjectWireTest.java @@ -975,6 +975,88 @@ else if (actualResponseNode.has("kind")) } } + @Test + public void testGetAndReturnMapOfDocumentedUnknownType() throws Exception { + server.enqueue(new MockResponse().setResponseCode(200).setBody("{\"string\":{\"key\":\"value\"}}")); + Map response = client.endpoints() + .object() + .getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); + RecordedRequest request = server.takeRequest(); + Assertions.assertNotNull(request); + Assertions.assertEquals("POST", request.getMethod()); + // Validate request body + String actualRequestBody = request.getBody().readUtf8(); + String expectedRequestBody = "" + "{\n" + " \"string\": {\n" + " \"key\": \"value\"\n" + " }\n" + "}"; + JsonNode actualJson = objectMapper.readTree(actualRequestBody); + JsonNode expectedJson = objectMapper.readTree(expectedRequestBody); + Assertions.assertTrue(jsonEquals(expectedJson, actualJson), "Request body structure does not match expected"); + if (actualJson.has("type") || actualJson.has("_type") || actualJson.has("kind")) { + String discriminator = null; + if (actualJson.has("type")) discriminator = actualJson.get("type").asText(); + else if (actualJson.has("_type")) + discriminator = actualJson.get("_type").asText(); + else if (actualJson.has("kind")) + discriminator = actualJson.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualJson.isNull()) { + Assertions.assertTrue( + actualJson.isObject() || actualJson.isArray() || actualJson.isValueNode(), + "request should be a valid JSON value"); + } + + if (actualJson.isArray()) { + Assertions.assertTrue(actualJson.size() >= 0, "Array should have valid size"); + } + if (actualJson.isObject()) { + Assertions.assertTrue(actualJson.size() >= 0, "Object should have valid field count"); + } + + // Validate response body + Assertions.assertNotNull(response, "Response should not be null"); + String actualResponseJson = objectMapper.writeValueAsString(response); + String expectedResponseBody = "" + "{\n" + " \"string\": {\n" + " \"key\": \"value\"\n" + " }\n" + "}"; + JsonNode actualResponseNode = objectMapper.readTree(actualResponseJson); + JsonNode expectedResponseNode = objectMapper.readTree(expectedResponseBody); + Assertions.assertTrue( + jsonEquals(expectedResponseNode, actualResponseNode), + "Response body structure does not match expected"); + if (actualResponseNode.has("type") || actualResponseNode.has("_type") || actualResponseNode.has("kind")) { + String discriminator = null; + if (actualResponseNode.has("type")) + discriminator = actualResponseNode.get("type").asText(); + else if (actualResponseNode.has("_type")) + discriminator = actualResponseNode.get("_type").asText(); + else if (actualResponseNode.has("kind")) + discriminator = actualResponseNode.get("kind").asText(); + Assertions.assertNotNull(discriminator, "Union type should have a discriminator field"); + Assertions.assertFalse(discriminator.isEmpty(), "Union discriminator should not be empty"); + } + + if (!actualResponseNode.isNull()) { + Assertions.assertTrue( + actualResponseNode.isObject() || actualResponseNode.isArray() || actualResponseNode.isValueNode(), + "response should be a valid JSON value"); + } + + if (actualResponseNode.isArray()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Array should have valid size"); + } + if (actualResponseNode.isObject()) { + Assertions.assertTrue(actualResponseNode.size() >= 0, "Object should have valid field count"); + } + } + @Test public void testGetAndReturnWithDatetimeLikeString() throws Exception { server.enqueue( diff --git a/seed/java-sdk/exhaustive/publish-to/reference.md b/seed/java-sdk/exhaustive/publish-to/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/publish-to/reference.md +++ b/seed/java-sdk/exhaustive/publish-to/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/publish-to/snippet.json b/seed/java-sdk/exhaustive/publish-to/snippet.json index 7db312ef3e76..dda9334c8aae 100644 --- a/seed/java-sdk/exhaustive/publish-to/snippet.json +++ b/seed/java-sdk/exhaustive/publish-to/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example46.java index 8182e5616c34..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d40cd063d9cf 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/publish-to/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/java-sdk/exhaustive/signed_publish/reference.md b/seed/java-sdk/exhaustive/signed_publish/reference.md index 69207fcd2985..78bb1dc37e27 100644 --- a/seed/java-sdk/exhaustive/signed_publish/reference.md +++ b/seed/java-sdk/exhaustive/signed_publish/reference.md @@ -1332,6 +1332,52 @@ client.endpoints().object().getAndReturnWithDocumentedUnknownType( + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request) -> Map&lt;String, Object&gt; +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```java +client.endpoints().object().getAndReturnMapOfDocumentedUnknownType( + new HashMap() {{ + put("string", new + HashMap() {{put("key", "value"); + }}); + }} +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Map` + +
+
+
+
+ +
diff --git a/seed/java-sdk/exhaustive/signed_publish/snippet.json b/seed/java-sdk/exhaustive/signed_publish/snippet.json index 7db312ef3e76..dda9334c8aae 100644 --- a/seed/java-sdk/exhaustive/signed_publish/snippet.json +++ b/seed/java-sdk/exhaustive/signed_publish/snippet.json @@ -325,6 +325,19 @@ "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport com.seed.exhaustive.resources.types.object.types.ObjectWithDocumentedUnknownType;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnWithDocumentedUnknownType(\n ObjectWithDocumentedUnknownType\n .builder()\n .documentedUnknownType(new \n HashMap() {{put(\"key\", \"value\");\n }})\n .build()\n );\n }\n}\n" } }, + { + "example_identifier": "d3bae07f", + "id": { + "method": "POST", + "path": "/object/get-and-return-map-of-documented-unknown-type", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "java", + "sync_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n", + "async_client": "package com.example.usage;\n\nimport com.seed.exhaustive.SeedExhaustiveClient;\nimport java.util.HashMap;\n\npublic class Example {\n public static void main(String[] args) {\n SeedExhaustiveClient client = SeedExhaustiveClient\n .builder()\n .token(\"\")\n .build();\n\n client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(\n new HashMap() {{\n put(\"string\", new \n HashMap() {{put(\"key\", \"value\");\n }});\n }}\n );\n }\n}\n" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java index 5ca1a1544530..8d0fd0dd6339 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; public class AsyncObjectClient { @@ -144,6 +145,17 @@ public CompletableFuture getAndReturnWithDocume .thenApply(response -> response.body()); } + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).thenApply(response -> response.body()); + } + + public CompletableFuture> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .thenApply(response -> response.body()); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java index 2bdf97ae09f8..65bf447b2bd4 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/AsyncRawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.concurrent.CompletableFuture; import okhttp3.Call; import okhttp3.Callback; @@ -582,6 +584,71 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) { return future; } + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public CompletableFuture>> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + CompletableFuture>> future = new CompletableFuture<>(); + client.newCall(okhttpRequest).enqueue(new Callback() { + @Override + public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { + try (ResponseBody responseBody = response.body()) { + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + future.complete(new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response)); + return; + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + future.completeExceptionally(new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response)); + return; + } catch (IOException e) { + future.completeExceptionally( + new SeedExhaustiveException("Network error executing HTTP request", e)); + } + } + + @Override + public void onFailure(@NotNull Call call, @NotNull IOException e) { + future.completeExceptionally(new SeedExhaustiveException("Network error executing HTTP request", e)); + } + }); + return future; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java index b1ab05f82fc4..6cf16b0a21ce 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/ObjectClient.java @@ -14,6 +14,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithRequiredField; import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.util.List; +import java.util.Map; public class ObjectClient { protected final ClientOptions clientOptions; @@ -140,6 +141,17 @@ public ObjectWithDocumentedUnknownType getAndReturnWithDocumentedUnknownType( .body(); } + public Map getAndReturnMapOfDocumentedUnknownType(Map request) { + return this.rawClient.getAndReturnMapOfDocumentedUnknownType(request).body(); + } + + public Map getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + return this.rawClient + .getAndReturnMapOfDocumentedUnknownType(request, requestOptions) + .body(); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java index 6b719b35b2a3..f2339bb4cd35 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/seed/exhaustive/resources/endpoints/object/RawObjectClient.java @@ -4,6 +4,7 @@ package com.seed.exhaustive.resources.endpoints.object; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.seed.exhaustive.core.ClientOptions; import com.seed.exhaustive.core.MediaTypes; import com.seed.exhaustive.core.ObjectMappers; @@ -21,6 +22,7 @@ import com.seed.exhaustive.resources.types.object.types.ObjectWithUnknownField; import java.io.IOException; import java.util.List; +import java.util.Map; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; @@ -455,6 +457,57 @@ public SeedExhaustiveHttpResponse getAndReturnW } } + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request) { + return getAndReturnMapOfDocumentedUnknownType(request, null); + } + + public SeedExhaustiveHttpResponse> getAndReturnMapOfDocumentedUnknownType( + Map request, RequestOptions requestOptions) { + HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) + .newBuilder() + .addPathSegments("object") + .addPathSegments("get-and-return-map-of-documented-unknown-type"); + if (requestOptions != null) { + requestOptions.getQueryParameters().forEach((_key, _value) -> { + httpUrl.addQueryParameter(_key, _value); + }); + } + RequestBody body; + try { + body = RequestBody.create( + ObjectMappers.JSON_MAPPER.writeValueAsBytes(request), MediaTypes.APPLICATION_JSON); + } catch (JsonProcessingException e) { + throw new SeedExhaustiveException("Failed to serialize request", e); + } + Request okhttpRequest = new Request.Builder() + .url(httpUrl.build()) + .method("POST", body) + .headers(Headers.of(clientOptions.headers(requestOptions))) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = clientOptions.httpClient(); + if (requestOptions != null && requestOptions.getTimeout().isPresent()) { + client = clientOptions.httpClientWithTimeout(requestOptions); + } + try (Response response = client.newCall(okhttpRequest).execute()) { + ResponseBody responseBody = response.body(); + String responseBodyString = responseBody != null ? responseBody.string() : "{}"; + if (response.isSuccessful()) { + return new SeedExhaustiveHttpResponse<>( + ObjectMappers.JSON_MAPPER.readValue( + responseBodyString, new TypeReference>() {}), + response); + } + Object errorBody = ObjectMappers.parseErrorBody(responseBodyString); + throw new SeedExhaustiveApiException( + "Error with status code " + response.code(), response.code(), errorBody, response); + } catch (IOException e) { + throw new SeedExhaustiveException("Network error executing HTTP request", e); + } + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example25.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example25.java index 990049b6b1dc..647c450adce3 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example25.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example25.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; -import java.time.OffsetDateTime; +import java.util.HashMap; public class Example25 { public static void main(String[] args) { @@ -11,11 +10,14 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .object() - .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("2023-08-31T14:15:22Z") - .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) - .build()); + client.endpoints().object().getAndReturnMapOfDocumentedUnknownType(new HashMap() { + { + put("string", new HashMap() { + { + put("key", "value"); + } + }); + } + }); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example26.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example26.java index 23a4048c1dbe..6c6b607c6c35 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example26.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example26.java @@ -14,8 +14,8 @@ public static void main(String[] args) { client.endpoints() .object() .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() - .datetimeLikeString("datetimeLikeString") - .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .datetimeLikeString("2023-08-31T14:15:22Z") + .actualDatetime(OffsetDateTime.parse("2023-08-31T14:15:22Z")) .build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example27.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example27.java index 8dfade6845c8..a8274d4c74d5 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example27.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example27.java @@ -1,7 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; +import com.seed.exhaustive.resources.types.object.types.ObjectWithDatetimeLikeString; +import java.time.OffsetDateTime; public class Example27 { public static void main(String[] args) { @@ -11,7 +12,10 @@ public static void main(String[] args) { .build(); client.endpoints() - .pagination() - .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); + .object() + .getAndReturnWithDatetimeLikeString(ObjectWithDatetimeLikeString.builder() + .datetimeLikeString("datetimeLikeString") + .actualDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example28.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example28.java index d7c5d99a471b..b01be298c912 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example28.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example28.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.pagination.requests.ListItemsRequest; public class Example28 { public static void main(String[] args) { @@ -9,6 +10,8 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().getWithPath("param"); + client.endpoints() + .pagination() + .listItems(ListItemsRequest.builder().cursor("cursor").limit(1).build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example30.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example30.java index f38afe5db4ff..6e57783c6780 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example30.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example30.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example30 { public static void main(String[] args) { @@ -10,8 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .params() - .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); + client.endpoints().params().getWithPath("param"); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example32.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example32.java index 9697487866e4..ba8c1fbb58a0 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example32.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example32.java @@ -1,7 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithQuery; public class Example32 { public static void main(String[] args) { @@ -12,7 +12,6 @@ public static void main(String[] args) { client.endpoints() .params() - .getWithPathAndQuery( - "param", GetWithPathAndQuery.builder().query("query").build()); + .getWithQuery(GetWithQuery.builder().query("query").number(1).build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example34.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example34.java index 74f4a05b7098..25ac51fdfea6 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example34.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example34.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.endpoints.params.requests.GetWithPathAndQuery; public class Example34 { public static void main(String[] args) { @@ -9,6 +10,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().modifyWithPath("param", "string"); + client.endpoints() + .params() + .getWithPathAndQuery( + "param", GetWithPathAndQuery.builder().query("query").build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example36.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example36.java index 2191bbd4ebdd..a764a95f98a1 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example36.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example36.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); + client.endpoints().params().modifyWithPath("param", "string"); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example37.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example37.java index dd9cf5a7004e..f73fbaa312e1 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example37.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example37.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnString("string"); + client.endpoints().params().uploadWithPath("upload-path", "".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example38.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example38.java index 5d0b3426eba8..42efde4dccf2 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example38.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example38.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnInt(1); + client.endpoints().primitive().getAndReturnString("string"); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example39.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example39.java index d8775873bed0..7bb52bf95a3c 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example39.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example39.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnLong(1000000L); + client.endpoints().primitive().getAndReturnInt(1); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example40.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example40.java index 3477c41356dc..e0fa000f9c04 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example40.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example40.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDouble(1.1); + client.endpoints().primitive().getAndReturnLong(1000000L); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example41.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example41.java index 5581a9170255..45536297cd8f 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example41.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example41.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBool(true); + client.endpoints().primitive().getAndReturnDouble(1.1); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example42.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example42.java index cd174205fc41..c3ad752f0bfc 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example42.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example42.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.time.OffsetDateTime; public class Example42 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); + client.endpoints().primitive().getAndReturnBool(true); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example43.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example43.java index a9f5f55ba45d..33a17f7f42f7 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example43.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example43.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.time.OffsetDateTime; public class Example43 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnDate("2023-01-15"); + client.endpoints().primitive().getAndReturnDatetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example44.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example44.java index 44dd0e46394c..80f22daa645d 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example44.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example44.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import java.util.UUID; public class Example44 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); + client.endpoints().primitive().getAndReturnDate("2023-01-15"); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example45.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example45.java index 7b2bb3f4ec66..05f24a763bea 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example45.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example45.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.UUID; public class Example45 { public static void main(String[] args) { @@ -9,6 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); + client.endpoints().primitive().getAndReturnUuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example46.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example46.java index 8182e5616c34..aa27c65881a5 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example46.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example46.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example46 { public static void main(String[] args) { @@ -10,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().put().add("id", PutRequest.builder().build()); + client.endpoints().primitive().getAndReturnBase64("SGVsbG8gd29ybGQh".getBytes()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example47.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example47.java index 6a32fc9bbd36..d40cd063d9cf 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example47.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example47.java @@ -1,8 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.types.union.types.Animal; -import com.seed.exhaustive.resources.types.union.types.Dog; +import com.seed.exhaustive.resources.endpoints.put.requests.PutRequest; public class Example47 { public static void main(String[] args) { @@ -11,9 +10,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints() - .union() - .getAndReturnUnion( - Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); + client.endpoints().put().add("id", PutRequest.builder().build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example48.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example48.java index cd04672b875b..1e88eee37bdd 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example48.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example48.java @@ -1,6 +1,8 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.types.union.types.Animal; +import com.seed.exhaustive.resources.types.union.types.Dog; public class Example48 { public static void main(String[] args) { @@ -9,6 +11,9 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withMixedCase(); + client.endpoints() + .union() + .getAndReturnUnion( + Animal.dog(Dog.builder().name("name").likesToWoof(true).build())); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example49.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example49.java index 8233fc38673b..875bd5f29840 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example49.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example49.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().noEndingSlash(); + client.endpoints().urls().withMixedCase(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example50.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example50.java index 560fdc953ed4..b0986fd52a55 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example50.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example50.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withEndingSlash(); + client.endpoints().urls().noEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example51.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example51.java index 294e5770a5c3..cb2b60a96954 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example51.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example51.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.endpoints().urls().withUnderscores(); + client.endpoints().urls().withEndingSlash(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example52.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example52.java index ba946529fa72..1439adbc49c0 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example52.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example52.java @@ -1,15 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; -import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; -import java.math.BigInteger; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Optional; -import java.util.UUID; public class Example52 { public static void main(String[] args) { @@ -18,29 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.inlinedRequests() - .postWithObjectBodyandResponse(PostWithObjectBody.builder() - .string("string") - .integer(1) - .nestedObject(ObjectWithOptionalField.builder() - .string("string") - .integer(1) - .long_(1000000L) - .double_(1.1) - .bool(true) - .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) - .date("2023-01-15") - .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) - .base64("SGVsbG8gd29ybGQh".getBytes()) - .list(Optional.of(Arrays.asList("list", "list"))) - .set(new HashSet(Arrays.asList("set"))) - .map(new HashMap() { - { - put(1, "map"); - } - }) - .bigint(new BigInteger("1000000")) - .build()) - .build()); + client.endpoints().urls().withUnderscores(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example54.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example54.java index 2d1eb0b277f3..a087bb36cf12 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example54.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example54.java @@ -1,7 +1,15 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.inlinedrequests.requests.PostWithObjectBody; +import com.seed.exhaustive.resources.types.object.types.ObjectWithOptionalField; +import java.math.BigInteger; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; +import java.util.HashSet; +import java.util.Optional; +import java.util.UUID; public class Example54 { public static void main(String[] args) { @@ -10,10 +18,29 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noAuth().postWithNoAuth(new HashMap() { - { - put("key", "value"); - } - }); + client.inlinedRequests() + .postWithObjectBodyandResponse(PostWithObjectBody.builder() + .string("string") + .integer(1) + .nestedObject(ObjectWithOptionalField.builder() + .string("string") + .integer(1) + .long_(1000000L) + .double_(1.1) + .bool(true) + .datetime(OffsetDateTime.parse("2024-01-15T09:30:00Z")) + .date("2023-01-15") + .uuid(UUID.fromString("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")) + .base64("SGVsbG8gd29ybGQh".getBytes()) + .list(Optional.of(Arrays.asList("list", "list"))) + .set(new HashSet(Arrays.asList("set"))) + .map(new HashMap() { + { + put(1, "map"); + } + }) + .bigint(new BigInteger("1000000")) + .build()) + .build()); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example56.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example56.java index 5ba63c5ae128..00764b23d1da 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example56.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example56.java @@ -1,6 +1,7 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; +import java.util.HashMap; public class Example56 { public static void main(String[] args) { @@ -9,6 +10,10 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().getWithNoRequestBody(); + client.noAuth().postWithNoAuth(new HashMap() { + { + put("key", "value"); + } + }); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example57.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example57.java index 7a80ae1b59c2..a1ad9b6991e8 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example57.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example57.java @@ -9,6 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.noReqBody().postWithNoRequestBody(); + client.noReqBody().getWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example58.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example58.java index 0470f8cf7eff..76733b760736 100644 --- a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example58.java +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example58.java @@ -1,7 +1,6 @@ package com.snippets; import com.seed.exhaustive.SeedExhaustiveClient; -import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; public class Example58 { public static void main(String[] args) { @@ -10,11 +9,6 @@ public static void main(String[] args) { .url("https://api.fern.com") .build(); - client.reqWithHeaders() - .getWithCustomHeader(ReqWithHeaders.builder() - .xTestServiceHeader("X-TEST-SERVICE-HEADER") - .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") - .body("string") - .build()); + client.noReqBody().postWithNoRequestBody(); } } diff --git a/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example59.java b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example59.java new file mode 100644 index 000000000000..b1eeea461176 --- /dev/null +++ b/seed/java-sdk/exhaustive/signed_publish/src/main/java/com/snippets/Example59.java @@ -0,0 +1,20 @@ +package com.snippets; + +import com.seed.exhaustive.SeedExhaustiveClient; +import com.seed.exhaustive.resources.reqwithheaders.requests.ReqWithHeaders; + +public class Example59 { + public static void main(String[] args) { + SeedExhaustiveClient client = SeedExhaustiveClient.builder() + .token("") + .url("https://api.fern.com") + .build(); + + client.reqWithHeaders() + .getWithCustomHeader(ReqWithHeaders.builder() + .xTestServiceHeader("X-TEST-SERVICE-HEADER") + .xTestEndpointHeader("X-TEST-ENDPOINT-HEADER") + .body("string") + .build()); + } +} diff --git a/seed/php-sdk/exhaustive/no-custom-config/reference.md b/seed/php-sdk/exhaustive/no-custom-config/reference.md index 0bfa48fb72cc..2379537f4b35 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/reference.md +++ b/seed/php-sdk/exhaustive/no-custom-config/reference.md @@ -1264,6 +1264,52 @@ $client->endpoints->object->getAndReturnWithDocumentedUnknownType( + + + + +
$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType($request) -> array +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType( + [ + 'string' => [ + 'key' => "value", + ], + ], +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$request:** `array` + +
+
+
+
+ +
diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/Endpoints/Object/ObjectClient.php b/seed/php-sdk/exhaustive/no-custom-config/src/Endpoints/Object/ObjectClient.php index f6e107566104..579ddf6261aa 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/Endpoints/Object/ObjectClient.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/Endpoints/Object/ObjectClient.php @@ -18,6 +18,7 @@ use Seed\Core\Json\JsonSerializer; use Seed\Types\Object\Types\ObjectWithUnknownField; use Seed\Types\Object\Types\ObjectWithDocumentedUnknownType; +use Seed\Core\Json\JsonDecoder; use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; class ObjectClient @@ -409,6 +410,50 @@ public function getAndReturnWithDocumentedUnknownType(ObjectWithDocumentedUnknow ); } + /** + * @param array $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws SeedException + * @throws SeedApiException + */ + public function getAndReturnMapOfDocumentedUnknownType(array $request, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "/object/get-and-return-map-of-documented-unknown-type", + method: HttpMethod::POST, + body: JsonSerializer::serializeArray($request, ['string' => 'mixed']), + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => 'mixed']); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new SeedException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (ClientExceptionInterface $e) { + throw new SeedException(message: $e->getMessage(), previous: $e); + } + throw new SeedApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example25/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example25/snippet.php index 41d11b4e7082..8a79ac829fd2 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example25/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example25/snippet.php @@ -3,8 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; -use DateTime; $client = new SeedClient( token: '', @@ -12,9 +10,10 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->object->getAndReturnWithDatetimeLikeString( - new ObjectWithDatetimeLikeString([ - 'datetimeLikeString' => '2023-08-31T14:15:22Z', - 'actualDatetime' => new DateTime('2023-08-31T14:15:22Z'), - ]), +$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType( + [ + 'string' => [ + 'key' => "value", + ], + ], ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example26/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example26/snippet.php index 9c774783b39c..41d11b4e7082 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example26/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example26/snippet.php @@ -14,7 +14,7 @@ ); $client->endpoints->object->getAndReturnWithDatetimeLikeString( new ObjectWithDatetimeLikeString([ - 'datetimeLikeString' => 'datetimeLikeString', - 'actualDatetime' => new DateTime('2024-01-15T09:30:00Z'), + 'datetimeLikeString' => '2023-08-31T14:15:22Z', + 'actualDatetime' => new DateTime('2023-08-31T14:15:22Z'), ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example27/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example27/snippet.php index 266aecc6a408..9c774783b39c 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example27/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example27/snippet.php @@ -3,7 +3,8 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Pagination\Requests\ListItemsRequest; +use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; +use DateTime; $client = new SeedClient( token: '', @@ -11,9 +12,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->pagination->listItems( - new ListItemsRequest([ - 'cursor' => 'cursor', - 'limit' => 1, +$client->endpoints->object->getAndReturnWithDatetimeLikeString( + new ObjectWithDatetimeLikeString([ + 'datetimeLikeString' => 'datetimeLikeString', + 'actualDatetime' => new DateTime('2024-01-15T09:30:00Z'), ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example28/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example28/snippet.php index 7294187373cd..266aecc6a408 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example28/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example28/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use Seed\Endpoints\Pagination\Requests\ListItemsRequest; $client = new SeedClient( token: '', @@ -10,6 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithPath( - 'param', +$client->endpoints->pagination->listItems( + new ListItemsRequest([ + 'cursor' => 'cursor', + 'limit' => 1, + ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example30/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example30/snippet.php index 7a19666bfadf..7294187373cd 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example30/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example30/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Params\Requests\GetWithQuery; $client = new SeedClient( token: '', @@ -11,9 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithQuery( - new GetWithQuery([ - 'query' => 'query', - 'number' => 1, - ]), +$client->endpoints->params->getWithPath( + 'param', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example32/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example32/snippet.php index 16d1eda020bb..7a19666bfadf 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example32/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example32/snippet.php @@ -3,7 +3,7 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Params\Requests\GetWithPathAndQuery; +use Seed\Endpoints\Params\Requests\GetWithQuery; $client = new SeedClient( token: '', @@ -11,9 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithPathAndQuery( - 'param', - new GetWithPathAndQuery([ +$client->endpoints->params->getWithQuery( + new GetWithQuery([ 'query' => 'query', + 'number' => 1, ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example34/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example34/snippet.php index 636246adce80..16d1eda020bb 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example34/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example34/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use Seed\Endpoints\Params\Requests\GetWithPathAndQuery; $client = new SeedClient( token: '', @@ -10,7 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->modifyWithPath( +$client->endpoints->params->getWithPathAndQuery( 'param', - 'string', + new GetWithPathAndQuery([ + 'query' => 'query', + ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example36/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example36/snippet.php index ae2372c4b0e1..636246adce80 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example36/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example36/snippet.php @@ -10,7 +10,7 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->uploadWithPath( - 'upload-path', - , +$client->endpoints->params->modifyWithPath( + 'param', + 'string', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example37/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example37/snippet.php index 0c0fa0145287..ae2372c4b0e1 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example37/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example37/snippet.php @@ -10,6 +10,7 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnString( - 'string', +$client->endpoints->params->uploadWithPath( + 'upload-path', + , ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example38/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example38/snippet.php index ee82f953084c..0c0fa0145287 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example38/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example38/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnInt( - 1, +$client->endpoints->primitive->getAndReturnString( + 'string', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example39/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example39/snippet.php index 57cf71178518..ee82f953084c 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example39/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example39/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnLong( - 1000000, +$client->endpoints->primitive->getAndReturnInt( + 1, ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example40/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example40/snippet.php index e8cdfee5a715..57cf71178518 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example40/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example40/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDouble( - 1.1, +$client->endpoints->primitive->getAndReturnLong( + 1000000, ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example41/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example41/snippet.php index 2e162ac5266a..e8cdfee5a715 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example41/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example41/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnBool( - true, +$client->endpoints->primitive->getAndReturnDouble( + 1.1, ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example42/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example42/snippet.php index 83a2ba148257..2e162ac5266a 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example42/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example42/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use DateTime; $client = new SeedClient( token: '', @@ -11,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDatetime( - new DateTime('2024-01-15T09:30:00Z'), +$client->endpoints->primitive->getAndReturnBool( + true, ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example43/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example43/snippet.php index 3c58d2e1edc1..83a2ba148257 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example43/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example43/snippet.php @@ -11,6 +11,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDate( - new DateTime('2023-01-15'), +$client->endpoints->primitive->getAndReturnDatetime( + new DateTime('2024-01-15T09:30:00Z'), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example44/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example44/snippet.php index 18cfb7bf946d..3c58d2e1edc1 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example44/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example44/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use DateTime; $client = new SeedClient( token: '', @@ -10,6 +11,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnUuid( - 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', +$client->endpoints->primitive->getAndReturnDate( + new DateTime('2023-01-15'), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example45/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example45/snippet.php index 2bbc774f833c..18cfb7bf946d 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example45/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example45/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnBase64( - 'SGVsbG8gd29ybGQh', +$client->endpoints->primitive->getAndReturnUuid( + 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example46/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example46/snippet.php index c49cc8af4b8a..2bbc774f833c 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example46/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example46/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->put->add( - 'id', +$client->endpoints->primitive->getAndReturnBase64( + 'SGVsbG8gd29ybGQh', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example47/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example47/snippet.php index a62ee99ec201..c49cc8af4b8a 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example47/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example47/snippet.php @@ -3,8 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Types\Union\Types\Animal; -use Seed\Types\Union\Types\Dog; $client = new SeedClient( token: '', @@ -12,9 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->union->getAndReturnUnion( - Animal::dog(new Dog([ - 'name' => 'name', - 'likesToWoof' => true, - ])), +$client->endpoints->put->add( + 'id', ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example48/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example48/snippet.php index a3347704fac8..a62ee99ec201 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example48/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example48/snippet.php @@ -3,6 +3,8 @@ namespace Example; use Seed\SeedClient; +use Seed\Types\Union\Types\Animal; +use Seed\Types\Union\Types\Dog; $client = new SeedClient( token: '', @@ -10,4 +12,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withMixedCase(); +$client->endpoints->union->getAndReturnUnion( + Animal::dog(new Dog([ + 'name' => 'name', + 'likesToWoof' => true, + ])), +); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example49/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example49/snippet.php index 64f8cfcd08db..a3347704fac8 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example49/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example49/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->noEndingSlash(); +$client->endpoints->urls->withMixedCase(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example50/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example50/snippet.php index 396eeda12609..64f8cfcd08db 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example50/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example50/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withEndingSlash(); +$client->endpoints->urls->noEndingSlash(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example51/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example51/snippet.php index a641c1546d94..396eeda12609 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example51/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example51/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withUnderscores(); +$client->endpoints->urls->withEndingSlash(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example52/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example52/snippet.php index 499d61eef1a7..a641c1546d94 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example52/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example52/snippet.php @@ -3,9 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\InlinedRequests\Requests\PostWithObjectBody; -use Seed\Types\Object\Types\ObjectWithOptionalField; -use DateTime; $client = new SeedClient( token: '', @@ -13,31 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->inlinedRequests->postWithObjectBodyandResponse( - new PostWithObjectBody([ - 'string' => 'string', - 'integer' => 1, - 'nestedObject' => new ObjectWithOptionalField([ - 'string' => 'string', - 'integer' => 1, - 'long' => 1000000, - 'double' => 1.1, - 'bool' => true, - 'datetime' => new DateTime('2024-01-15T09:30:00Z'), - 'date' => new DateTime('2023-01-15'), - 'uuid' => 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', - 'base64' => 'SGVsbG8gd29ybGQh', - 'list' => [ - 'list', - 'list', - ], - 'set' => [ - 'set', - ], - 'map' => [ - 1 => 'map', - ], - 'bigint' => '1000000', - ]), - ]), -); +$client->endpoints->urls->withUnderscores(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example54/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example54/snippet.php index 2e37fef3bec3..499d61eef1a7 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example54/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example54/snippet.php @@ -3,6 +3,9 @@ namespace Example; use Seed\SeedClient; +use Seed\InlinedRequests\Requests\PostWithObjectBody; +use Seed\Types\Object\Types\ObjectWithOptionalField; +use DateTime; $client = new SeedClient( token: '', @@ -10,8 +13,31 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noAuth->postWithNoAuth( - [ - 'key' => "value", - ], +$client->inlinedRequests->postWithObjectBodyandResponse( + new PostWithObjectBody([ + 'string' => 'string', + 'integer' => 1, + 'nestedObject' => new ObjectWithOptionalField([ + 'string' => 'string', + 'integer' => 1, + 'long' => 1000000, + 'double' => 1.1, + 'bool' => true, + 'datetime' => new DateTime('2024-01-15T09:30:00Z'), + 'date' => new DateTime('2023-01-15'), + 'uuid' => 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', + 'base64' => 'SGVsbG8gd29ybGQh', + 'list' => [ + 'list', + 'list', + ], + 'set' => [ + 'set', + ], + 'map' => [ + 1 => 'map', + ], + 'bigint' => '1000000', + ]), + ]), ); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example56/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example56/snippet.php index c22a9090adf8..2e37fef3bec3 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example56/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example56/snippet.php @@ -10,4 +10,8 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noReqBody->getWithNoRequestBody(); +$client->noAuth->postWithNoAuth( + [ + 'key' => "value", + ], +); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example57/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example57/snippet.php index ba387851a5c7..c22a9090adf8 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example57/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example57/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noReqBody->postWithNoRequestBody(); +$client->noReqBody->getWithNoRequestBody(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example58/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example58/snippet.php index e36d7f24d7ec..ba387851a5c7 100644 --- a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example58/snippet.php +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example58/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\ReqWithHeaders\Requests\ReqWithHeaders; $client = new SeedClient( token: '', @@ -11,10 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->reqWithHeaders->getWithCustomHeader( - new ReqWithHeaders([ - 'xTestServiceHeader' => 'X-TEST-SERVICE-HEADER', - 'xTestEndpointHeader' => 'X-TEST-ENDPOINT-HEADER', - 'body' => 'string', - ]), -); +$client->noReqBody->postWithNoRequestBody(); diff --git a/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example59/snippet.php b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example59/snippet.php new file mode 100644 index 000000000000..e36d7f24d7ec --- /dev/null +++ b/seed/php-sdk/exhaustive/no-custom-config/src/dynamic-snippets/example59/snippet.php @@ -0,0 +1,20 @@ +', + options: [ + 'baseUrl' => 'https://api.fern.com', + ], +); +$client->reqWithHeaders->getWithCustomHeader( + new ReqWithHeaders([ + 'xTestServiceHeader' => 'X-TEST-SERVICE-HEADER', + 'xTestEndpointHeader' => 'X-TEST-ENDPOINT-HEADER', + 'body' => 'string', + ]), +); diff --git a/seed/php-sdk/exhaustive/wire-tests/reference.md b/seed/php-sdk/exhaustive/wire-tests/reference.md index 0bfa48fb72cc..2379537f4b35 100644 --- a/seed/php-sdk/exhaustive/wire-tests/reference.md +++ b/seed/php-sdk/exhaustive/wire-tests/reference.md @@ -1264,6 +1264,52 @@ $client->endpoints->object->getAndReturnWithDocumentedUnknownType( + + + + +
$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType($request) -> array +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType( + [ + 'string' => [ + 'key' => "value", + ], + ], +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$request:** `array` + +
+
+
+
+ +
diff --git a/seed/php-sdk/exhaustive/wire-tests/src/Endpoints/Object/ObjectClient.php b/seed/php-sdk/exhaustive/wire-tests/src/Endpoints/Object/ObjectClient.php index f6e107566104..579ddf6261aa 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/Endpoints/Object/ObjectClient.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/Endpoints/Object/ObjectClient.php @@ -18,6 +18,7 @@ use Seed\Core\Json\JsonSerializer; use Seed\Types\Object\Types\ObjectWithUnknownField; use Seed\Types\Object\Types\ObjectWithDocumentedUnknownType; +use Seed\Core\Json\JsonDecoder; use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; class ObjectClient @@ -409,6 +410,50 @@ public function getAndReturnWithDocumentedUnknownType(ObjectWithDocumentedUnknow ); } + /** + * @param array $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return array + * @throws SeedException + * @throws SeedApiException + */ + public function getAndReturnMapOfDocumentedUnknownType(array $request, ?array $options = null): array + { + $options = array_merge($this->options, $options ?? []); + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "/object/get-and-return-map-of-documented-unknown-type", + method: HttpMethod::POST, + body: JsonSerializer::serializeArray($request, ['string' => 'mixed']), + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + return JsonDecoder::decodeArray($json, ['string' => 'mixed']); // @phpstan-ignore-line + } + } catch (JsonException $e) { + throw new SeedException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); + } catch (ClientExceptionInterface $e) { + throw new SeedException(message: $e->getMessage(), previous: $e); + } + throw new SeedApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example25/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example25/snippet.php index 41d11b4e7082..8a79ac829fd2 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example25/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example25/snippet.php @@ -3,8 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; -use DateTime; $client = new SeedClient( token: '', @@ -12,9 +10,10 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->object->getAndReturnWithDatetimeLikeString( - new ObjectWithDatetimeLikeString([ - 'datetimeLikeString' => '2023-08-31T14:15:22Z', - 'actualDatetime' => new DateTime('2023-08-31T14:15:22Z'), - ]), +$client->endpoints->object->getAndReturnMapOfDocumentedUnknownType( + [ + 'string' => [ + 'key' => "value", + ], + ], ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example26/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example26/snippet.php index 9c774783b39c..41d11b4e7082 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example26/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example26/snippet.php @@ -14,7 +14,7 @@ ); $client->endpoints->object->getAndReturnWithDatetimeLikeString( new ObjectWithDatetimeLikeString([ - 'datetimeLikeString' => 'datetimeLikeString', - 'actualDatetime' => new DateTime('2024-01-15T09:30:00Z'), + 'datetimeLikeString' => '2023-08-31T14:15:22Z', + 'actualDatetime' => new DateTime('2023-08-31T14:15:22Z'), ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example27/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example27/snippet.php index 266aecc6a408..9c774783b39c 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example27/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example27/snippet.php @@ -3,7 +3,8 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Pagination\Requests\ListItemsRequest; +use Seed\Types\Object\Types\ObjectWithDatetimeLikeString; +use DateTime; $client = new SeedClient( token: '', @@ -11,9 +12,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->pagination->listItems( - new ListItemsRequest([ - 'cursor' => 'cursor', - 'limit' => 1, +$client->endpoints->object->getAndReturnWithDatetimeLikeString( + new ObjectWithDatetimeLikeString([ + 'datetimeLikeString' => 'datetimeLikeString', + 'actualDatetime' => new DateTime('2024-01-15T09:30:00Z'), ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example28/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example28/snippet.php index 7294187373cd..266aecc6a408 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example28/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example28/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use Seed\Endpoints\Pagination\Requests\ListItemsRequest; $client = new SeedClient( token: '', @@ -10,6 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithPath( - 'param', +$client->endpoints->pagination->listItems( + new ListItemsRequest([ + 'cursor' => 'cursor', + 'limit' => 1, + ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example30/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example30/snippet.php index 7a19666bfadf..7294187373cd 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example30/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example30/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Params\Requests\GetWithQuery; $client = new SeedClient( token: '', @@ -11,9 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithQuery( - new GetWithQuery([ - 'query' => 'query', - 'number' => 1, - ]), +$client->endpoints->params->getWithPath( + 'param', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example32/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example32/snippet.php index 16d1eda020bb..7a19666bfadf 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example32/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example32/snippet.php @@ -3,7 +3,7 @@ namespace Example; use Seed\SeedClient; -use Seed\Endpoints\Params\Requests\GetWithPathAndQuery; +use Seed\Endpoints\Params\Requests\GetWithQuery; $client = new SeedClient( token: '', @@ -11,9 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->getWithPathAndQuery( - 'param', - new GetWithPathAndQuery([ +$client->endpoints->params->getWithQuery( + new GetWithQuery([ 'query' => 'query', + 'number' => 1, ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example34/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example34/snippet.php index 636246adce80..16d1eda020bb 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example34/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example34/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use Seed\Endpoints\Params\Requests\GetWithPathAndQuery; $client = new SeedClient( token: '', @@ -10,7 +11,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->modifyWithPath( +$client->endpoints->params->getWithPathAndQuery( 'param', - 'string', + new GetWithPathAndQuery([ + 'query' => 'query', + ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example36/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example36/snippet.php index ae2372c4b0e1..636246adce80 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example36/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example36/snippet.php @@ -10,7 +10,7 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->params->uploadWithPath( - 'upload-path', - , +$client->endpoints->params->modifyWithPath( + 'param', + 'string', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example37/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example37/snippet.php index 0c0fa0145287..ae2372c4b0e1 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example37/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example37/snippet.php @@ -10,6 +10,7 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnString( - 'string', +$client->endpoints->params->uploadWithPath( + 'upload-path', + , ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example38/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example38/snippet.php index ee82f953084c..0c0fa0145287 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example38/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example38/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnInt( - 1, +$client->endpoints->primitive->getAndReturnString( + 'string', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example39/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example39/snippet.php index 57cf71178518..ee82f953084c 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example39/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example39/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnLong( - 1000000, +$client->endpoints->primitive->getAndReturnInt( + 1, ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example40/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example40/snippet.php index e8cdfee5a715..57cf71178518 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example40/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example40/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDouble( - 1.1, +$client->endpoints->primitive->getAndReturnLong( + 1000000, ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example41/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example41/snippet.php index 2e162ac5266a..e8cdfee5a715 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example41/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example41/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnBool( - true, +$client->endpoints->primitive->getAndReturnDouble( + 1.1, ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example42/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example42/snippet.php index 83a2ba148257..2e162ac5266a 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example42/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example42/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use DateTime; $client = new SeedClient( token: '', @@ -11,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDatetime( - new DateTime('2024-01-15T09:30:00Z'), +$client->endpoints->primitive->getAndReturnBool( + true, ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example43/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example43/snippet.php index 3c58d2e1edc1..83a2ba148257 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example43/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example43/snippet.php @@ -11,6 +11,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnDate( - new DateTime('2023-01-15'), +$client->endpoints->primitive->getAndReturnDatetime( + new DateTime('2024-01-15T09:30:00Z'), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example44/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example44/snippet.php index 18cfb7bf946d..3c58d2e1edc1 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example44/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example44/snippet.php @@ -3,6 +3,7 @@ namespace Example; use Seed\SeedClient; +use DateTime; $client = new SeedClient( token: '', @@ -10,6 +11,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnUuid( - 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', +$client->endpoints->primitive->getAndReturnDate( + new DateTime('2023-01-15'), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example45/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example45/snippet.php index 2bbc774f833c..18cfb7bf946d 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example45/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example45/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->primitive->getAndReturnBase64( - 'SGVsbG8gd29ybGQh', +$client->endpoints->primitive->getAndReturnUuid( + 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example46/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example46/snippet.php index c49cc8af4b8a..2bbc774f833c 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example46/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example46/snippet.php @@ -10,6 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->put->add( - 'id', +$client->endpoints->primitive->getAndReturnBase64( + 'SGVsbG8gd29ybGQh', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example47/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example47/snippet.php index a62ee99ec201..c49cc8af4b8a 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example47/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example47/snippet.php @@ -3,8 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\Types\Union\Types\Animal; -use Seed\Types\Union\Types\Dog; $client = new SeedClient( token: '', @@ -12,9 +10,6 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->union->getAndReturnUnion( - Animal::dog(new Dog([ - 'name' => 'name', - 'likesToWoof' => true, - ])), +$client->endpoints->put->add( + 'id', ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example48/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example48/snippet.php index a3347704fac8..a62ee99ec201 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example48/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example48/snippet.php @@ -3,6 +3,8 @@ namespace Example; use Seed\SeedClient; +use Seed\Types\Union\Types\Animal; +use Seed\Types\Union\Types\Dog; $client = new SeedClient( token: '', @@ -10,4 +12,9 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withMixedCase(); +$client->endpoints->union->getAndReturnUnion( + Animal::dog(new Dog([ + 'name' => 'name', + 'likesToWoof' => true, + ])), +); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example49/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example49/snippet.php index 64f8cfcd08db..a3347704fac8 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example49/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example49/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->noEndingSlash(); +$client->endpoints->urls->withMixedCase(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example50/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example50/snippet.php index 396eeda12609..64f8cfcd08db 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example50/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example50/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withEndingSlash(); +$client->endpoints->urls->noEndingSlash(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example51/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example51/snippet.php index a641c1546d94..396eeda12609 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example51/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example51/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->endpoints->urls->withUnderscores(); +$client->endpoints->urls->withEndingSlash(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example52/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example52/snippet.php index 499d61eef1a7..a641c1546d94 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example52/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example52/snippet.php @@ -3,9 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\InlinedRequests\Requests\PostWithObjectBody; -use Seed\Types\Object\Types\ObjectWithOptionalField; -use DateTime; $client = new SeedClient( token: '', @@ -13,31 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->inlinedRequests->postWithObjectBodyandResponse( - new PostWithObjectBody([ - 'string' => 'string', - 'integer' => 1, - 'nestedObject' => new ObjectWithOptionalField([ - 'string' => 'string', - 'integer' => 1, - 'long' => 1000000, - 'double' => 1.1, - 'bool' => true, - 'datetime' => new DateTime('2024-01-15T09:30:00Z'), - 'date' => new DateTime('2023-01-15'), - 'uuid' => 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', - 'base64' => 'SGVsbG8gd29ybGQh', - 'list' => [ - 'list', - 'list', - ], - 'set' => [ - 'set', - ], - 'map' => [ - 1 => 'map', - ], - 'bigint' => '1000000', - ]), - ]), -); +$client->endpoints->urls->withUnderscores(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example54/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example54/snippet.php index 2e37fef3bec3..499d61eef1a7 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example54/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example54/snippet.php @@ -3,6 +3,9 @@ namespace Example; use Seed\SeedClient; +use Seed\InlinedRequests\Requests\PostWithObjectBody; +use Seed\Types\Object\Types\ObjectWithOptionalField; +use DateTime; $client = new SeedClient( token: '', @@ -10,8 +13,31 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noAuth->postWithNoAuth( - [ - 'key' => "value", - ], +$client->inlinedRequests->postWithObjectBodyandResponse( + new PostWithObjectBody([ + 'string' => 'string', + 'integer' => 1, + 'nestedObject' => new ObjectWithOptionalField([ + 'string' => 'string', + 'integer' => 1, + 'long' => 1000000, + 'double' => 1.1, + 'bool' => true, + 'datetime' => new DateTime('2024-01-15T09:30:00Z'), + 'date' => new DateTime('2023-01-15'), + 'uuid' => 'd5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32', + 'base64' => 'SGVsbG8gd29ybGQh', + 'list' => [ + 'list', + 'list', + ], + 'set' => [ + 'set', + ], + 'map' => [ + 1 => 'map', + ], + 'bigint' => '1000000', + ]), + ]), ); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example56/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example56/snippet.php index c22a9090adf8..2e37fef3bec3 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example56/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example56/snippet.php @@ -10,4 +10,8 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noReqBody->getWithNoRequestBody(); +$client->noAuth->postWithNoAuth( + [ + 'key' => "value", + ], +); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example57/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example57/snippet.php index ba387851a5c7..c22a9090adf8 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example57/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example57/snippet.php @@ -10,4 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->noReqBody->postWithNoRequestBody(); +$client->noReqBody->getWithNoRequestBody(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example58/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example58/snippet.php index e36d7f24d7ec..ba387851a5c7 100644 --- a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example58/snippet.php +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example58/snippet.php @@ -3,7 +3,6 @@ namespace Example; use Seed\SeedClient; -use Seed\ReqWithHeaders\Requests\ReqWithHeaders; $client = new SeedClient( token: '', @@ -11,10 +10,4 @@ 'baseUrl' => 'https://api.fern.com', ], ); -$client->reqWithHeaders->getWithCustomHeader( - new ReqWithHeaders([ - 'xTestServiceHeader' => 'X-TEST-SERVICE-HEADER', - 'xTestEndpointHeader' => 'X-TEST-ENDPOINT-HEADER', - 'body' => 'string', - ]), -); +$client->noReqBody->postWithNoRequestBody(); diff --git a/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example59/snippet.php b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example59/snippet.php new file mode 100644 index 000000000000..e36d7f24d7ec --- /dev/null +++ b/seed/php-sdk/exhaustive/wire-tests/src/dynamic-snippets/example59/snippet.php @@ -0,0 +1,20 @@ +', + options: [ + 'baseUrl' => 'https://api.fern.com', + ], +); +$client->reqWithHeaders->getWithCustomHeader( + new ReqWithHeaders([ + 'xTestServiceHeader' => 'X-TEST-SERVICE-HEADER', + 'xTestEndpointHeader' => 'X-TEST-ENDPOINT-HEADER', + 'body' => 'string', + ]), +); diff --git a/seed/php-sdk/exhaustive/wire-tests/tests/Wire/EndpointsObjectWireTest.php b/seed/php-sdk/exhaustive/wire-tests/tests/Wire/EndpointsObjectWireTest.php index ddb5bf21b466..b8bef76f1836 100644 --- a/seed/php-sdk/exhaustive/wire-tests/tests/Wire/EndpointsObjectWireTest.php +++ b/seed/php-sdk/exhaustive/wire-tests/tests/Wire/EndpointsObjectWireTest.php @@ -326,6 +326,31 @@ public function testGetAndReturnWithDocumentedUnknownType(): void { ); } + /** + */ + public function testGetAndReturnMapOfDocumentedUnknownType(): void { + $testId = 'endpoints.object.get_and_return_map_of_documented_unknown_type.0'; + $this->client->endpoints->object->getAndReturnMapOfDocumentedUnknownType( + [ + 'string' => [ + 'key' => "value", + ], + ], + [ + 'headers' => [ + 'X-Test-Id' => 'endpoints.object.get_and_return_map_of_documented_unknown_type.0', + ], + ], + ); + $this->verifyRequestCount( + $testId, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + null, + 1 + ); + } + /** */ public function testGetAndReturnWithDatetimeLikeString(): void { diff --git a/seed/php-sdk/exhaustive/wire-tests/wiremock/wiremock-mappings.json b/seed/php-sdk/exhaustive/wire-tests/wiremock/wiremock-mappings.json index 1f35f3d42f9b..a738189c02ce 100644 --- a/seed/php-sdk/exhaustive/wire-tests/wiremock/wiremock-mappings.json +++ b/seed/php-sdk/exhaustive/wire-tests/wiremock/wiremock-mappings.json @@ -649,6 +649,32 @@ } } }, + { + "id": "0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b", + "name": "getAndReturnMapOfDocumentedUnknownType - default", + "request": { + "urlPathTemplate": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST" + }, + "response": { + "status": 200, + "body": "{\n \"string\": {\n \"key\": \"value\"\n }\n}", + "headers": { + "Content-Type": "application/json" + } + }, + "uuid": "0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b", + "persistent": true, + "priority": 3, + "metadata": { + "mocklab": { + "created": { + "at": "2020-01-01T00:00:00.000Z", + "via": "SYSTEM" + } + } + } + }, { "id": "e2cc3e92-6e37-4a50-9081-23952fdd73fe", "name": "getAndReturnWithDatetimeLikeString - default", @@ -1508,6 +1534,6 @@ } ], "meta": { - "total": 54 + "total": 55 } } \ No newline at end of file diff --git a/seed/postman/exhaustive/collection.json b/seed/postman/exhaustive/collection.json index 7b97572b3c00..c490b2d865fa 100644 --- a/seed/postman/exhaustive/collection.json +++ b/seed/postman/exhaustive/collection.json @@ -2052,6 +2052,86 @@ } ] }, + { + "_type": "endpoint", + "name": "Get And Return Map Of Documented Unknown Type", + "request": { + "description": null, + "url": { + "raw": "{{baseUrl}}/object/get-and-return-map-of-documented-unknown-type", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "object", + "get-and-return-map-of-documented-unknown-type" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "type": "text", + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"string\": {\n \"key\": \"value\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "response": [ + { + "name": "Success", + "status": "OK", + "code": 200, + "originalRequest": { + "description": null, + "url": { + "raw": "{{baseUrl}}/object/get-and-return-map-of-documented-unknown-type", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "object", + "get-and-return-map-of-documented-unknown-type" + ], + "query": [], + "variable": [] + }, + "header": [ + { + "type": "text", + "key": "Content-Type", + "value": "application/json" + } + ], + "method": "POST", + "auth": null, + "body": { + "mode": "raw", + "raw": "{\n \"string\": {\n \"key\": \"value\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "description": null, + "body": "{\n \"string\": {\n \"key\": \"value\"\n }\n}", + "_postman_previewlanguage": "json" + } + ] + }, { "_type": "endpoint", "name": "Get And Return With Datetime Like String", diff --git a/seed/pydantic/alias/src/seed/alias/object.py b/seed/pydantic/alias/src/seed/alias/object.py index f759cc7aa4f9..92e7325ff2c7 100644 --- a/seed/pydantic/alias/src/seed/alias/object.py +++ b/seed/pydantic/alias/src/seed/alias/object.py @@ -11,3 +11,6 @@ ) """ Object = Type +""" +Object is an alias for a type. +""" diff --git a/seed/pydantic/alias/src/seed/alias/type_id.py b/seed/pydantic/alias/src/seed/alias/type_id.py index c5f3b3bb32eb..d01007d247b7 100644 --- a/seed/pydantic/alias/src/seed/alias/type_id.py +++ b/seed/pydantic/alias/src/seed/alias/type_id.py @@ -5,3 +5,6 @@ """ TypeId = str +""" +An alias for type IDs. +""" diff --git a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/__init__.py b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/__init__.py index bfd706c9781d..033d048b4bbf 100644 --- a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/__init__.py @@ -10,6 +10,7 @@ DocumentedUnknownType, Dog, DoubleOptional, + MapOfDocumentedUnknownType, MixedType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, @@ -36,6 +37,7 @@ "DocumentedUnknownType", "Dog", "DoubleOptional", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", diff --git a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/__init__.py b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/__init__.py index 9a47558c9aff..19b405deddc0 100644 --- a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/__init__.py @@ -8,6 +8,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ "DocumentedUnknownType", "Dog", "DoubleOptional", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", diff --git a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/__init__.py b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/__init__.py index d969d55c9bbb..7c9ee033312a 100644 --- a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/__init__.py @@ -4,6 +4,7 @@ from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional +from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -17,6 +18,7 @@ __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py +++ b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/pydantic/exhaustive/pydantic-v1/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/__init__.py b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/__init__.py index bfd706c9781d..033d048b4bbf 100644 --- a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/__init__.py @@ -10,6 +10,7 @@ DocumentedUnknownType, Dog, DoubleOptional, + MapOfDocumentedUnknownType, MixedType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, @@ -36,6 +37,7 @@ "DocumentedUnknownType", "Dog", "DoubleOptional", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", diff --git a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/__init__.py b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/__init__.py index 9a47558c9aff..19b405deddc0 100644 --- a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/__init__.py @@ -8,6 +8,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ "DocumentedUnknownType", "Dog", "DoubleOptional", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", diff --git a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/__init__.py b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/__init__.py index d969d55c9bbb..7c9ee033312a 100644 --- a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/__init__.py +++ b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/__init__.py @@ -4,6 +4,7 @@ from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional +from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -17,6 +18,7 @@ __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py +++ b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/pydantic/exhaustive/pydantic-v2/src/seed/exhaustive/resources/types/resources/object/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/pydantic/file-upload-openapi/src/seed/api/file_id.py b/seed/pydantic/file-upload-openapi/src/seed/api/file_id.py index bd87e9f6ceca..6f30b3763b28 100644 --- a/seed/pydantic/file-upload-openapi/src/seed/api/file_id.py +++ b/seed/pydantic/file-upload-openapi/src/seed/api/file_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. FileId = str +""" +The unique identifier for a File in the database +""" diff --git a/seed/pydantic/literals-unions/src/seed/literals_unions/resources/literals/literal_string.py b/seed/pydantic/literals-unions/src/seed/literals_unions/resources/literals/literal_string.py index 573525de4a6e..5f3f6384e5c3 100644 --- a/seed/pydantic/literals-unions/src/seed/literals_unions/resources/literals/literal_string.py +++ b/seed/pydantic/literals-unions/src/seed/literals_unions/resources/literals/literal_string.py @@ -3,3 +3,6 @@ import typing LiteralString = typing.Literal["literally"] +""" +A string literal. +""" diff --git a/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/nullable_user_id.py b/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/nullable_user_id.py index b770129bb6ab..72acaaa923b0 100644 --- a/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/nullable_user_id.py +++ b/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/nullable_user_id.py @@ -3,3 +3,6 @@ import typing NullableUserId = typing.Optional[str] +""" +An alias for a nullable user ID +""" diff --git a/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/optional_user_id.py b/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/optional_user_id.py index 8eb13fde68b4..6c1d26fa708a 100644 --- a/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/optional_user_id.py +++ b/seed/pydantic/nullable-optional/src/seed/nullable_optional/resources/nullable_optional/optional_user_id.py @@ -3,3 +3,6 @@ import typing OptionalUserId = typing.Optional[str] +""" +An alias for an optional user ID +""" diff --git a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/metadata.py b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/metadata.py index 9d3134f13ad8..03afb602bbef 100644 --- a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/metadata.py +++ b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/metadata.py @@ -8,3 +8,8 @@ {"name": "exampleName", "value": "exampleValue"} """ Metadata = typing.Dict[Key, str] +""" +Undiscriminated unions can act as a map key +as long as all of their values are valid keys +(i.e. do they have a valid string representation). +""" diff --git a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/name.py b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/name.py index 46548346abdc..c3c6a9ad17f2 100644 --- a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/name.py +++ b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/name.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. Name = str +""" +A name (alias for string) +""" diff --git a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/user_id.py b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/user_id.py index 15911041b772..7d8187da9e50 100644 --- a/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/user_id.py +++ b/seed/pydantic/undiscriminated-unions/src/seed/undiscriminated_unions/resources/union/user_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. UserId = str +""" +A user identifier (alias for string) +""" diff --git a/seed/python-sdk/accept-header/poetry.lock b/seed/python-sdk/accept-header/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/accept-header/poetry.lock +++ b/seed/python-sdk/accept-header/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/alias-extends/no-custom-config/poetry.lock b/seed/python-sdk/alias-extends/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/alias-extends/no-custom-config/poetry.lock +++ b/seed/python-sdk/alias-extends/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/alias-extends/no-inheritance-for-extended-models/poetry.lock b/seed/python-sdk/alias-extends/no-inheritance-for-extended-models/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/alias-extends/no-inheritance-for-extended-models/poetry.lock +++ b/seed/python-sdk/alias-extends/no-inheritance-for-extended-models/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/alias/poetry.lock b/seed/python-sdk/alias/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/alias/poetry.lock +++ b/seed/python-sdk/alias/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/alias/src/seed/types/object.py b/seed/python-sdk/alias/src/seed/types/object.py index c2e0bfbe0523..e6159e8cd7c7 100644 --- a/seed/python-sdk/alias/src/seed/types/object.py +++ b/seed/python-sdk/alias/src/seed/types/object.py @@ -11,3 +11,6 @@ ) """ Object = Type +""" +Object is an alias for a type. +""" diff --git a/seed/python-sdk/alias/src/seed/types/type_id.py b/seed/python-sdk/alias/src/seed/types/type_id.py index c5f3b3bb32eb..d01007d247b7 100644 --- a/seed/python-sdk/alias/src/seed/types/type_id.py +++ b/seed/python-sdk/alias/src/seed/types/type_id.py @@ -5,3 +5,6 @@ """ TypeId = str +""" +An alias for type IDs. +""" diff --git a/seed/python-sdk/any-auth/poetry.lock b/seed/python-sdk/any-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/any-auth/poetry.lock +++ b/seed/python-sdk/any-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/api-wide-base-path/poetry.lock b/seed/python-sdk/api-wide-base-path/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/api-wide-base-path/poetry.lock +++ b/seed/python-sdk/api-wide-base-path/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/audiences/poetry.lock b/seed/python-sdk/audiences/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/audiences/poetry.lock +++ b/seed/python-sdk/audiences/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/basic-auth-environment-variables/poetry.lock b/seed/python-sdk/basic-auth-environment-variables/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/basic-auth-environment-variables/poetry.lock +++ b/seed/python-sdk/basic-auth-environment-variables/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/basic-auth/poetry.lock b/seed/python-sdk/basic-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/basic-auth/poetry.lock +++ b/seed/python-sdk/basic-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/bearer-token-environment-variable/poetry.lock b/seed/python-sdk/bearer-token-environment-variable/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/bearer-token-environment-variable/poetry.lock +++ b/seed/python-sdk/bearer-token-environment-variable/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/bytes-download/poetry.lock b/seed/python-sdk/bytes-download/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/bytes-download/poetry.lock +++ b/seed/python-sdk/bytes-download/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/bytes-upload/poetry.lock b/seed/python-sdk/bytes-upload/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/bytes-upload/poetry.lock +++ b/seed/python-sdk/bytes-upload/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/circular-references-advanced/no-inheritance-for-extended-models/poetry.lock b/seed/python-sdk/circular-references-advanced/no-inheritance-for-extended-models/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/circular-references-advanced/no-inheritance-for-extended-models/poetry.lock +++ b/seed/python-sdk/circular-references-advanced/no-inheritance-for-extended-models/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/circular-references/no-custom-config/poetry.lock b/seed/python-sdk/circular-references/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/circular-references/no-custom-config/poetry.lock +++ b/seed/python-sdk/circular-references/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/circular-references/no-inheritance-for-extended-models/poetry.lock b/seed/python-sdk/circular-references/no-inheritance-for-extended-models/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/circular-references/no-inheritance-for-extended-models/poetry.lock +++ b/seed/python-sdk/circular-references/no-inheritance-for-extended-models/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/client-side-params/poetry.lock b/seed/python-sdk/client-side-params/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/client-side-params/poetry.lock +++ b/seed/python-sdk/client-side-params/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/content-type/poetry.lock b/seed/python-sdk/content-type/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/content-type/poetry.lock +++ b/seed/python-sdk/content-type/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/cross-package-type-names/poetry.lock b/seed/python-sdk/cross-package-type-names/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/cross-package-type-names/poetry.lock +++ b/seed/python-sdk/cross-package-type-names/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/dollar-string-examples/poetry.lock b/seed/python-sdk/dollar-string-examples/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/dollar-string-examples/poetry.lock +++ b/seed/python-sdk/dollar-string-examples/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/empty-clients/poetry.lock b/seed/python-sdk/empty-clients/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/empty-clients/poetry.lock +++ b/seed/python-sdk/empty-clients/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/endpoint-security-auth/poetry.lock b/seed/python-sdk/endpoint-security-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/endpoint-security-auth/poetry.lock +++ b/seed/python-sdk/endpoint-security-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/enum/no-custom-config/poetry.lock b/seed/python-sdk/enum/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/enum/no-custom-config/poetry.lock +++ b/seed/python-sdk/enum/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/enum/real-enum-forward-compat/poetry.lock b/seed/python-sdk/enum/real-enum-forward-compat/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/enum/real-enum-forward-compat/poetry.lock +++ b/seed/python-sdk/enum/real-enum-forward-compat/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/enum/real-enum/poetry.lock b/seed/python-sdk/enum/real-enum/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/enum/real-enum/poetry.lock +++ b/seed/python-sdk/enum/real-enum/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/enum/strenum/poetry.lock b/seed/python-sdk/enum/strenum/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/enum/strenum/poetry.lock +++ b/seed/python-sdk/enum/strenum/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/error-property/poetry.lock b/seed/python-sdk/error-property/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/error-property/poetry.lock +++ b/seed/python-sdk/error-property/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/errors/poetry.lock b/seed/python-sdk/errors/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/errors/poetry.lock +++ b/seed/python-sdk/errors/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/additional_init_exports_with_duplicates/poetry.lock b/seed/python-sdk/examples/additional_init_exports_with_duplicates/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/additional_init_exports_with_duplicates/poetry.lock +++ b/seed/python-sdk/examples/additional_init_exports_with_duplicates/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/client-filename/poetry.lock b/seed/python-sdk/examples/client-filename/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/client-filename/poetry.lock +++ b/seed/python-sdk/examples/client-filename/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/legacy-wire-tests/poetry.lock b/seed/python-sdk/examples/legacy-wire-tests/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/legacy-wire-tests/poetry.lock +++ b/seed/python-sdk/examples/legacy-wire-tests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/no-custom-config/poetry.lock b/seed/python-sdk/examples/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/no-custom-config/poetry.lock +++ b/seed/python-sdk/examples/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/omit-fern-headers/poetry.lock b/seed/python-sdk/examples/omit-fern-headers/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/omit-fern-headers/poetry.lock +++ b/seed/python-sdk/examples/omit-fern-headers/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/examples/readme/poetry.lock b/seed/python-sdk/examples/readme/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/examples/readme/poetry.lock +++ b/seed/python-sdk/examples/readme/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/additional_init_exports/poetry.lock b/seed/python-sdk/exhaustive/additional_init_exports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/poetry.lock +++ b/seed/python-sdk/exhaustive/additional_init_exports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/additional_init_exports/reference.md b/seed/python-sdk/exhaustive/additional_init_exports/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/reference.md +++ b/seed/python-sdk/exhaustive/additional_init_exports/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/additional_init_exports/snippet.json b/seed/python-sdk/exhaustive/additional_init_exports/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/snippet.json +++ b/seed/python-sdk/exhaustive/additional_init_exports/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/additional_init_exports/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/poetry.lock b/seed/python-sdk/exhaustive/aliases_with_validation/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/poetry.lock +++ b/seed/python-sdk/exhaustive/aliases_with_validation/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/reference.md b/seed/python-sdk/exhaustive/aliases_with_validation/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/reference.md +++ b/seed/python-sdk/exhaustive/aliases_with_validation/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/snippet.json b/seed/python-sdk/exhaustive/aliases_with_validation/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/snippet.json +++ b/seed/python-sdk/exhaustive/aliases_with_validation/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/raw_client.py index 88786a915fb7..8dca72a494b5 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/endpoints/object/raw_client.py @@ -13,6 +13,7 @@ from ...core.pydantic_utilities import parse_obj_as from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -445,6 +446,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -920,6 +962,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/aliases_with_validation/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/poetry.lock b/seed/python-sdk/exhaustive/aliases_without_validation/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/poetry.lock +++ b/seed/python-sdk/exhaustive/aliases_without_validation/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/reference.md b/seed/python-sdk/exhaustive/aliases_without_validation/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/reference.md +++ b/seed/python-sdk/exhaustive/aliases_without_validation/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/snippet.json b/seed/python-sdk/exhaustive/aliases_without_validation/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/snippet.json +++ b/seed/python-sdk/exhaustive/aliases_without_validation/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/raw_client.py index 02fb0422a097..6d5815072a32 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/endpoints/object/raw_client.py @@ -13,6 +13,7 @@ from ...core.request_options import RequestOptions from ...core.unchecked_base_model import construct_type from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -445,6 +446,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + construct_type( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -920,6 +962,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + construct_type( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/aliases_without_validation/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/custom-transport/poetry.lock b/seed/python-sdk/exhaustive/custom-transport/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/custom-transport/poetry.lock +++ b/seed/python-sdk/exhaustive/custom-transport/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/custom-transport/reference.md b/seed/python-sdk/exhaustive/custom-transport/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/custom-transport/reference.md +++ b/seed/python-sdk/exhaustive/custom-transport/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/custom-transport/snippet.json b/seed/python-sdk/exhaustive/custom-transport/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/custom-transport/snippet.json +++ b/seed/python-sdk/exhaustive/custom-transport/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/custom-transport/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/poetry.lock b/seed/python-sdk/exhaustive/datetime-milliseconds/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/poetry.lock +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/reference.md b/seed/python-sdk/exhaustive/datetime-milliseconds/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/reference.md +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/snippet.json b/seed/python-sdk/exhaustive/datetime-milliseconds/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/snippet.json +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/datetime-milliseconds/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/reference.md b/seed/python-sdk/exhaustive/deps_with_min_python_version/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/reference.md +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/snippet.json b/seed/python-sdk/exhaustive/deps_with_min_python_version/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/snippet.json +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/deps_with_min_python_version/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/eager-imports/poetry.lock b/seed/python-sdk/exhaustive/eager-imports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/eager-imports/poetry.lock +++ b/seed/python-sdk/exhaustive/eager-imports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/eager-imports/reference.md b/seed/python-sdk/exhaustive/eager-imports/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/eager-imports/reference.md +++ b/seed/python-sdk/exhaustive/eager-imports/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/eager-imports/snippet.json b/seed/python-sdk/exhaustive/eager-imports/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/eager-imports/snippet.json +++ b/seed/python-sdk/exhaustive/eager-imports/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/__init__.py index 8c066b9aa1b7..a4fe3104ef20 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/__init__.py @@ -8,6 +8,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -34,6 +35,7 @@ "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/__init__.py index aae6fcbfdfee..7c39f3512d1a 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/__init__.py @@ -5,6 +5,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -25,6 +26,7 @@ __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/__init__.py index d969d55c9bbb..7c9ee033312a 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/__init__.py @@ -4,6 +4,7 @@ from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional +from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -17,6 +18,7 @@ __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/eager-imports/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/extra_dependencies/reference.md b/seed/python-sdk/exhaustive/extra_dependencies/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/reference.md +++ b/seed/python-sdk/exhaustive/extra_dependencies/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/extra_dependencies/snippet.json b/seed/python-sdk/exhaustive/extra_dependencies/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/snippet.json +++ b/seed/python-sdk/exhaustive/extra_dependencies/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/poetry.lock b/seed/python-sdk/exhaustive/extra_dev_dependencies/poetry.lock index e1551de1c3f3..442911fda5cb 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/poetry.lock +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "boto3" version = "1.28.57" @@ -595,44 +606,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -874,4 +902,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "0ea2d694bf85ef3681ceebf4a7b894ee2dc741af283247b9ff2c8b728259445f" +content-hash = "91d2517a89f4f052542ad1c8ef285786eb55fca8eda502e930ca43ecc96a1904" diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/reference.md b/seed/python-sdk/exhaustive/extra_dev_dependencies/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/reference.md +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/snippet.json b/seed/python-sdk/exhaustive/extra_dev_dependencies/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/snippet.json +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/extra_dev_dependencies/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/five-second-timeout/poetry.lock b/seed/python-sdk/exhaustive/five-second-timeout/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/poetry.lock +++ b/seed/python-sdk/exhaustive/five-second-timeout/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/five-second-timeout/reference.md b/seed/python-sdk/exhaustive/five-second-timeout/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/reference.md +++ b/seed/python-sdk/exhaustive/five-second-timeout/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/five-second-timeout/snippet.json b/seed/python-sdk/exhaustive/five-second-timeout/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/snippet.json +++ b/seed/python-sdk/exhaustive/five-second-timeout/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/poetry.lock b/seed/python-sdk/exhaustive/follow_redirects_by_default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/poetry.lock +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/reference.md b/seed/python-sdk/exhaustive/follow_redirects_by_default/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/reference.md +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/snippet.json b/seed/python-sdk/exhaustive/follow_redirects_by_default/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/snippet.json +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/follow_redirects_by_default/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/import-paths/poetry.lock b/seed/python-sdk/exhaustive/import-paths/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/import-paths/poetry.lock +++ b/seed/python-sdk/exhaustive/import-paths/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/import-paths/reference.md b/seed/python-sdk/exhaustive/import-paths/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/import-paths/reference.md +++ b/seed/python-sdk/exhaustive/import-paths/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/import-paths/snippet.json b/seed/python-sdk/exhaustive/import-paths/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/import-paths/snippet.json +++ b/seed/python-sdk/exhaustive/import-paths/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/import-paths/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/import-paths/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/improved_imports/poetry.lock b/seed/python-sdk/exhaustive/improved_imports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/improved_imports/poetry.lock +++ b/seed/python-sdk/exhaustive/improved_imports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/improved_imports/reference.md b/seed/python-sdk/exhaustive/improved_imports/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/improved_imports/reference.md +++ b/seed/python-sdk/exhaustive/improved_imports/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/improved_imports/snippet.json b/seed/python-sdk/exhaustive/improved_imports/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/improved_imports/snippet.json +++ b/seed/python-sdk/exhaustive/improved_imports/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/infinite-timeout/poetry.lock b/seed/python-sdk/exhaustive/infinite-timeout/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/poetry.lock +++ b/seed/python-sdk/exhaustive/infinite-timeout/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/infinite-timeout/reference.md b/seed/python-sdk/exhaustive/infinite-timeout/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/reference.md +++ b/seed/python-sdk/exhaustive/infinite-timeout/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/infinite-timeout/snippet.json b/seed/python-sdk/exhaustive/infinite-timeout/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/snippet.json +++ b/seed/python-sdk/exhaustive/infinite-timeout/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/inline-path-params/poetry.lock b/seed/python-sdk/exhaustive/inline-path-params/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/poetry.lock +++ b/seed/python-sdk/exhaustive/inline-path-params/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/inline-path-params/reference.md b/seed/python-sdk/exhaustive/inline-path-params/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/reference.md +++ b/seed/python-sdk/exhaustive/inline-path-params/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/inline-path-params/snippet.json b/seed/python-sdk/exhaustive/inline-path-params/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/snippet.json +++ b/seed/python-sdk/exhaustive/inline-path-params/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/client.py index 70711ec60d52..d42b46d7f552 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/raw_client.py index e261cf222b82..042c6c1c561e 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/inline-path-params/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/inline_request_params/poetry.lock b/seed/python-sdk/exhaustive/inline_request_params/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/poetry.lock +++ b/seed/python-sdk/exhaustive/inline_request_params/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/inline_request_params/reference.md b/seed/python-sdk/exhaustive/inline_request_params/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/reference.md +++ b/seed/python-sdk/exhaustive/inline_request_params/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/inline_request_params/snippet.json b/seed/python-sdk/exhaustive/inline_request_params/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/snippet.json +++ b/seed/python-sdk/exhaustive/inline_request_params/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/inline_request_params/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/no-custom-config/poetry.lock b/seed/python-sdk/exhaustive/no-custom-config/poetry.lock index 40cdd76862ed..40bf9115ec45 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/poetry.lock +++ b/seed/python-sdk/exhaustive/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -546,44 +557,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -805,4 +833,4 @@ zstd = ["backports-zstd (>=1.0.0)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "01e07cf476664b0763f0e6b8d1216b89bda0c6206f3aee9855895a351ddf9b4d" +content-hash = "42b5dc4432b55ede535c33bb2fcd1c9b956967039a4689643bb86a11ab52e4cc" diff --git a/seed/python-sdk/exhaustive/no-custom-config/reference.md b/seed/python-sdk/exhaustive/no-custom-config/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/reference.md +++ b/seed/python-sdk/exhaustive/no-custom-config/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/no-custom-config/snippet.json b/seed/python-sdk/exhaustive/no-custom-config/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/snippet.json +++ b/seed/python-sdk/exhaustive/no-custom-config/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/no-custom-config/tests/wire/test_endpoints_object.py b/seed/python-sdk/exhaustive/no-custom-config/tests/wire/test_endpoints_object.py index 2f09592ea924..f75357e71fe9 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/tests/wire/test_endpoints_object.py +++ b/seed/python-sdk/exhaustive/no-custom-config/tests/wire/test_endpoints_object.py @@ -166,6 +166,16 @@ def test_endpoints_object_get_and_return_with_documented_unknown_type() -> None: verify_request_count(test_id, "POST", "/object/get-and-return-with-documented-unknown-type", None, 1) +def test_endpoints_object_get_and_return_map_of_documented_unknown_type() -> None: + """Test getAndReturnMapOfDocumentedUnknownType endpoint with WireMock""" + test_id = "endpoints.object.get_and_return_map_of_documented_unknown_type.0" + client = get_client(test_id) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + verify_request_count(test_id, "POST", "/object/get-and-return-map-of-documented-unknown-type", None, 1) + + def test_endpoints_object_get_and_return_with_datetime_like_string() -> None: """Test getAndReturnWithDatetimeLikeString endpoint with WireMock""" test_id = "endpoints.object.get_and_return_with_datetime_like_string.0" diff --git a/seed/python-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json b/seed/python-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json index c907c269bebe..c932107ed38e 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json +++ b/seed/python-sdk/exhaustive/no-custom-config/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/python-sdk/exhaustive/package-path/poetry.lock b/seed/python-sdk/exhaustive/package-path/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/package-path/poetry.lock +++ b/seed/python-sdk/exhaustive/package-path/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/package-path/reference.md b/seed/python-sdk/exhaustive/package-path/reference.md index a817a92093b4..6c6041d1f37f 100644 --- a/seed/python-sdk/exhaustive/package-path/reference.md +++ b/seed/python-sdk/exhaustive/package-path/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/package-path/snippet.json b/seed/python-sdk/exhaustive/package-path/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/package-path/snippet.json +++ b/seed/python-sdk/exhaustive/package-path/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/client.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/__init__.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/__init__.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/__init__.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/__init__.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/package-path/src/seed/matryoshka/doll/structure/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/poetry.lock b/seed/python-sdk/exhaustive/pydantic-extra-fields/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/reference.md b/seed/python-sdk/exhaustive/pydantic-extra-fields/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/snippet.json b/seed/python-sdk/exhaustive/pydantic-extra-fields/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-extra-fields/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/poetry.lock b/seed/python-sdk/exhaustive/pydantic-ignore-fields/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/reference.md b/seed/python-sdk/exhaustive/pydantic-ignore-fields/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/snippet.json b/seed/python-sdk/exhaustive/pydantic-ignore-fields/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-ignore-fields/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/poetry.lock b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/poetry.lock index 2b903075ac90..d7bc797034f6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/poetry.lock @@ -19,6 +19,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -420,44 +431,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -613,4 +641,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "3a9cf3040382d245e54d6ad6eed17d0c7bf95d196eaec0d4886313a7ec5778de" +content-hash = "3c253e67e685486b7def2ba7201f394a1e34ee8ab02e5f54550fb9ecf5156f82" diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/reference.md b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/snippet.json b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/__init__.py index 8fddcd044fa7..76e09192415d 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -35,6 +36,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -87,6 +89,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v1-with-utils/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/poetry.lock b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/poetry.lock index 2b903075ac90..d7bc797034f6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/poetry.lock @@ -19,6 +19,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -420,44 +431,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -613,4 +641,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "3a9cf3040382d245e54d6ad6eed17d0c7bf95d196eaec0d4886313a7ec5778de" +content-hash = "3c253e67e685486b7def2ba7201f394a1e34ee8ab02e5f54550fb9ecf5156f82" diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/reference.md b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/snippet.json b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..924907b22d4b --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v1-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ....core.pydantic_utilities import UniversalBaseModel +from .documented_unknown_type import DocumentedUnknownType + + +class MapOfDocumentedUnknownType(UniversalBaseModel): + """ + Tests that map value types with unknown types don't get spurious | undefined. + """ + + __root__: typing.Dict[str, DocumentedUnknownType] + + def get_as_map(self) -> typing.Dict[str, DocumentedUnknownType]: + return self.__root__ + + @staticmethod + def from_map(value: typing.Dict[str, DocumentedUnknownType]) -> MapOfDocumentedUnknownType: + return MapOfDocumentedUnknownType(__root__=value) + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/seed/python-sdk/exhaustive/pydantic-v1/poetry.lock b/seed/python-sdk/exhaustive/pydantic-v1/poetry.lock index 2b903075ac90..d7bc797034f6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-v1/poetry.lock @@ -19,6 +19,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -420,44 +431,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -613,4 +641,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "3a9cf3040382d245e54d6ad6eed17d0c7bf95d196eaec0d4886313a7ec5778de" +content-hash = "3c253e67e685486b7def2ba7201f394a1e34ee8ab02e5f54550fb9ecf5156f82" diff --git a/seed/python-sdk/exhaustive/pydantic-v1/reference.md b/seed/python-sdk/exhaustive/pydantic-v1/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-v1/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-v1/snippet.json b/seed/python-sdk/exhaustive/pydantic-v1/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-v1/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/poetry.lock b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/poetry.lock index 4a04660b5aad..dd83255982ae 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/poetry.lock +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "e0af7b75b8e9115e0f99808eeaa81d6fa4f923cd745ffc9ad721fc90dc477c89" +content-hash = "8e1beededac27e990855ef49226caa052ada38c185559f525a8dbc20e8f5bb9b" diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..c4f757e76a3d --- /dev/null +++ b/seed/python-sdk/exhaustive/pydantic-v2-wrapped/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from .documented_unknown_type import DocumentedUnknownType + + +class MapOfDocumentedUnknownType(pydantic.RootModel): + """ + Tests that map value types with unknown types don't get spurious | undefined. + """ + + root: typing.Dict[str, DocumentedUnknownType] + + def get_as_map(self) -> typing.Dict[str, DocumentedUnknownType]: + return self.root + + @staticmethod + def from_map(value: typing.Dict[str, DocumentedUnknownType]) -> MapOfDocumentedUnknownType: + return MapOfDocumentedUnknownType(root=value) + + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(frozen=True) diff --git a/seed/python-sdk/exhaustive/pyproject_extras/reference.md b/seed/python-sdk/exhaustive/pyproject_extras/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/reference.md +++ b/seed/python-sdk/exhaustive/pyproject_extras/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/pyproject_extras/snippet.json b/seed/python-sdk/exhaustive/pyproject_extras/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/snippet.json +++ b/seed/python-sdk/exhaustive/pyproject_extras/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/pyproject_extras/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/poetry.lock b/seed/python-sdk/exhaustive/skip-pydantic-validation/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/poetry.lock +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/reference.md b/seed/python-sdk/exhaustive/skip-pydantic-validation/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/reference.md +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/snippet.json b/seed/python-sdk/exhaustive/skip-pydantic-validation/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/snippet.json +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/raw_client.py index dbe729905d88..103dd08e679d 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.serialization import convert_and_respect_annotation_metadata from ...core.unchecked_base_model import construct_type from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + construct_type( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + construct_type( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/skip-pydantic-validation/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/union-utils/poetry.lock b/seed/python-sdk/exhaustive/union-utils/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/exhaustive/union-utils/poetry.lock +++ b/seed/python-sdk/exhaustive/union-utils/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/exhaustive/union-utils/reference.md b/seed/python-sdk/exhaustive/union-utils/reference.md index a2c73a426b2a..f617e70c4d72 100644 --- a/seed/python-sdk/exhaustive/union-utils/reference.md +++ b/seed/python-sdk/exhaustive/union-utils/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import SeedExhaustive + +client = SeedExhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/union-utils/snippet.json b/seed/python-sdk/exhaustive/union-utils/snippet.json index 951575022a4c..b4a00ffd22b7 100644 --- a/seed/python-sdk/exhaustive/union-utils/snippet.json +++ b/seed/python-sdk/exhaustive/union-utils/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import SeedExhaustive\n\nclient = SeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncSeedExhaustive\n\nclient = AsyncSeedExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/client.py index d0cbc78e1f3d..850f726d0f5a 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import SeedExhaustive + + client = SeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncSeedExhaustive + + client = AsyncSeedExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/union-utils/src/seed/types/__init__.py index 8fddcd044fa7..76e09192415d 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -35,6 +36,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -87,6 +89,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/poetry.lock b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/poetry.lock index 40cdd76862ed..40bf9115ec45 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/poetry.lock +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -546,44 +557,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -805,4 +833,4 @@ zstd = ["backports-zstd (>=1.0.0)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "01e07cf476664b0763f0e6b8d1216b89bda0c6206f3aee9855895a351ddf9b4d" +content-hash = "42b5dc4432b55ede535c33bb2fcd1c9b956967039a4689643bb86a11ab52e4cc" diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/reference.md b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/reference.md index 41691bef632c..9bf6a558ad19 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/reference.md +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/reference.md @@ -1641,6 +1641,66 @@ client.endpoints.object.get_and_return_with_documented_unknown_type( + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(...) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from seed import Exhaustive + +client = Exhaustive( + token="", + base_url="https://yourhost.com/path/to/api", +) + +client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={ + "string": {"key": "value"} + }, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/snippet.json b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/snippet.json index 4472f97f7724..9ed6e45dc01f 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/snippet.json +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/snippet.json @@ -313,6 +313,19 @@ "type": "python" } }, + { + "example_identifier": "default", + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "sync_client": "from seed import Exhaustive\n\nclient = Exhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\nclient.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n)\n", + "async_client": "import asyncio\n\nfrom seed import AsyncExhaustive\n\nclient = AsyncExhaustive(\n token=\"YOUR_TOKEN\",\n base_url=\"https://yourhost.com/path/to/api\",\n)\n\n\nasync def main() -> None:\n await client.endpoints.object.get_and_return_map_of_documented_unknown_type(\n request={\"string\": {\"key\": \"value\"}},\n )\n\n\nasyncio.run(main())\n", + "type": "python" + } + }, { "example_identifier": "DatetimeLikeStringExample", "id": { diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/client.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/client.py index 99f1aa0a2ff6..82cf6c0231ee 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/client.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/client.py @@ -7,6 +7,7 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ...core.request_options import RequestOptions from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -485,6 +486,38 @@ def get_and_return_with_documented_unknown_type( ) return _response.data + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + from seed import Exhaustive + + client = Exhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + """ + _response = self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + def get_and_return_with_datetime_like_string( self, *, @@ -1063,6 +1096,46 @@ async def main() -> None: ) return _response.data + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> MapOfDocumentedUnknownType: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + MapOfDocumentedUnknownType + + Examples + -------- + import asyncio + + from seed import AsyncExhaustive + + client = AsyncExhaustive( + token="YOUR_TOKEN", + base_url="https://yourhost.com/path/to/api", + ) + + + async def main() -> None: + await client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_and_return_map_of_documented_unknown_type( + request=request, request_options=request_options + ) + return _response.data + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/raw_client.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/raw_client.py index 93e1ae8db851..5faccfa1d645 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/raw_client.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/endpoints/object/raw_client.py @@ -14,6 +14,7 @@ from ...core.request_options import RequestOptions from ...core.serialization import convert_and_respect_annotation_metadata from ...types.object.types.documented_unknown_type import DocumentedUnknownType +from ...types.object.types.map_of_documented_unknown_type import MapOfDocumentedUnknownType from ...types.object.types.nested_object_with_optional_field import NestedObjectWithOptionalField from ...types.object.types.nested_object_with_required_field import NestedObjectWithRequiredField from ...types.object.types.object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -452,6 +453,47 @@ def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[MapOfDocumentedUnknownType] + """ + _response = self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + def get_and_return_with_datetime_like_string( self, *, @@ -933,6 +975,47 @@ async def get_and_return_with_documented_unknown_type( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_map_of_documented_unknown_type( + self, *, request: MapOfDocumentedUnknownType, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[MapOfDocumentedUnknownType]: + """ + Parameters + ---------- + request : MapOfDocumentedUnknownType + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[MapOfDocumentedUnknownType] + """ + _response = await self._client_wrapper.httpx_client.request( + "object/get-and-return-map-of-documented-unknown-type", + method="POST", + json=request, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + MapOfDocumentedUnknownType, + parse_obj_as( + type_=MapOfDocumentedUnknownType, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + async def get_and_return_with_datetime_like_string( self, *, diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/__init__.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/__init__.py index 8af9ea4d8d8f..ef3d0e072e8b 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/__init__.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/__init__.py @@ -12,6 +12,7 @@ from .object import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithOptionalFieldError, NestedObjectWithRequiredField, @@ -37,6 +38,7 @@ "DoubleOptional": ".object", "ErrorWithEnumBody": ".enum", "ErrorWithUnionBody": ".union", + "MapOfDocumentedUnknownType": ".object", "MixedType": ".union", "NestedObjectWithOptionalField": ".object", "NestedObjectWithOptionalFieldError": ".object", @@ -91,6 +93,7 @@ def __dir__(): "DoubleOptional", "ErrorWithEnumBody", "ErrorWithUnionBody", + "MapOfDocumentedUnknownType", "MixedType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/__init__.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/__init__.py index 32940e763da1..b4489d9a1704 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/__init__.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/__init__.py @@ -9,6 +9,7 @@ from .types import ( DocumentedUnknownType, DoubleOptional, + MapOfDocumentedUnknownType, NestedObjectWithOptionalField, NestedObjectWithRequiredField, ObjectWithDatetimeLikeString, @@ -28,6 +29,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".types", "DoubleOptional": ".types", + "MapOfDocumentedUnknownType": ".types", "NestedObjectWithOptionalField": ".types", "NestedObjectWithOptionalFieldError": ".errors", "NestedObjectWithRequiredField": ".types", @@ -68,6 +70,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithOptionalFieldError", "NestedObjectWithRequiredField", diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/__init__.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/__init__.py index 75fcf1ef7b0e..c47ab2cfabc6 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/__init__.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/__init__.py @@ -8,6 +8,7 @@ if typing.TYPE_CHECKING: from .documented_unknown_type import DocumentedUnknownType from .double_optional import DoubleOptional + from .map_of_documented_unknown_type import MapOfDocumentedUnknownType from .nested_object_with_optional_field import NestedObjectWithOptionalField from .nested_object_with_required_field import NestedObjectWithRequiredField from .object_with_datetime_like_string import ObjectWithDatetimeLikeString @@ -20,6 +21,7 @@ _dynamic_imports: typing.Dict[str, str] = { "DocumentedUnknownType": ".documented_unknown_type", "DoubleOptional": ".double_optional", + "MapOfDocumentedUnknownType": ".map_of_documented_unknown_type", "NestedObjectWithOptionalField": ".nested_object_with_optional_field", "NestedObjectWithRequiredField": ".nested_object_with_required_field", "ObjectWithDatetimeLikeString": ".object_with_datetime_like_string", @@ -56,6 +58,7 @@ def __dir__(): __all__ = [ "DocumentedUnknownType", "DoubleOptional", + "MapOfDocumentedUnknownType", "NestedObjectWithOptionalField", "NestedObjectWithRequiredField", "ObjectWithDatetimeLikeString", diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/documented_unknown_type.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/documented_unknown_type.py index 45d72cec746e..44f158029bed 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/documented_unknown_type.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/documented_unknown_type.py @@ -3,3 +3,6 @@ import typing DocumentedUnknownType = typing.Any +""" +Tests that unknown types are able to preserve their docstrings. +""" diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/map_of_documented_unknown_type.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/map_of_documented_unknown_type.py new file mode 100644 index 000000000000..9466a8fc0721 --- /dev/null +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/src/seed/types/object/types/map_of_documented_unknown_type.py @@ -0,0 +1,10 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .documented_unknown_type import DocumentedUnknownType + +MapOfDocumentedUnknownType = typing.Dict[str, DocumentedUnknownType] +""" +Tests that map value types with unknown types don't get spurious | undefined. +""" diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/wire/test_endpoints_object.py b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/wire/test_endpoints_object.py index 2f09592ea924..f75357e71fe9 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/wire/test_endpoints_object.py +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/tests/wire/test_endpoints_object.py @@ -166,6 +166,16 @@ def test_endpoints_object_get_and_return_with_documented_unknown_type() -> None: verify_request_count(test_id, "POST", "/object/get-and-return-with-documented-unknown-type", None, 1) +def test_endpoints_object_get_and_return_map_of_documented_unknown_type() -> None: + """Test getAndReturnMapOfDocumentedUnknownType endpoint with WireMock""" + test_id = "endpoints.object.get_and_return_map_of_documented_unknown_type.0" + client = get_client(test_id) + client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request={"string": {"key": "value"}}, + ) + verify_request_count(test_id, "POST", "/object/get-and-return-map-of-documented-unknown-type", None, 1) + + def test_endpoints_object_get_and_return_with_datetime_like_string() -> None: """Test getAndReturnWithDatetimeLikeString endpoint with WireMock""" test_id = "endpoints.object.get_and_return_with_datetime_like_string.0" diff --git a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/wiremock/wiremock-mappings.json b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/wiremock/wiremock-mappings.json index c907c269bebe..c932107ed38e 100644 --- a/seed/python-sdk/exhaustive/wire-tests-custom-client-name/wiremock/wiremock-mappings.json +++ b/seed/python-sdk/exhaustive/wire-tests-custom-client-name/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/python-sdk/extends/poetry.lock b/seed/python-sdk/extends/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/extends/poetry.lock +++ b/seed/python-sdk/extends/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/extra-properties/poetry.lock b/seed/python-sdk/extra-properties/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/extra-properties/poetry.lock +++ b/seed/python-sdk/extra-properties/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-download/default-chunk-size/poetry.lock b/seed/python-sdk/file-download/default-chunk-size/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-download/default-chunk-size/poetry.lock +++ b/seed/python-sdk/file-download/default-chunk-size/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-download/no-custom-config/poetry.lock b/seed/python-sdk/file-download/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-download/no-custom-config/poetry.lock +++ b/seed/python-sdk/file-download/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-upload-openapi/poetry.lock b/seed/python-sdk/file-upload-openapi/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-upload-openapi/poetry.lock +++ b/seed/python-sdk/file-upload-openapi/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-upload-openapi/src/seed/types/file_id.py b/seed/python-sdk/file-upload-openapi/src/seed/types/file_id.py index bd87e9f6ceca..6f30b3763b28 100644 --- a/seed/python-sdk/file-upload-openapi/src/seed/types/file_id.py +++ b/seed/python-sdk/file-upload-openapi/src/seed/types/file_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. FileId = str +""" +The unique identifier for a File in the database +""" diff --git a/seed/python-sdk/file-upload/exclude_types_from_init_exports/poetry.lock b/seed/python-sdk/file-upload/exclude_types_from_init_exports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-upload/exclude_types_from_init_exports/poetry.lock +++ b/seed/python-sdk/file-upload/exclude_types_from_init_exports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-upload/no-custom-config/poetry.lock b/seed/python-sdk/file-upload/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-upload/no-custom-config/poetry.lock +++ b/seed/python-sdk/file-upload/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/file-upload/use_typeddict_requests/poetry.lock b/seed/python-sdk/file-upload/use_typeddict_requests/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/file-upload/use_typeddict_requests/poetry.lock +++ b/seed/python-sdk/file-upload/use_typeddict_requests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/folders/poetry.lock b/seed/python-sdk/folders/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/folders/poetry.lock +++ b/seed/python-sdk/folders/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/header-auth-environment-variable/poetry.lock b/seed/python-sdk/header-auth-environment-variable/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/header-auth-environment-variable/poetry.lock +++ b/seed/python-sdk/header-auth-environment-variable/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/header-auth/poetry.lock b/seed/python-sdk/header-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/header-auth/poetry.lock +++ b/seed/python-sdk/header-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/http-head/poetry.lock b/seed/python-sdk/http-head/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/http-head/poetry.lock +++ b/seed/python-sdk/http-head/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/idempotency-headers/poetry.lock b/seed/python-sdk/idempotency-headers/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/idempotency-headers/poetry.lock +++ b/seed/python-sdk/idempotency-headers/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/imdb/poetry.lock b/seed/python-sdk/imdb/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/imdb/poetry.lock +++ b/seed/python-sdk/imdb/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/inferred-auth-explicit/poetry.lock b/seed/python-sdk/inferred-auth-explicit/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/inferred-auth-explicit/poetry.lock +++ b/seed/python-sdk/inferred-auth-explicit/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/inferred-auth-implicit-api-key/poetry.lock b/seed/python-sdk/inferred-auth-implicit-api-key/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/inferred-auth-implicit-api-key/poetry.lock +++ b/seed/python-sdk/inferred-auth-implicit-api-key/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/inferred-auth-implicit-no-expiry/poetry.lock b/seed/python-sdk/inferred-auth-implicit-no-expiry/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/inferred-auth-implicit-no-expiry/poetry.lock +++ b/seed/python-sdk/inferred-auth-implicit-no-expiry/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/inferred-auth-implicit-reference/poetry.lock b/seed/python-sdk/inferred-auth-implicit-reference/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/inferred-auth-implicit-reference/poetry.lock +++ b/seed/python-sdk/inferred-auth-implicit-reference/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/inferred-auth-implicit/poetry.lock b/seed/python-sdk/inferred-auth-implicit/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/inferred-auth-implicit/poetry.lock +++ b/seed/python-sdk/inferred-auth-implicit/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/license/poetry.lock b/seed/python-sdk/license/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/license/poetry.lock +++ b/seed/python-sdk/license/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/literal/no-custom-config/poetry.lock b/seed/python-sdk/literal/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/literal/no-custom-config/poetry.lock +++ b/seed/python-sdk/literal/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/literal/use_typeddict_requests/poetry.lock b/seed/python-sdk/literal/use_typeddict_requests/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/literal/use_typeddict_requests/poetry.lock +++ b/seed/python-sdk/literal/use_typeddict_requests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/literals-unions/poetry.lock b/seed/python-sdk/literals-unions/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/literals-unions/poetry.lock +++ b/seed/python-sdk/literals-unions/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/literals-unions/src/seed/literals/types/literal_string.py b/seed/python-sdk/literals-unions/src/seed/literals/types/literal_string.py index 573525de4a6e..5f3f6384e5c3 100644 --- a/seed/python-sdk/literals-unions/src/seed/literals/types/literal_string.py +++ b/seed/python-sdk/literals-unions/src/seed/literals/types/literal_string.py @@ -3,3 +3,6 @@ import typing LiteralString = typing.Literal["literally"] +""" +A string literal. +""" diff --git a/seed/python-sdk/mixed-case/poetry.lock b/seed/python-sdk/mixed-case/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/mixed-case/poetry.lock +++ b/seed/python-sdk/mixed-case/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/mixed-file-directory/exclude_types_from_init_exports/poetry.lock b/seed/python-sdk/mixed-file-directory/exclude_types_from_init_exports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/mixed-file-directory/exclude_types_from_init_exports/poetry.lock +++ b/seed/python-sdk/mixed-file-directory/exclude_types_from_init_exports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/mixed-file-directory/no-custom-config/poetry.lock b/seed/python-sdk/mixed-file-directory/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/mixed-file-directory/no-custom-config/poetry.lock +++ b/seed/python-sdk/mixed-file-directory/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/multi-line-docs/poetry.lock b/seed/python-sdk/multi-line-docs/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/multi-line-docs/poetry.lock +++ b/seed/python-sdk/multi-line-docs/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/multi-url-environment-no-default/poetry.lock b/seed/python-sdk/multi-url-environment-no-default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/multi-url-environment-no-default/poetry.lock +++ b/seed/python-sdk/multi-url-environment-no-default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/multi-url-environment/poetry.lock b/seed/python-sdk/multi-url-environment/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/multi-url-environment/poetry.lock +++ b/seed/python-sdk/multi-url-environment/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/multiple-request-bodies/poetry.lock b/seed/python-sdk/multiple-request-bodies/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/multiple-request-bodies/poetry.lock +++ b/seed/python-sdk/multiple-request-bodies/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/no-environment/poetry.lock b/seed/python-sdk/no-environment/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/no-environment/poetry.lock +++ b/seed/python-sdk/no-environment/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/no-retries/poetry.lock b/seed/python-sdk/no-retries/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/no-retries/poetry.lock +++ b/seed/python-sdk/no-retries/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/nullable-allof-extends/poetry.lock b/seed/python-sdk/nullable-allof-extends/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/nullable-allof-extends/poetry.lock +++ b/seed/python-sdk/nullable-allof-extends/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/nullable-optional/poetry.lock b/seed/python-sdk/nullable-optional/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/nullable-optional/poetry.lock +++ b/seed/python-sdk/nullable-optional/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/nullable_user_id.py b/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/nullable_user_id.py index b770129bb6ab..72acaaa923b0 100644 --- a/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/nullable_user_id.py +++ b/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/nullable_user_id.py @@ -3,3 +3,6 @@ import typing NullableUserId = typing.Optional[str] +""" +An alias for a nullable user ID +""" diff --git a/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/optional_user_id.py b/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/optional_user_id.py index 8eb13fde68b4..6c1d26fa708a 100644 --- a/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/optional_user_id.py +++ b/seed/python-sdk/nullable-optional/src/seed/nullable_optional/types/optional_user_id.py @@ -3,3 +3,6 @@ import typing OptionalUserId = typing.Optional[str] +""" +An alias for an optional user ID +""" diff --git a/seed/python-sdk/nullable-request-body/poetry.lock b/seed/python-sdk/nullable-request-body/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/nullable-request-body/poetry.lock +++ b/seed/python-sdk/nullable-request-body/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/nullable/no-custom-config/poetry.lock b/seed/python-sdk/nullable/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/nullable/no-custom-config/poetry.lock +++ b/seed/python-sdk/nullable/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/nullable/use-typeddict-requests/poetry.lock b/seed/python-sdk/nullable/use-typeddict-requests/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/nullable/use-typeddict-requests/poetry.lock +++ b/seed/python-sdk/nullable/use-typeddict-requests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-custom/poetry.lock b/seed/python-sdk/oauth-client-credentials-custom/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-custom/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-custom/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-default/poetry.lock b/seed/python-sdk/oauth-client-credentials-default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-default/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-environment-variables/poetry.lock b/seed/python-sdk/oauth-client-credentials-environment-variables/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-environment-variables/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-environment-variables/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/poetry.lock b/seed/python-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-nested-root/poetry.lock b/seed/python-sdk/oauth-client-credentials-nested-root/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-nested-root/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-nested-root/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-reference/poetry.lock b/seed/python-sdk/oauth-client-credentials-reference/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-reference/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-reference/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials-with-variables/poetry.lock b/seed/python-sdk/oauth-client-credentials-with-variables/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials-with-variables/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials-with-variables/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/oauth-client-credentials/poetry.lock b/seed/python-sdk/oauth-client-credentials/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/oauth-client-credentials/poetry.lock +++ b/seed/python-sdk/oauth-client-credentials/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/object/poetry.lock b/seed/python-sdk/object/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/object/poetry.lock +++ b/seed/python-sdk/object/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/objects-with-imports/poetry.lock b/seed/python-sdk/objects-with-imports/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/objects-with-imports/poetry.lock +++ b/seed/python-sdk/objects-with-imports/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/optional/poetry.lock b/seed/python-sdk/optional/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/optional/poetry.lock +++ b/seed/python-sdk/optional/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/package-yml/poetry.lock b/seed/python-sdk/package-yml/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/package-yml/poetry.lock +++ b/seed/python-sdk/package-yml/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/pagination-custom/poetry.lock b/seed/python-sdk/pagination-custom/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/pagination-custom/poetry.lock +++ b/seed/python-sdk/pagination-custom/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/pagination-uri-path/poetry.lock b/seed/python-sdk/pagination-uri-path/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/pagination-uri-path/poetry.lock +++ b/seed/python-sdk/pagination-uri-path/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/pagination/no-custom-config/poetry.lock b/seed/python-sdk/pagination/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/pagination/no-custom-config/poetry.lock +++ b/seed/python-sdk/pagination/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/pagination/no-inheritance-for-extended-models/poetry.lock b/seed/python-sdk/pagination/no-inheritance-for-extended-models/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/pagination/no-inheritance-for-extended-models/poetry.lock +++ b/seed/python-sdk/pagination/no-inheritance-for-extended-models/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/pagination/page-index-semantics/poetry.lock b/seed/python-sdk/pagination/page-index-semantics/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/pagination/page-index-semantics/poetry.lock +++ b/seed/python-sdk/pagination/page-index-semantics/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/path-parameters/poetry.lock b/seed/python-sdk/path-parameters/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/path-parameters/poetry.lock +++ b/seed/python-sdk/path-parameters/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/plain-text/poetry.lock b/seed/python-sdk/plain-text/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/plain-text/poetry.lock +++ b/seed/python-sdk/plain-text/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/property-access/poetry.lock b/seed/python-sdk/property-access/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/property-access/poetry.lock +++ b/seed/python-sdk/property-access/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/public-object/poetry.lock b/seed/python-sdk/public-object/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/public-object/poetry.lock +++ b/seed/python-sdk/public-object/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-backslash-escape/poetry.lock b/seed/python-sdk/python-backslash-escape/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/python-backslash-escape/poetry.lock +++ b/seed/python-sdk/python-backslash-escape/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-mypy-exclude/no-custom-config/poetry.lock b/seed/python-sdk/python-mypy-exclude/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/python-mypy-exclude/no-custom-config/poetry.lock +++ b/seed/python-sdk/python-mypy-exclude/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-mypy-exclude/with-mypy-exclude/poetry.lock b/seed/python-sdk/python-mypy-exclude/with-mypy-exclude/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/python-mypy-exclude/with-mypy-exclude/poetry.lock +++ b/seed/python-sdk/python-mypy-exclude/with-mypy-exclude/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-positional-single-property/no-custom-config/poetry.lock b/seed/python-sdk/python-positional-single-property/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/python-positional-single-property/no-custom-config/poetry.lock +++ b/seed/python-sdk/python-positional-single-property/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-positional-single-property/with-positional-constructors/poetry.lock b/seed/python-sdk/python-positional-single-property/with-positional-constructors/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/python-positional-single-property/with-positional-constructors/poetry.lock +++ b/seed/python-sdk/python-positional-single-property/with-positional-constructors/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/poetry.lock b/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/poetry.lock index 40cdd76862ed..40bf9115ec45 100644 --- a/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/poetry.lock +++ b/seed/python-sdk/python-streaming-parameter-openapi/with-wire-tests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -546,44 +557,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -805,4 +833,4 @@ zstd = ["backports-zstd (>=1.0.0)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "01e07cf476664b0763f0e6b8d1216b89bda0c6206f3aee9855895a351ddf9b4d" +content-hash = "42b5dc4432b55ede535c33bb2fcd1c9b956967039a4689643bb86a11ab52e4cc" diff --git a/seed/python-sdk/query-parameters-openapi-as-objects/no-custom-config/poetry.lock b/seed/python-sdk/query-parameters-openapi-as-objects/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/query-parameters-openapi-as-objects/no-custom-config/poetry.lock +++ b/seed/python-sdk/query-parameters-openapi-as-objects/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/query-parameters-openapi/no-custom-config/poetry.lock b/seed/python-sdk/query-parameters-openapi/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/query-parameters-openapi/no-custom-config/poetry.lock +++ b/seed/python-sdk/query-parameters-openapi/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/query-parameters/no-custom-config/poetry.lock b/seed/python-sdk/query-parameters/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/query-parameters/no-custom-config/poetry.lock +++ b/seed/python-sdk/query-parameters/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/request-parameters/poetry.lock b/seed/python-sdk/request-parameters/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/request-parameters/poetry.lock +++ b/seed/python-sdk/request-parameters/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/required-nullable/poetry.lock b/seed/python-sdk/required-nullable/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/required-nullable/poetry.lock +++ b/seed/python-sdk/required-nullable/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/reserved-keywords/poetry.lock b/seed/python-sdk/reserved-keywords/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/reserved-keywords/poetry.lock +++ b/seed/python-sdk/reserved-keywords/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/response-property/poetry.lock b/seed/python-sdk/response-property/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/response-property/poetry.lock +++ b/seed/python-sdk/response-property/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/server-sent-event-examples/poetry.lock b/seed/python-sdk/server-sent-event-examples/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/server-sent-event-examples/poetry.lock +++ b/seed/python-sdk/server-sent-event-examples/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/server-sent-events/with-wire-tests/poetry.lock b/seed/python-sdk/server-sent-events/with-wire-tests/poetry.lock index 40cdd76862ed..40bf9115ec45 100644 --- a/seed/python-sdk/server-sent-events/with-wire-tests/poetry.lock +++ b/seed/python-sdk/server-sent-events/with-wire-tests/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -546,44 +557,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -805,4 +833,4 @@ zstd = ["backports-zstd (>=1.0.0)"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "01e07cf476664b0763f0e6b8d1216b89bda0c6206f3aee9855895a351ddf9b4d" +content-hash = "42b5dc4432b55ede535c33bb2fcd1c9b956967039a4689643bb86a11ab52e4cc" diff --git a/seed/python-sdk/server-url-templating/no-custom-config/poetry.lock b/seed/python-sdk/server-url-templating/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/server-url-templating/no-custom-config/poetry.lock +++ b/seed/python-sdk/server-url-templating/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/simple-api/poetry.lock b/seed/python-sdk/simple-api/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/simple-api/poetry.lock +++ b/seed/python-sdk/simple-api/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/simple-fhir/no-inheritance-for-extended-models/poetry.lock b/seed/python-sdk/simple-fhir/no-inheritance-for-extended-models/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/simple-fhir/no-inheritance-for-extended-models/poetry.lock +++ b/seed/python-sdk/simple-fhir/no-inheritance-for-extended-models/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/single-url-environment-default/poetry.lock b/seed/python-sdk/single-url-environment-default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/single-url-environment-default/poetry.lock +++ b/seed/python-sdk/single-url-environment-default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/single-url-environment-no-default/poetry.lock b/seed/python-sdk/single-url-environment-no-default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/single-url-environment-no-default/poetry.lock +++ b/seed/python-sdk/single-url-environment-no-default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/streaming-parameter/poetry.lock b/seed/python-sdk/streaming-parameter/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/streaming-parameter/poetry.lock +++ b/seed/python-sdk/streaming-parameter/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/streaming/no-custom-config/poetry.lock b/seed/python-sdk/streaming/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/streaming/no-custom-config/poetry.lock +++ b/seed/python-sdk/streaming/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/streaming/skip-pydantic-validation/poetry.lock b/seed/python-sdk/streaming/skip-pydantic-validation/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/streaming/skip-pydantic-validation/poetry.lock +++ b/seed/python-sdk/streaming/skip-pydantic-validation/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/trace/poetry.lock b/seed/python-sdk/trace/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/trace/poetry.lock +++ b/seed/python-sdk/trace/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/undiscriminated-union-with-response-property/poetry.lock b/seed/python-sdk/undiscriminated-union-with-response-property/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/undiscriminated-union-with-response-property/poetry.lock +++ b/seed/python-sdk/undiscriminated-union-with-response-property/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/undiscriminated-unions/poetry.lock b/seed/python-sdk/undiscriminated-unions/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/undiscriminated-unions/poetry.lock +++ b/seed/python-sdk/undiscriminated-unions/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/metadata.py b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/metadata.py index 9d3134f13ad8..03afb602bbef 100644 --- a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/metadata.py +++ b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/metadata.py @@ -8,3 +8,8 @@ {"name": "exampleName", "value": "exampleValue"} """ Metadata = typing.Dict[Key, str] +""" +Undiscriminated unions can act as a map key +as long as all of their values are valid keys +(i.e. do they have a valid string representation). +""" diff --git a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/name.py b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/name.py index 46548346abdc..c3c6a9ad17f2 100644 --- a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/name.py +++ b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/name.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. Name = str +""" +A name (alias for string) +""" diff --git a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/user_id.py b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/user_id.py index 15911041b772..7d8187da9e50 100644 --- a/seed/python-sdk/undiscriminated-unions/src/seed/union/types/user_id.py +++ b/seed/python-sdk/undiscriminated-unions/src/seed/union/types/user_id.py @@ -1,3 +1,6 @@ # This file was auto-generated by Fern from our API Definition. UserId = str +""" +A user identifier (alias for string) +""" diff --git a/seed/python-sdk/unions-with-local-date/poetry.lock b/seed/python-sdk/unions-with-local-date/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/unions-with-local-date/poetry.lock +++ b/seed/python-sdk/unions-with-local-date/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/unions/no-custom-config/poetry.lock b/seed/python-sdk/unions/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/unions/no-custom-config/poetry.lock +++ b/seed/python-sdk/unions/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/unions/union-naming-v1/poetry.lock b/seed/python-sdk/unions/union-naming-v1/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/unions/union-naming-v1/poetry.lock +++ b/seed/python-sdk/unions/union-naming-v1/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/unions/union-utils/poetry.lock b/seed/python-sdk/unions/union-utils/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/unions/union-utils/poetry.lock +++ b/seed/python-sdk/unions/union-utils/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/unknown/poetry.lock b/seed/python-sdk/unknown/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/unknown/poetry.lock +++ b/seed/python-sdk/unknown/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/url-form-encoded/poetry.lock b/seed/python-sdk/url-form-encoded/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/url-form-encoded/poetry.lock +++ b/seed/python-sdk/url-form-encoded/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/validation/no-custom-config/poetry.lock b/seed/python-sdk/validation/no-custom-config/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/validation/no-custom-config/poetry.lock +++ b/seed/python-sdk/validation/no-custom-config/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/validation/with-defaults/poetry.lock b/seed/python-sdk/validation/with-defaults/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/validation/with-defaults/poetry.lock +++ b/seed/python-sdk/validation/with-defaults/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/variables/poetry.lock b/seed/python-sdk/variables/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/variables/poetry.lock +++ b/seed/python-sdk/variables/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/version-no-default/poetry.lock b/seed/python-sdk/version-no-default/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/version-no-default/poetry.lock +++ b/seed/python-sdk/version-no-default/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/version/poetry.lock b/seed/python-sdk/version/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/version/poetry.lock +++ b/seed/python-sdk/version/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/webhook-audience/poetry.lock b/seed/python-sdk/webhook-audience/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/webhook-audience/poetry.lock +++ b/seed/python-sdk/webhook-audience/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/webhooks/poetry.lock b/seed/python-sdk/webhooks/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/webhooks/poetry.lock +++ b/seed/python-sdk/webhooks/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/websocket-bearer-auth/poetry.lock b/seed/python-sdk/websocket-bearer-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/websocket-bearer-auth/poetry.lock +++ b/seed/python-sdk/websocket-bearer-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/websocket-inferred-auth/poetry.lock b/seed/python-sdk/websocket-inferred-auth/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/websocket-inferred-auth/poetry.lock +++ b/seed/python-sdk/websocket-inferred-auth/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/websocket/websocket-base/poetry.lock b/seed/python-sdk/websocket/websocket-base/poetry.lock index 408d53ca8b96..284f7273b22f 100644 --- a/seed/python-sdk/websocket/websocket-base/poetry.lock +++ b/seed/python-sdk/websocket/websocket-base/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -615,4 +643,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "93a8c8edb6ca8fb7babafba6a771bd007d1c44858ecfe1cd4ff3e0985fbcfa42" +content-hash = "f0094f12d1388a07b9db738decb335885646d4c09345fddc263a0e5162d84d25" diff --git a/seed/python-sdk/websocket/websocket-with_generated_clients-skip_validation/poetry.lock b/seed/python-sdk/websocket/websocket-with_generated_clients-skip_validation/poetry.lock index b38bd62b0917..6259b9e71015 100644 --- a/seed/python-sdk/websocket/websocket-with_generated_clients-skip_validation/poetry.lock +++ b/seed/python-sdk/websocket/websocket-with_generated_clients-skip_validation/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -685,4 +713,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "e510ee07d2d156e8cb140ab6a94945be1bb386f37cb6cb48ae29a7c6ddf42e14" +content-hash = "542957e33b82510604ffadec66c002970f4ec21ced074b1b32879bdb6d1ea143" diff --git a/seed/python-sdk/websocket/websocket-with_generated_clients/poetry.lock b/seed/python-sdk/websocket/websocket-with_generated_clients/poetry.lock index b38bd62b0917..6259b9e71015 100644 --- a/seed/python-sdk/websocket/websocket-with_generated_clients/poetry.lock +++ b/seed/python-sdk/websocket/websocket-with_generated_clients/poetry.lock @@ -30,6 +30,17 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] trio = ["trio (>=0.31.0)", "trio (>=0.32.0)"] +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "certifi" version = "2026.2.25" @@ -408,44 +419,61 @@ files = [ [package.dependencies] typing-extensions = ">=4.14.1" +[[package]] +name = "pygments" +version = "2.19.2" +description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, + {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, +] + +[package.extras] +windows-terminal = ["colorama (>=0.4.6)"] + [[package]] name = "pytest" -version = "7.4.4" +version = "8.4.2" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.9" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79"}, + {file = "pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01"}, ] [package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +colorama = {version = ">=0.4", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1", markers = "python_version < \"3.11\""} +iniconfig = ">=1" +packaging = ">=20" +pluggy = ">=1.5,<2" +pygments = ">=2.7.2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.8" +version = "1.3.0" description = "Pytest support for asyncio" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" files = [ - {file = "pytest_asyncio-0.23.8-py3-none-any.whl", hash = "sha256:50265d892689a5faefb84df80819d1ecef566eb3549cf915dfb33569359d1ce2"}, - {file = "pytest_asyncio-0.23.8.tar.gz", hash = "sha256:759b10b33a6dc61cce40a8bd5205e302978bbbcc00e279a8b61d9a6a3c82e4d3"}, + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, ] [package.dependencies] -pytest = ">=7.0.0,<9" +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} [package.extras] -docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] [[package]] @@ -685,4 +713,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "e510ee07d2d156e8cb140ab6a94945be1bb386f37cb6cb48ae29a7c6ddf42e14" +content-hash = "542957e33b82510604ffadec66c002970f4ec21ced074b1b32879bdb6d1ea143" diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example25/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example25/snippet.rb index b08444c6ecba..e6bcb7887766 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example25/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example25/snippet.rb @@ -5,7 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.object.get_and_return_with_datetime_like_string( - datetime_like_string: "2023-08-31T14:15:22Z", - actual_datetime: "2023-08-31T14:15:22Z" -) +client.endpoints.object.get_and_return_map_of_documented_unknown_type(request: {}) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example26/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example26/snippet.rb index 75af3c4ab232..b08444c6ecba 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example26/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example26/snippet.rb @@ -6,6 +6,6 @@ ) client.endpoints.object.get_and_return_with_datetime_like_string( - datetime_like_string: "datetimeLikeString", - actual_datetime: "2024-01-15T09:30:00Z" + datetime_like_string: "2023-08-31T14:15:22Z", + actual_datetime: "2023-08-31T14:15:22Z" ) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example27/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example27/snippet.rb index 096e57afa799..75af3c4ab232 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example27/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example27/snippet.rb @@ -5,7 +5,7 @@ base_url: "https://api.fern.com" ) -client.endpoints.pagination.list_items( - cursor: "cursor", - limit: 1 +client.endpoints.object.get_and_return_with_datetime_like_string( + datetime_like_string: "datetimeLikeString", + actual_datetime: "2024-01-15T09:30:00Z" ) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example28/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example28/snippet.rb index 560c97439031..096e57afa799 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example28/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example28/snippet.rb @@ -5,4 +5,7 @@ base_url: "https://api.fern.com" ) -client.endpoints.params.get_with_path(param: "param") +client.endpoints.pagination.list_items( + cursor: "cursor", + limit: 1 +) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example30/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example30/snippet.rb index 8abe8bcb05d0..560c97439031 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example30/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example30/snippet.rb @@ -5,7 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.params.get_with_query( - query: "query", - number: 1 -) +client.endpoints.params.get_with_path(param: "param") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example32/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example32/snippet.rb index f8b28ae5dc3f..8abe8bcb05d0 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example32/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example32/snippet.rb @@ -5,7 +5,7 @@ base_url: "https://api.fern.com" ) -client.endpoints.params.get_with_path_and_query( - param: "param", - query: "query" +client.endpoints.params.get_with_query( + query: "query", + number: 1 ) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example34/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example34/snippet.rb index cf2e0853eeae..f8b28ae5dc3f 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example34/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example34/snippet.rb @@ -5,7 +5,7 @@ base_url: "https://api.fern.com" ) -client.endpoints.params.modify_with_path( +client.endpoints.params.get_with_path_and_query( param: "param", - request: "string" + query: "query" ) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example36/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example36/snippet.rb index 7ad7bd86d195..cf2e0853eeae 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example36/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example36/snippet.rb @@ -5,4 +5,7 @@ base_url: "https://api.fern.com" ) -client.endpoints.params.upload_with_path(param: "upload-path") +client.endpoints.params.modify_with_path( + param: "param", + request: "string" +) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example37/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example37/snippet.rb index 89257abafb8d..7ad7bd86d195 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example37/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example37/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_string(request: "string") +client.endpoints.params.upload_with_path(param: "upload-path") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example38/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example38/snippet.rb index d88920fd87a9..89257abafb8d 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example38/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example38/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_int(request: 1) +client.endpoints.primitive.get_and_return_string(request: "string") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example39/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example39/snippet.rb index af09c38bbc97..d88920fd87a9 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example39/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example39/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_long(request: 1000000) +client.endpoints.primitive.get_and_return_int(request: 1) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example40/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example40/snippet.rb index bb5b42f5012f..af09c38bbc97 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example40/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example40/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_double(request: 1.1) +client.endpoints.primitive.get_and_return_long(request: 1000000) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example41/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example41/snippet.rb index 81dbb5086528..bb5b42f5012f 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example41/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example41/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_bool(request: true) +client.endpoints.primitive.get_and_return_double(request: 1.1) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example42/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example42/snippet.rb index 960041774890..81dbb5086528 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example42/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example42/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_datetime(request: "2024-01-15T09:30:00Z") +client.endpoints.primitive.get_and_return_bool(request: true) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example43/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example43/snippet.rb index 0cbe0bfdec01..960041774890 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example43/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example43/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_date(request: "2023-01-15") +client.endpoints.primitive.get_and_return_datetime(request: "2024-01-15T09:30:00Z") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example44/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example44/snippet.rb index fa30420418e5..0cbe0bfdec01 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example44/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example44/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_uuid(request: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") +client.endpoints.primitive.get_and_return_date(request: "2023-01-15") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example45/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example45/snippet.rb index 3283b72cd541..fa30420418e5 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example45/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example45/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.primitive.get_and_return_base_64(request: "SGVsbG8gd29ybGQh") +client.endpoints.primitive.get_and_return_uuid(request: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example46/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example46/snippet.rb index e05bddfd5478..3283b72cd541 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example46/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example46/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.put.add(id: "id") +client.endpoints.primitive.get_and_return_base_64(request: "SGVsbG8gd29ybGQh") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example47/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example47/snippet.rb index 520dcc78d713..e05bddfd5478 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example47/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example47/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.union.get_and_return_union +client.endpoints.put.add(id: "id") diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example48/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example48/snippet.rb index fad51fd6b072..520dcc78d713 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example48/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example48/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.urls.with_mixed_case +client.endpoints.union.get_and_return_union diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example49/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example49/snippet.rb index 3668cdf9e4c8..fad51fd6b072 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example49/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example49/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.urls.no_ending_slash +client.endpoints.urls.with_mixed_case diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example50/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example50/snippet.rb index ba7b7b17f5be..3668cdf9e4c8 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example50/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example50/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.urls.with_ending_slash +client.endpoints.urls.no_ending_slash diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example51/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example51/snippet.rb index 1cf0389f0b07..ba7b7b17f5be 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example51/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example51/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.endpoints.urls.with_underscores +client.endpoints.urls.with_ending_slash diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example52/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example52/snippet.rb index 27ecfce73d3b..1cf0389f0b07 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example52/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example52/snippet.rb @@ -5,24 +5,4 @@ base_url: "https://api.fern.com" ) -client.inlined_requests.post_with_object_bodyand_response( - string: "string", - integer: 1, - nested_object: { - string: "string", - integer: 1, - long: 1000000, - double: 1.1, - bool: true, - datetime: "2024-01-15T09:30:00Z", - date: "2023-01-15", - uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", - base_64: "SGVsbG8gd29ybGQh", - list: %w[list list], - set: Set.new(["set"]), - map: { - 1 => "map" - }, - bigint: "1000000" - } -) +client.endpoints.urls.with_underscores diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example54/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example54/snippet.rb index 1b4fd590d009..27ecfce73d3b 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example54/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example54/snippet.rb @@ -5,4 +5,24 @@ base_url: "https://api.fern.com" ) -client.no_auth.post_with_no_auth +client.inlined_requests.post_with_object_bodyand_response( + string: "string", + integer: 1, + nested_object: { + string: "string", + integer: 1, + long: 1000000, + double: 1.1, + bool: true, + datetime: "2024-01-15T09:30:00Z", + date: "2023-01-15", + uuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", + base_64: "SGVsbG8gd29ybGQh", + list: %w[list list], + set: Set.new(["set"]), + map: { + 1 => "map" + }, + bigint: "1000000" + } +) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example56/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example56/snippet.rb index 84805d095dd6..1b4fd590d009 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example56/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example56/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.no_req_body.get_with_no_request_body +client.no_auth.post_with_no_auth diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example57/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example57/snippet.rb index 41b55b77b455..84805d095dd6 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example57/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example57/snippet.rb @@ -5,4 +5,4 @@ base_url: "https://api.fern.com" ) -client.no_req_body.post_with_no_request_body +client.no_req_body.get_with_no_request_body diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example58/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example58/snippet.rb index 0366bf524c68..41b55b77b455 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example58/snippet.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example58/snippet.rb @@ -5,8 +5,4 @@ base_url: "https://api.fern.com" ) -client.req_with_headers.get_with_custom_header( - x_test_service_header: "X-TEST-SERVICE-HEADER", - x_test_endpoint_header: "X-TEST-ENDPOINT-HEADER", - body: "string" -) +client.no_req_body.post_with_no_request_body diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example59/snippet.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example59/snippet.rb new file mode 100644 index 000000000000..0366bf524c68 --- /dev/null +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/dynamic-snippets/example59/snippet.rb @@ -0,0 +1,12 @@ +require "seed" + +client = Seed::MyClient.new( + token: "", + base_url: "https://api.fern.com" +) + +client.req_with_headers.get_with_custom_header( + x_test_service_header: "X-TEST-SERVICE-HEADER", + x_test_endpoint_header: "X-TEST-ENDPOINT-HEADER", + body: "string" +) diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed.rb index 827ee9a594f3..af7fa8997a5c 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed.rb @@ -54,6 +54,7 @@ require_relative "seed/types/object/types/object_with_unknown_field" require_relative "seed/types/object/types/documented_unknown_type" require_relative "seed/types/object/types/object_with_documented_unknown_type" +require_relative "seed/types/object/types/map_of_documented_unknown_type" require_relative "seed/types/union/types/dog" require_relative "seed/types/union/types/cat" require_relative "seed/types/union/types/animal" diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/endpoints/object/client.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/endpoints/object/client.rb index e16a42808093..d95dd8a316ce 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/endpoints/object/client.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/endpoints/object/client.rb @@ -268,6 +268,38 @@ def get_and_return_with_documented_unknown_type(request_options: {}, **params) end end + # @param request_options [Hash] + # @param params [Seed::Types::Object_::Types::MapOfDocumentedUnknownType] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # + # @return [Hash[String, Object]] + def get_and_return_map_of_documented_unknown_type(request_options: {}, **params) + params = Seed::Internal::Types::Utils.normalize_keys(params) + request = Seed::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "/object/get-and-return-map-of-documented-unknown-type", + body: params, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise Seed::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + Seed::Types::Object_::Types::MapOfDocumentedUnknownType.load(response.body) + else + error_class = Seed::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # Tests that string fields containing datetime-like values are NOT reformatted. # The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" # without being converted to "2023-08-31T14:15:22.000Z". diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/types/object/types/map_of_documented_unknown_type.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/types/object/types/map_of_documented_unknown_type.rb new file mode 100644 index 000000000000..cf012a301a51 --- /dev/null +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/lib/seed/types/object/types/map_of_documented_unknown_type.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module Seed + module Types + module Object_ + module Types + module MapOfDocumentedUnknownType + # MapOfDocumentedUnknownType is an alias for Hash + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end + end + end +end diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/reference.md b/seed/ruby-sdk-v2/exhaustive/wire-tests/reference.md index c9a4c939e9f7..c60504863c52 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/reference.md +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/reference.md @@ -1341,6 +1341,54 @@ client.endpoints.object.get_and_return_with_documented_unknown_type + + + + +
client.endpoints.object.get_and_return_map_of_documented_unknown_type(request) -> Internal::Types::Hash[String, Object] +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.endpoints.object.get_and_return_map_of_documented_unknown_type(request: {}) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Internal::Types::Hash[String, Object]` + +
+
+ +
+
+ +**request_options:** `Seed::Endpoints::Object_::RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/test/wire/endpoints_object_test.rb b/seed/ruby-sdk-v2/exhaustive/wire-tests/test/wire/endpoints_object_test.rb index ad39af8822ac..fa862ff6cb87 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/test/wire/endpoints_object_test.rb +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/test/wire/endpoints_object_test.rb @@ -265,6 +265,27 @@ def test_endpoints_object_get_and_return_with_documented_unknown_type_with_wirem ) end + def test_endpoints_object_get_and_return_map_of_documented_unknown_type_with_wiremock + test_id = "endpoints.object.get_and_return_map_of_documented_unknown_type.0" + + @client.endpoints.object.get_and_return_map_of_documented_unknown_type( + request: {}, + request_options: { + additional_headers: { + "X-Test-Id" => "endpoints.object.get_and_return_map_of_documented_unknown_type.0" + } + } + ) + + verify_request_count( + test_id: test_id, + method: "POST", + url_path: "/object/get-and-return-map-of-documented-unknown-type", + query_params: nil, + expected: 1 + ) + end + def test_endpoints_object_get_and_return_with_datetime_like_string_with_wiremock test_id = "endpoints.object.get_and_return_with_datetime_like_string.0" diff --git a/seed/ruby-sdk-v2/exhaustive/wire-tests/wiremock/wiremock-mappings.json b/seed/ruby-sdk-v2/exhaustive/wire-tests/wiremock/wiremock-mappings.json index c907c269bebe..c932107ed38e 100644 --- a/seed/ruby-sdk-v2/exhaustive/wire-tests/wiremock/wiremock-mappings.json +++ b/seed/ruby-sdk-v2/exhaustive/wire-tests/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/rust-model/exhaustive/src/mod.rs b/seed/rust-model/exhaustive/src/mod.rs index 33a5b188eab5..1ae1bd7d4316 100644 --- a/seed/rust-model/exhaustive/src/mod.rs +++ b/seed/rust-model/exhaustive/src/mod.rs @@ -6,7 +6,7 @@ //! ## Type Categories //! //! - **Request/Response Types**: 9 types for API operations -//! - **Model Types**: 20 types for data representation +//! - **Model Types**: 21 types for data representation pub mod endpoints_pagination_paginated_response; pub mod endpoints_put_error; @@ -27,6 +27,7 @@ pub mod types_object_object_with_datetime_like_string; pub mod types_object_object_with_unknown_field; pub mod types_object_object_with_documented_unknown_type; pub mod types_object_documented_unknown_type; +pub mod types_object_map_of_documented_unknown_type; pub mod types_union_animal; pub mod types_union_dog; pub mod types_union_cat; @@ -57,6 +58,7 @@ pub use types_object_object_with_datetime_like_string::ObjectWithDatetimeLikeStr pub use types_object_object_with_unknown_field::ObjectWithUnknownField; pub use types_object_object_with_documented_unknown_type::ObjectWithDocumentedUnknownType; pub use types_object_documented_unknown_type::DocumentedUnknownType; +pub use types_object_map_of_documented_unknown_type::MapOfDocumentedUnknownType; pub use types_union_animal::Animal; pub use types_union_dog::Dog; pub use types_union_cat::Cat; diff --git a/seed/rust-model/exhaustive/src/types_object_map_of_documented_unknown_type.rs b/seed/rust-model/exhaustive/src/types_object_map_of_documented_unknown_type.rs new file mode 100644 index 000000000000..6973546bf156 --- /dev/null +++ b/seed/rust-model/exhaustive/src/types_object_map_of_documented_unknown_type.rs @@ -0,0 +1,4 @@ +pub use crate::prelude::*; + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct MapOfDocumentedUnknownType(pub HashMap); \ No newline at end of file diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example25.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example25.rs index ff152a602eda..3dbffcbac494 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example25.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example25.rs @@ -11,11 +11,11 @@ async fn main() { client .endpoints .object - .get_and_return_with_datetime_like_string( - &ObjectWithDatetimeLikeString { - datetime_like_string: "2023-08-31T14:15:22Z".to_string(), - actual_datetime: DateTime::parse_from_rfc3339("2023-08-31T14:15:22Z").unwrap(), - }, + .get_and_return_map_of_documented_unknown_type( + &MapOfDocumentedUnknownType(HashMap::from([( + "string".to_string(), + DocumentedUnknownType(serde_json::json!({"key":"value"})), + )])), None, ) .await; diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example26.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example26.rs index 9e78d88f07e3..ff152a602eda 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example26.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example26.rs @@ -13,8 +13,8 @@ async fn main() { .object .get_and_return_with_datetime_like_string( &ObjectWithDatetimeLikeString { - datetime_like_string: "datetimeLikeString".to_string(), - actual_datetime: DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap(), + datetime_like_string: "2023-08-31T14:15:22Z".to_string(), + actual_datetime: DateTime::parse_from_rfc3339("2023-08-31T14:15:22Z").unwrap(), }, None, ) diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example27.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example27.rs index 2447a0f26e3c..9e78d88f07e3 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example27.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example27.rs @@ -10,11 +10,11 @@ async fn main() { let client = ExhaustiveClient::new(config).expect("Failed to build client"); client .endpoints - .pagination - .list_items( - &ListItemsQueryRequest { - cursor: Some("cursor".to_string()), - limit: Some(1), + .object + .get_and_return_with_datetime_like_string( + &ObjectWithDatetimeLikeString { + datetime_like_string: "datetimeLikeString".to_string(), + actual_datetime: DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap(), }, None, ) diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example28.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example28.rs index d2c45dbd2c3a..2447a0f26e3c 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example28.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example28.rs @@ -10,7 +10,13 @@ async fn main() { let client = ExhaustiveClient::new(config).expect("Failed to build client"); client .endpoints - .params - .get_with_path(&"param".to_string(), None) + .pagination + .list_items( + &ListItemsQueryRequest { + cursor: Some("cursor".to_string()), + limit: Some(1), + }, + None, + ) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example30.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example30.rs index d1a6d079a07c..d2c45dbd2c3a 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example30.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example30.rs @@ -11,12 +11,6 @@ async fn main() { client .endpoints .params - .get_with_query( - &GetWithQueryQueryRequest { - query: "query".to_string(), - number: 1, - }, - None, - ) + .get_with_path(&"param".to_string(), None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example32.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example32.rs index 346519504599..d1a6d079a07c 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example32.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example32.rs @@ -11,10 +11,10 @@ async fn main() { client .endpoints .params - .get_with_path_and_query( - &"param".to_string(), - &GetWithPathAndQueryQueryRequest { + .get_with_query( + &GetWithQueryQueryRequest { query: "query".to_string(), + number: 1, }, None, ) diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example34.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example34.rs index e3be9b3bc851..346519504599 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example34.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example34.rs @@ -11,6 +11,12 @@ async fn main() { client .endpoints .params - .modify_with_path(&"param".to_string(), &"string".to_string(), None) + .get_with_path_and_query( + &"param".to_string(), + &GetWithPathAndQueryQueryRequest { + query: "query".to_string(), + }, + None, + ) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example36.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example36.rs index e2e70ab9e70e..e3be9b3bc851 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example36.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example36.rs @@ -11,10 +11,6 @@ async fn main() { client .endpoints .params - .upload_with_path( - &"upload-path".to_string(), - &todo!("Invalid bytes value"), - None, - ) + .modify_with_path(&"param".to_string(), &"string".to_string(), None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example37.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example37.rs index 0e0a92292c97..e2e70ab9e70e 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example37.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example37.rs @@ -10,7 +10,11 @@ async fn main() { let client = ExhaustiveClient::new(config).expect("Failed to build client"); client .endpoints - .primitive - .get_and_return_string(&"string".to_string(), None) + .params + .upload_with_path( + &"upload-path".to_string(), + &todo!("Invalid bytes value"), + None, + ) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example38.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example38.rs index 4aa61f05025b..0e0a92292c97 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example38.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example38.rs @@ -11,6 +11,6 @@ async fn main() { client .endpoints .primitive - .get_and_return_int(&1, None) + .get_and_return_string(&"string".to_string(), None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example39.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example39.rs index 42130b807992..4aa61f05025b 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example39.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example39.rs @@ -11,6 +11,6 @@ async fn main() { client .endpoints .primitive - .get_and_return_long(&1000000, None) + .get_and_return_int(&1, None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example40.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example40.rs index 4c61f954cb42..42130b807992 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example40.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example40.rs @@ -11,6 +11,6 @@ async fn main() { client .endpoints .primitive - .get_and_return_double(&1.1, None) + .get_and_return_long(&1000000, None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example41.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example41.rs index c35d09b056f8..4c61f954cb42 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example41.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example41.rs @@ -11,6 +11,6 @@ async fn main() { client .endpoints .primitive - .get_and_return_bool(&true, None) + .get_and_return_double(&1.1, None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example42.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example42.rs index c7a2667e5571..c35d09b056f8 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example42.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example42.rs @@ -11,9 +11,6 @@ async fn main() { client .endpoints .primitive - .get_and_return_datetime( - &DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap(), - None, - ) + .get_and_return_bool(&true, None) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example43.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example43.rs index 3940486b4b95..c7a2667e5571 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example43.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example43.rs @@ -11,8 +11,8 @@ async fn main() { client .endpoints .primitive - .get_and_return_date( - &NaiveDate::parse_from_str("2023-01-15", "%Y-%m-%d").unwrap(), + .get_and_return_datetime( + &DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap(), None, ) .await; diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example44.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example44.rs index 5973ea7373f2..3940486b4b95 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example44.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example44.rs @@ -11,8 +11,8 @@ async fn main() { client .endpoints .primitive - .get_and_return_uuid( - &Uuid::parse_str("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32").unwrap(), + .get_and_return_date( + &NaiveDate::parse_from_str("2023-01-15", "%Y-%m-%d").unwrap(), None, ) .await; diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example45.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example45.rs index b13a0e77b689..5973ea7373f2 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example45.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example45.rs @@ -11,10 +11,8 @@ async fn main() { client .endpoints .primitive - .get_and_return_base_64( - &base64::engine::general_purpose::STANDARD - .decode("SGVsbG8gd29ybGQh") - .unwrap(), + .get_and_return_uuid( + &Uuid::parse_str("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32").unwrap(), None, ) .await; diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example46.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example46.rs index ab3bf256d7f1..b13a0e77b689 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example46.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example46.rs @@ -8,5 +8,14 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.endpoints.put.add(&"id".to_string(), None).await; + client + .endpoints + .primitive + .get_and_return_base_64( + &base64::engine::general_purpose::STANDARD + .decode("SGVsbG8gd29ybGQh") + .unwrap(), + None, + ) + .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example47.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example47.rs index 02722777858c..ab3bf256d7f1 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example47.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example47.rs @@ -8,17 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client - .endpoints - .union_ - .get_and_return_union( - &Animal::Dog { - data: Dog { - name: "name".to_string(), - likes_to_woof: true, - }, - }, - None, - ) - .await; + client.endpoints.put.add(&"id".to_string(), None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example48.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example48.rs index b6a634f51710..02722777858c 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example48.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example48.rs @@ -8,5 +8,17 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.endpoints.urls.with_mixed_case(None).await; + client + .endpoints + .union_ + .get_and_return_union( + &Animal::Dog { + data: Dog { + name: "name".to_string(), + likes_to_woof: true, + }, + }, + None, + ) + .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example49.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example49.rs index 85585e6d86ce..b6a634f51710 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example49.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example49.rs @@ -8,5 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.endpoints.urls.no_ending_slash(None).await; + client.endpoints.urls.with_mixed_case(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example50.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example50.rs index 0da6e86038a7..85585e6d86ce 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example50.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example50.rs @@ -8,5 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.endpoints.urls.with_ending_slash(None).await; + client.endpoints.urls.no_ending_slash(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example51.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example51.rs index b9e91a0faba0..0da6e86038a7 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example51.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example51.rs @@ -8,5 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.endpoints.urls.with_underscores(None).await; + client.endpoints.urls.with_ending_slash(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example52.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example52.rs index a6a837128879..b9e91a0faba0 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example52.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example52.rs @@ -8,33 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client - .inlined_requests - .post_with_object_bodyand_response( - &PostWithObjectBody { - string: "string".to_string(), - integer: 1, - nested_object: ObjectWithOptionalField { - string: Some("string".to_string()), - integer: Some(1), - long: Some(1000000), - double: Some(1.1), - bool: Some(true), - datetime: Some(DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap()), - date: Some(NaiveDate::parse_from_str("2023-01-15", "%Y-%m-%d").unwrap()), - uuid: Some(Uuid::parse_str("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32").unwrap()), - base_64: Some( - base64::engine::general_purpose::STANDARD - .decode("SGVsbG8gd29ybGQh") - .unwrap(), - ), - list: Some(vec!["list".to_string(), "list".to_string()]), - set: Some(HashSet::from(["set".to_string()])), - map: Some(HashMap::from([(1, "map".to_string())])), - bigint: Some(BigInt::parse_bytes("1000000".as_bytes(), 10).unwrap()), - }, - }, - None, - ) - .await; + client.endpoints.urls.with_underscores(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example54.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example54.rs index 7271c3638f1c..a6a837128879 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example54.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example54.rs @@ -9,7 +9,32 @@ async fn main() { }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); client - .no_auth - .post_with_no_auth(&serde_json::json!({"key":"value"}), None) + .inlined_requests + .post_with_object_bodyand_response( + &PostWithObjectBody { + string: "string".to_string(), + integer: 1, + nested_object: ObjectWithOptionalField { + string: Some("string".to_string()), + integer: Some(1), + long: Some(1000000), + double: Some(1.1), + bool: Some(true), + datetime: Some(DateTime::parse_from_rfc3339("2024-01-15T09:30:00Z").unwrap()), + date: Some(NaiveDate::parse_from_str("2023-01-15", "%Y-%m-%d").unwrap()), + uuid: Some(Uuid::parse_str("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32").unwrap()), + base_64: Some( + base64::engine::general_purpose::STANDARD + .decode("SGVsbG8gd29ybGQh") + .unwrap(), + ), + list: Some(vec!["list".to_string(), "list".to_string()]), + set: Some(HashSet::from(["set".to_string()])), + map: Some(HashMap::from([(1, "map".to_string())])), + bigint: Some(BigInt::parse_bytes("1000000".as_bytes(), 10).unwrap()), + }, + }, + None, + ) .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example56.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example56.rs index 43ffea035bf6..7271c3638f1c 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example56.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example56.rs @@ -8,5 +8,8 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.no_req_body.get_with_no_request_body(None).await; + client + .no_auth + .post_with_no_auth(&serde_json::json!({"key":"value"}), None) + .await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example57.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example57.rs index 32a381d14a77..43ffea035bf6 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example57.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example57.rs @@ -8,5 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client.no_req_body.post_with_no_request_body(None).await; + client.no_req_body.get_with_no_request_body(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example58.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example58.rs index ba55812c6887..32a381d14a77 100644 --- a/seed/rust-sdk/exhaustive/dynamic-snippets/example58.rs +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example58.rs @@ -8,15 +8,5 @@ async fn main() { ..Default::default() }; let client = ExhaustiveClient::new(config).expect("Failed to build client"); - client - .req_with_headers - .get_with_custom_header( - &"string".to_string(), - Some( - RequestOptions::new() - .additional_header("X-TEST-SERVICE-HEADER", "X-TEST-SERVICE-HEADER") - .additional_header("X-TEST-ENDPOINT-HEADER", "X-TEST-ENDPOINT-HEADER"), - ), - ) - .await; + client.no_req_body.post_with_no_request_body(None).await; } diff --git a/seed/rust-sdk/exhaustive/dynamic-snippets/example59.rs b/seed/rust-sdk/exhaustive/dynamic-snippets/example59.rs new file mode 100644 index 000000000000..ba55812c6887 --- /dev/null +++ b/seed/rust-sdk/exhaustive/dynamic-snippets/example59.rs @@ -0,0 +1,22 @@ +use seed_exhaustive::prelude::*; + +#[tokio::main] +async fn main() { + let config = ClientConfig { + base_url: "https://api.fern.com".to_string(), + token: Some("".to_string()), + ..Default::default() + }; + let client = ExhaustiveClient::new(config).expect("Failed to build client"); + client + .req_with_headers + .get_with_custom_header( + &"string".to_string(), + Some( + RequestOptions::new() + .additional_header("X-TEST-SERVICE-HEADER", "X-TEST-SERVICE-HEADER") + .additional_header("X-TEST-ENDPOINT-HEADER", "X-TEST-ENDPOINT-HEADER"), + ), + ) + .await; +} diff --git a/seed/rust-sdk/exhaustive/reference.md b/seed/rust-sdk/exhaustive/reference.md index b46a7b207621..bd28e050ec68 100644 --- a/seed/rust-sdk/exhaustive/reference.md +++ b/seed/rust-sdk/exhaustive/reference.md @@ -1269,6 +1269,51 @@ async fn main() { + + + + +
client.endpoints().object.get_and_return_map_of_documented_unknown_type(request: MapOfDocumentedUnknownType) -> Result<MapOfDocumentedUnknownType, ApiError> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```rust +use seed_exhaustive::prelude::*; + +#[tokio::main] +async fn main() { + let config = ClientConfig { + token: Some("".to_string()), + ..Default::default() + }; + let client = ExhaustiveClient::new(config).expect("Failed to build client"); + client + .endpoints + .object + .get_and_return_map_of_documented_unknown_type( + &MapOfDocumentedUnknownType(HashMap::from([( + "string".to_string(), + DocumentedUnknownType(serde_json::json!({"key":"value"})), + )])), + None, + ) + .await; +} +``` +
+
+
+
+ +
diff --git a/seed/rust-sdk/exhaustive/src/api/resources/endpoints/object/endpoints_object.rs b/seed/rust-sdk/exhaustive/src/api/resources/endpoints/object/endpoints_object.rs index afbd012fa8b8..a847f5bcb997 100644 --- a/seed/rust-sdk/exhaustive/src/api/resources/endpoints/object/endpoints_object.rs +++ b/seed/rust-sdk/exhaustive/src/api/resources/endpoints/object/endpoints_object.rs @@ -145,6 +145,22 @@ impl ObjectClient { .await } + pub async fn get_and_return_map_of_documented_unknown_type( + &self, + request: &MapOfDocumentedUnknownType, + options: Option, + ) -> Result { + self.http_client + .execute_request( + Method::POST, + "/object/get-and-return-map-of-documented-unknown-type", + Some(serde_json::to_value(request).unwrap_or_default()), + None, + options, + ) + .await + } + /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" /// without being converted to "2023-08-31T14:15:22.000Z". diff --git a/seed/rust-sdk/exhaustive/src/api/types/mod.rs b/seed/rust-sdk/exhaustive/src/api/types/mod.rs index a0ce26ce7df1..2047f3123b04 100644 --- a/seed/rust-sdk/exhaustive/src/api/types/mod.rs +++ b/seed/rust-sdk/exhaustive/src/api/types/mod.rs @@ -14,6 +14,7 @@ pub mod types_docs_object_with_docs; pub mod types_enum_weather_report; pub mod types_object_documented_unknown_type; pub mod types_object_double_optional; +pub mod types_object_map_of_documented_unknown_type; pub mod types_object_nested_object_with_optional_field; pub mod types_object_nested_object_with_required_field; pub mod types_object_object_with_datetime_like_string; @@ -44,6 +45,7 @@ pub use types_docs_object_with_docs::ObjectWithDocs; pub use types_enum_weather_report::WeatherReport; pub use types_object_documented_unknown_type::DocumentedUnknownType; pub use types_object_double_optional::DoubleOptional; +pub use types_object_map_of_documented_unknown_type::MapOfDocumentedUnknownType; pub use types_object_nested_object_with_optional_field::NestedObjectWithOptionalField; pub use types_object_nested_object_with_required_field::NestedObjectWithRequiredField; pub use types_object_object_with_datetime_like_string::ObjectWithDatetimeLikeString; diff --git a/seed/rust-sdk/exhaustive/src/api/types/types_object_map_of_documented_unknown_type.rs b/seed/rust-sdk/exhaustive/src/api/types/types_object_map_of_documented_unknown_type.rs new file mode 100644 index 000000000000..6970009cf264 --- /dev/null +++ b/seed/rust-sdk/exhaustive/src/api/types/types_object_map_of_documented_unknown_type.rs @@ -0,0 +1,4 @@ +pub use crate::prelude::*; + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct MapOfDocumentedUnknownType(pub HashMap); diff --git a/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs b/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs index 40e8d404ba18..11893f3f5427 100644 --- a/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs +++ b/seed/rust-sdk/exhaustive/tests/endpoints_object_test.rs @@ -401,6 +401,43 @@ async fn test_endpoints_object_get_and_return_with_documented_unknown_type_with_ .unwrap(); } +#[tokio::test] +#[allow(unused_variables, unreachable_code)] +async fn test_endpoints_object_get_and_return_map_of_documented_unknown_type_with_wiremock() { + wire_test_utils::reset_wiremock_requests().await.unwrap(); + let wiremock_base_url = wire_test_utils::get_wiremock_base_url(); + + let mut config = ClientConfig { + token: Some("".to_string()), + ..Default::default() + }; + config.base_url = wiremock_base_url.to_string(); + let client = ExhaustiveClient::new(config).expect("Failed to build client"); + + let result = client + .endpoints + .object + .get_and_return_map_of_documented_unknown_type( + &MapOfDocumentedUnknownType(HashMap::from([( + "string".to_string(), + DocumentedUnknownType(serde_json::json!({"key":"value"})), + )])), + None, + ) + .await; + + assert!(result.is_ok(), "Client method call should succeed"); + + wire_test_utils::verify_request_count( + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + None, + 1, + ) + .await + .unwrap(); +} + #[tokio::test] #[allow(unused_variables, unreachable_code)] async fn test_endpoints_object_get_and_return_with_datetime_like_string_with_wiremock() { diff --git a/seed/rust-sdk/exhaustive/wiremock/wiremock-mappings.json b/seed/rust-sdk/exhaustive/wiremock/wiremock-mappings.json index 43f2532d90f7..463105b4fcea 100644 --- a/seed/rust-sdk/exhaustive/wiremock/wiremock-mappings.json +++ b/seed/rust-sdk/exhaustive/wiremock/wiremock-mappings.json @@ -1 +1 @@ -{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":54}} \ No newline at end of file +{"mappings":[{"id":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","name":"getAndReturnListOfPrimitives - default","request":{"urlPathTemplate":"/container/list-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\",\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"864d58e6-0c08-4f38-b7e1-2638f8d7fd6d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","name":"getAndReturnListOfObjects - default","request":{"urlPathTemplate":"/container/list-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"ac1d4c4f-a8a7-4c27-ae64-7fc977cfa122","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"591d5c48-a536-452b-8a2e-ad7c23c38298","name":"getAndReturnSetOfPrimitives - default","request":{"urlPathTemplate":"/container/set-of-primitives","method":"POST"},"response":{"status":200,"body":"[\n \"string\"\n]","headers":{"Content-Type":"application/json"}},"uuid":"591d5c48-a536-452b-8a2e-ad7c23c38298","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","name":"getAndReturnSetOfObjects - default","request":{"urlPathTemplate":"/container/set-of-objects","method":"POST"},"response":{"status":200,"body":"[\n {\n \"string\": \"string\"\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e1d5f52b-7a51-464f-ac8f-83c0345a3a35","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","name":"getAndReturnMapPrimToPrim - default","request":{"urlPathTemplate":"/container/map-prim-to-prim","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4b1d33b3-ca7d-462a-a2e3-23d531ae2922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b01ac2b9-3470-48aa-badc-57d331bb5a49","name":"getAndReturnMapOfPrimToObject - default","request":{"urlPathTemplate":"/container/map-prim-to-object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"string\": \"string\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b01ac2b9-3470-48aa-badc-57d331bb5a49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"eaf9315d-55c4-4434-8004-a70c25af5656","name":"getAndReturnMapOfPrimToUndiscriminatedUnion - default","request":{"urlPathTemplate":"/container/map-prim-to-union","method":"POST"},"response":{"status":200,"body":"{\n \"string\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"eaf9315d-55c4-4434-8004-a70c25af5656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5271904-de0a-425f-940d-d6f6bde34755","name":"getAndReturnOptional - default","request":{"urlPathTemplate":"/container/opt-objects","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5271904-de0a-425f-940d-d6f6bde34755","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d19e1fbe-79cc-465c-962e-e1866ca2361b","name":"postJsonPatchContentType - default","request":{"urlPathTemplate":"/foo/bar","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"d19e1fbe-79cc-465c-962e-e1866ca2361b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4a107cf5-6284-48f8-9ddb-99d944ba989b","name":"postJsonPatchContentWithCharsetType - default","request":{"urlPathTemplate":"/foo/baz","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"4a107cf5-6284-48f8-9ddb-99d944ba989b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"60fd3c8a-3983-41b9-8178-f42997388900","name":"getAndReturnEnum - default","request":{"urlPathTemplate":"/enum","method":"POST"},"response":{"status":200,"body":"\"SUNNY\"","headers":{"Content-Type":"application/json"}},"uuid":"60fd3c8a-3983-41b9-8178-f42997388900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3d95c052-db6e-4eff-95f2-895666a5af54","name":"testGet - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"3d95c052-db6e-4eff-95f2-895666a5af54","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","name":"testPost - default","request":{"urlPathTemplate":"/http-methods","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2552873f-9f1d-4557-a6c7-6c6b7a55b566","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","name":"testPut - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"db42fbdf-5426-41b7-b7ea-28ed39a38e82","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","name":"testPatch - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"PATCH","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9def317-32a0-4bc0-b9b6-5efae8ca44a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","name":"testDelete - default","request":{"urlPathTemplate":"/http-methods/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"05333635-c9ce-4c1a-bb6d-95e8a0fb80dc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41cdef0e-040f-4d08-8426-87b19e60f7d7","name":"getAndReturnWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41cdef0e-040f-4d08-8426-87b19e60f7d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f74df550-df8c-4503-b202-0b9b3165c1a7","name":"getAndReturnWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-with-required-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f74df550-df8c-4503-b202-0b9b3165c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0c904dbb-ce54-48a2-8364-13a4989be7f2","name":"getAndReturnWithMapOfMap - default","request":{"urlPathTemplate":"/object/get-and-return-with-map-of-map","method":"POST"},"response":{"status":200,"body":"{\n \"map\": {\n \"map\": {\n \"map\": \"map\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0c904dbb-ce54-48a2-8364-13a4989be7f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67e969fc-ff81-4a67-9858-66a29ffc9b72","name":"getAndReturnNestedWithOptionalField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-optional-field","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"67e969fc-ff81-4a67-9858-66a29ffc9b72","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"169827d0-4247-4236-8cef-34b94d2659de","name":"getAndReturnNestedWithRequiredField - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field/{string}","method":"POST","pathParameters":{"string":{"equalTo":"string"}}},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"169827d0-4247-4236-8cef-34b94d2659de","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","name":"getAndReturnNestedWithRequiredFieldAsList - default","request":{"urlPathTemplate":"/object/get-and-return-nested-with-required-field-list","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"NestedObject\": {\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6d9ed308-5724-4bbc-a4f7-28dc264d188f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"233729b0-81c8-4fb3-aa53-793afa48096a","name":"getAndReturnWithUnknownField - default","request":{"urlPathTemplate":"/object/get-and-return-with-unknown-field","method":"POST"},"response":{"status":200,"body":"{\n \"unknown\": {\n \"$ref\": \"https://example.com/schema\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"233729b0-81c8-4fb3-aa53-793afa48096a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","name":"getAndReturnWithDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-with-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"documentedUnknownType\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4bc6dad1-b68d-4f0f-bda5-bf9d3730a4c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","name":"getAndReturnMapOfDocumentedUnknownType - default","request":{"urlPathTemplate":"/object/get-and-return-map-of-documented-unknown-type","method":"POST"},"response":{"status":200,"body":"{\n \"string\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0161c3cd-1ed7-4fa7-8cd2-1ea1d2a8ba1b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","name":"getAndReturnWithDatetimeLikeString - default","request":{"urlPathTemplate":"/object/get-and-return-with-datetime-like-string","method":"POST"},"response":{"status":200,"body":"{\n \"datetimeLikeString\": \"2023-08-31T14:15:22Z\",\n \"actualDatetime\": \"2023-08-31T14:15:22Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e2cc3e92-6e37-4a50-9081-23952fdd73fe","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","name":"listItems - default","request":{"urlPathTemplate":"/pagination","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"items\": [\n {\n \"string\": \"string\"\n },\n {\n \"string\": \"string\"\n }\n ],\n \"next\": \"next\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f15b2079-2482-4ed2-951d-d2b5c4de9afd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","name":"getWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"97806fdb-f31f-4f90-84b8-f9cc1713d53d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"711fc64f-4af9-4084-8c29-1e7a9e58be70","name":"getWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"711fc64f-4af9-4084-8c29-1e7a9e58be70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","name":"getWithQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"8e5739b3-d75f-47d7-b6b8-a663d91a66b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4125d349-732b-4ff7-948d-1eeb977ed13b","name":"getWithAllowMultipleQuery - default","request":{"urlPathTemplate":"/params","method":"GET","queryParameters":{"query":{"equalTo":"query"},"number":{"equalTo":"1"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"4125d349-732b-4ff7-948d-1eeb977ed13b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","name":"getWithPathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"1933d96a-a1b9-4cf1-85ba-c1e8eff5bd56","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","name":"getWithInlinePathAndQuery - default","request":{"urlPathTemplate":"/params/path-query/{param}","method":"GET","pathParameters":{"param":{"equalTo":"param"}},"queryParameters":{"query":{"equalTo":"query"}}},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"c4f5012a-fb3f-45ac-b695-beedc3353ad8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","name":"modifyWithPath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"046bf7d6-751b-48e9-bfc6-ff74a17e88e1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","name":"modifyWithInlinePath - default","request":{"urlPathTemplate":"/params/path/{param}","method":"PUT","pathParameters":{"param":{"equalTo":"param"}}},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"6bfc7195-b99c-4449-bf47-7c4f74f6f33b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","name":"getAndReturnString - default","request":{"urlPathTemplate":"/primitive/string","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"0506ae7c-87b7-4cd2-9e50-31d60f81893f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","name":"getAndReturnInt - default","request":{"urlPathTemplate":"/primitive/integer","method":"POST"},"response":{"status":200,"body":"1","headers":{"Content-Type":"application/json"}},"uuid":"67f875d1-e19e-440d-8f0c-7e1d24ef2619","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5fadbebd-86c0-41f9-8be5-864e39eb5924","name":"getAndReturnLong - default","request":{"urlPathTemplate":"/primitive/long","method":"POST"},"response":{"status":200,"body":"1000000","headers":{"Content-Type":"application/json"}},"uuid":"5fadbebd-86c0-41f9-8be5-864e39eb5924","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e03872b6-86b1-490b-9195-86e5d3a014f2","name":"getAndReturnDouble - default","request":{"urlPathTemplate":"/primitive/double","method":"POST"},"response":{"status":200,"body":"1.1","headers":{"Content-Type":"application/json"}},"uuid":"e03872b6-86b1-490b-9195-86e5d3a014f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"442e632f-890a-4105-9448-f7015127e3b4","name":"getAndReturnBool - default","request":{"urlPathTemplate":"/primitive/boolean","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"442e632f-890a-4105-9448-f7015127e3b4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","name":"getAndReturnDatetime - default","request":{"urlPathTemplate":"/primitive/datetime","method":"POST"},"response":{"status":200,"body":"\"2024-01-15T09:30:00Z\"","headers":{"Content-Type":"application/json"}},"uuid":"ad76fa81-1e63-43fd-9a99-1d5e4339d98c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afb524b1-54ab-4674-8446-fdd574c368cc","name":"getAndReturnDate - default","request":{"urlPathTemplate":"/primitive/date","method":"POST"},"response":{"status":200,"body":"\"2023-01-15\"","headers":{"Content-Type":"application/json"}},"uuid":"afb524b1-54ab-4674-8446-fdd574c368cc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"969c0f3a-218a-45b7-b17f-64b1a9307d43","name":"getAndReturnUUID - default","request":{"urlPathTemplate":"/primitive/uuid","method":"POST"},"response":{"status":200,"body":"\"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\"","headers":{"Content-Type":"application/json"}},"uuid":"969c0f3a-218a-45b7-b17f-64b1a9307d43","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04baa20d-d318-40e6-9784-c40158c16acd","name":"getAndReturnBase64 - default","request":{"urlPathTemplate":"/primitive/base64","method":"POST"},"response":{"status":200,"body":"\"SGVsbG8gd29ybGQh\"","headers":{"Content-Type":"application/json"}},"uuid":"04baa20d-d318-40e6-9784-c40158c16acd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","name":"Put - default","request":{"urlPathTemplate":"/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n },\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fddd5aaf-ab0d-4ef6-949c-5d329f6d7eb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d29330f9-49ff-49c4-9081-7c83dbad315b","name":"getAndReturnUnion - default","request":{"urlPathTemplate":"/union","method":"POST"},"response":{"status":200,"body":"{\n \"animal\": \"dog\",\n \"name\": \"name\",\n \"likesToWoof\": true\n}","headers":{"Content-Type":"application/json"}},"uuid":"d29330f9-49ff-49c4-9081-7c83dbad315b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"343f71f3-36ce-4684-b762-d60a086b43a4","name":"withMixedCase - default","request":{"urlPathTemplate":"/urls/MixedCase","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"343f71f3-36ce-4684-b762-d60a086b43a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"48f36314-b2b7-4910-9e1d-5b05f3346a60","name":"noEndingSlash - default","request":{"urlPathTemplate":"/urls/no-ending-slash","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"48f36314-b2b7-4910-9e1d-5b05f3346a60","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f7b95029-2f25-4f70-8b4c-0855712747d8","name":"withEndingSlash - default","request":{"urlPathTemplate":"/urls/with-ending-slash/","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"f7b95029-2f25-4f70-8b4c-0855712747d8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","name":"withUnderscores - default","request":{"urlPathTemplate":"/urls/with_underscores","method":"GET"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"2f9671a5-e6da-43a8-be27-d0be0191dcbf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","name":"postWithObjectBodyandResponse - default","request":{"urlPathTemplate":"/req-bodies/object","method":"POST"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4a6d0aaa-05f2-47bb-9f40-6e3743b9d2bf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","name":"postWithNoAuth - default","request":{"urlPathTemplate":"/no-auth","method":"POST"},"response":{"status":200,"body":"true","headers":{"Content-Type":"application/json"}},"uuid":"c6e7cc6c-b76f-4860-a9ad-52dc8f55b6e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8098eeea-bc6b-4068-9601-566c2092f83f","name":"getWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"GET"},"response":{"status":200,"body":"{\n \"string\": \"string\",\n \"integer\": 1,\n \"long\": 1000000,\n \"double\": 1.1,\n \"bool\": true,\n \"datetime\": \"2024-01-15T09:30:00Z\",\n \"date\": \"2023-01-15\",\n \"uuid\": \"d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32\",\n \"base64\": \"SGVsbG8gd29ybGQh\",\n \"list\": [\n \"list\",\n \"list\"\n ],\n \"set\": [\n \"set\"\n ],\n \"map\": {\n \"1\": \"map\"\n },\n \"bigint\": \"1000000\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8098eeea-bc6b-4068-9601-566c2092f83f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","name":"postWithNoRequestBody - default","request":{"urlPathTemplate":"/no-req-body","method":"POST"},"response":{"status":200,"body":"\"string\"","headers":{"Content-Type":"application/json"}},"uuid":"7dd9f944-1b35-42e9-a5ed-e48214ac8e91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","name":"getWithCustomHeader - default","request":{"urlPathTemplate":"/test-headers/custom-header","method":"POST"},"response":{"status":200,"body":"null","headers":{"Content-Type":"application/json"}},"uuid":"d7b54168-aef4-4d68-a9c5-446e97dee2fc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":55}} \ No newline at end of file diff --git a/seed/swift-sdk/exhaustive/Snippets/Example25.swift b/seed/swift-sdk/exhaustive/Snippets/Example25.swift index 37afa5e7dce4..e55827c2312a 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example25.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example25.swift @@ -7,10 +7,11 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.object.getAndReturnWithDatetimeLikeString(request: ObjectWithDatetimeLikeString( - datetimeLikeString: "2023-08-31T14:15:22Z", - actualDatetime: try! Date("2023-08-31T14:15:22Z", strategy: .iso8601) - )) + _ = try await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request: [ + "string": .object([ + "key": .string("value") + ]) + ]) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example26.swift b/seed/swift-sdk/exhaustive/Snippets/Example26.swift index f849593eea61..37afa5e7dce4 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example26.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example26.swift @@ -8,8 +8,8 @@ private func main() async throws { ) _ = try await client.endpoints.object.getAndReturnWithDatetimeLikeString(request: ObjectWithDatetimeLikeString( - datetimeLikeString: "datetimeLikeString", - actualDatetime: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601) + datetimeLikeString: "2023-08-31T14:15:22Z", + actualDatetime: try! Date("2023-08-31T14:15:22Z", strategy: .iso8601) )) } diff --git a/seed/swift-sdk/exhaustive/Snippets/Example27.swift b/seed/swift-sdk/exhaustive/Snippets/Example27.swift index 6bad67e308ca..f849593eea61 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example27.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example27.swift @@ -7,10 +7,10 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.pagination.listItems( - cursor: "cursor", - limit: 1 - ) + _ = try await client.endpoints.object.getAndReturnWithDatetimeLikeString(request: ObjectWithDatetimeLikeString( + datetimeLikeString: "datetimeLikeString", + actualDatetime: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601) + )) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example28.swift b/seed/swift-sdk/exhaustive/Snippets/Example28.swift index 3c9a823b1fce..6bad67e308ca 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example28.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example28.swift @@ -7,7 +7,10 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.params.getWithPath(param: "param") + _ = try await client.endpoints.pagination.listItems( + cursor: "cursor", + limit: 1 + ) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example30.swift b/seed/swift-sdk/exhaustive/Snippets/Example30.swift index b180edfd7112..3c9a823b1fce 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example30.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example30.swift @@ -7,10 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.params.getWithQuery( - query: "query", - number: 1 - ) + _ = try await client.endpoints.params.getWithPath(param: "param") } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example32.swift b/seed/swift-sdk/exhaustive/Snippets/Example32.swift index 03bf7b9ca314..b180edfd7112 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example32.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example32.swift @@ -7,9 +7,9 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.params.getWithPathAndQuery( - param: "param", - query: "query" + _ = try await client.endpoints.params.getWithQuery( + query: "query", + number: 1 ) } diff --git a/seed/swift-sdk/exhaustive/Snippets/Example34.swift b/seed/swift-sdk/exhaustive/Snippets/Example34.swift index ff4dd1a1810c..03bf7b9ca314 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example34.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example34.swift @@ -7,9 +7,9 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.params.modifyWithPath( + _ = try await client.endpoints.params.getWithPathAndQuery( param: "param", - request: "string" + query: "query" ) } diff --git a/seed/swift-sdk/exhaustive/Snippets/Example36.swift b/seed/swift-sdk/exhaustive/Snippets/Example36.swift index 6b547f957b34..ff4dd1a1810c 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example36.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example36.swift @@ -7,9 +7,9 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.params.uploadWithPath( - param: "upload-path", - request: Data("data".utf8) + _ = try await client.endpoints.params.modifyWithPath( + param: "param", + request: "string" ) } diff --git a/seed/swift-sdk/exhaustive/Snippets/Example37.swift b/seed/swift-sdk/exhaustive/Snippets/Example37.swift index a5f8cfd7e1b0..6b547f957b34 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example37.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example37.swift @@ -7,7 +7,10 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnString(request: "string") + _ = try await client.endpoints.params.uploadWithPath( + param: "upload-path", + request: Data("data".utf8) + ) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example38.swift b/seed/swift-sdk/exhaustive/Snippets/Example38.swift index 734915449618..a5f8cfd7e1b0 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example38.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example38.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnInt(request: 1) + _ = try await client.endpoints.primitive.getAndReturnString(request: "string") } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example39.swift b/seed/swift-sdk/exhaustive/Snippets/Example39.swift index cf39fe1f4945..734915449618 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example39.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example39.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnLong(request: 1000000) + _ = try await client.endpoints.primitive.getAndReturnInt(request: 1) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example40.swift b/seed/swift-sdk/exhaustive/Snippets/Example40.swift index f0d8498db856..cf39fe1f4945 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example40.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example40.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnDouble(request: 1.1) + _ = try await client.endpoints.primitive.getAndReturnLong(request: 1000000) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example41.swift b/seed/swift-sdk/exhaustive/Snippets/Example41.swift index ad5a70feed7e..f0d8498db856 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example41.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example41.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnBool(request: true) + _ = try await client.endpoints.primitive.getAndReturnDouble(request: 1.1) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example42.swift b/seed/swift-sdk/exhaustive/Snippets/Example42.swift index 524142d224e7..ad5a70feed7e 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example42.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example42.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnDatetime(request: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601)) + _ = try await client.endpoints.primitive.getAndReturnBool(request: true) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example43.swift b/seed/swift-sdk/exhaustive/Snippets/Example43.swift index e85723b0e849..524142d224e7 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example43.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example43.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnDate(request: CalendarDate("2023-01-15")!) + _ = try await client.endpoints.primitive.getAndReturnDatetime(request: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601)) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example44.swift b/seed/swift-sdk/exhaustive/Snippets/Example44.swift index 197db759d8ad..e85723b0e849 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example44.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example44.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnUuid(request: UUID(uuidString: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")!) + _ = try await client.endpoints.primitive.getAndReturnDate(request: CalendarDate("2023-01-15")!) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example45.swift b/seed/swift-sdk/exhaustive/Snippets/Example45.swift index 5df4d0390da0..197db759d8ad 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example45.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example45.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.primitive.getAndReturnBase64(request: "SGVsbG8gd29ybGQh") + _ = try await client.endpoints.primitive.getAndReturnUuid(request: UUID(uuidString: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")!) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example46.swift b/seed/swift-sdk/exhaustive/Snippets/Example46.swift index b12d23a6c228..5df4d0390da0 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example46.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example46.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.put.add(id: "id") + _ = try await client.endpoints.primitive.getAndReturnBase64(request: "SGVsbG8gd29ybGQh") } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example47.swift b/seed/swift-sdk/exhaustive/Snippets/Example47.swift index aef4b41b9dbc..b12d23a6c228 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example47.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example47.swift @@ -7,12 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.union.getAndReturnUnion(request: Animal.dog( - Dog( - name: "name", - likesToWoof: true - ) - )) + _ = try await client.endpoints.put.add(id: "id") } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example48.swift b/seed/swift-sdk/exhaustive/Snippets/Example48.swift index 3ffb8341d7e7..aef4b41b9dbc 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example48.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example48.swift @@ -7,7 +7,12 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.urls.withMixedCase() + _ = try await client.endpoints.union.getAndReturnUnion(request: Animal.dog( + Dog( + name: "name", + likesToWoof: true + ) + )) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example49.swift b/seed/swift-sdk/exhaustive/Snippets/Example49.swift index 0c6267220325..3ffb8341d7e7 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example49.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example49.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.urls.noEndingSlash() + _ = try await client.endpoints.urls.withMixedCase() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example50.swift b/seed/swift-sdk/exhaustive/Snippets/Example50.swift index 62a82e6db058..0c6267220325 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example50.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example50.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.urls.withEndingSlash() + _ = try await client.endpoints.urls.noEndingSlash() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example51.swift b/seed/swift-sdk/exhaustive/Snippets/Example51.swift index 841664719f03..62a82e6db058 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example51.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example51.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.endpoints.urls.withUnderscores() + _ = try await client.endpoints.urls.withEndingSlash() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example52.swift b/seed/swift-sdk/exhaustive/Snippets/Example52.swift index d369f169565f..841664719f03 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example52.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example52.swift @@ -7,28 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.inlinedRequests.postWithObjectBodyandResponse(request: .init( - string: "string", - integer: 1, - nestedObject: ObjectWithOptionalField( - string: "string", - integer: 1, - long: 1000000, - double: 1.1, - bool: true, - datetime: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601), - date: CalendarDate("2023-01-15")!, - uuid: UUID(uuidString: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")!, - base64: "SGVsbG8gd29ybGQh", - list: [ - "list", - "list" - ], - map: [ - 1: "map" - ] - ) - )) + _ = try await client.endpoints.urls.withUnderscores() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example54.swift b/seed/swift-sdk/exhaustive/Snippets/Example54.swift index 5093beecde12..d369f169565f 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example54.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example54.swift @@ -7,9 +7,28 @@ private func main() async throws { token: "" ) - _ = try await client.noAuth.postWithNoAuth(request: .object([ - "key": .string("value") - ])) + _ = try await client.inlinedRequests.postWithObjectBodyandResponse(request: .init( + string: "string", + integer: 1, + nestedObject: ObjectWithOptionalField( + string: "string", + integer: 1, + long: 1000000, + double: 1.1, + bool: true, + datetime: try! Date("2024-01-15T09:30:00Z", strategy: .iso8601), + date: CalendarDate("2023-01-15")!, + uuid: UUID(uuidString: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")!, + base64: "SGVsbG8gd29ybGQh", + list: [ + "list", + "list" + ], + map: [ + 1: "map" + ] + ) + )) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example56.swift b/seed/swift-sdk/exhaustive/Snippets/Example56.swift index 528e0c41f194..5093beecde12 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example56.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example56.swift @@ -7,7 +7,9 @@ private func main() async throws { token: "" ) - _ = try await client.noReqBody.getWithNoRequestBody() + _ = try await client.noAuth.postWithNoAuth(request: .object([ + "key": .string("value") + ])) } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example57.swift b/seed/swift-sdk/exhaustive/Snippets/Example57.swift index d4cf4a4172cd..528e0c41f194 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example57.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example57.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.noReqBody.postWithNoRequestBody() + _ = try await client.noReqBody.getWithNoRequestBody() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example58.swift b/seed/swift-sdk/exhaustive/Snippets/Example58.swift index 6e790f64e501..d4cf4a4172cd 100644 --- a/seed/swift-sdk/exhaustive/Snippets/Example58.swift +++ b/seed/swift-sdk/exhaustive/Snippets/Example58.swift @@ -7,7 +7,7 @@ private func main() async throws { token: "" ) - _ = try await client.reqWithHeaders.getWithCustomHeader(request: .init(body: "string")) + _ = try await client.noReqBody.postWithNoRequestBody() } try await main() diff --git a/seed/swift-sdk/exhaustive/Snippets/Example59.swift b/seed/swift-sdk/exhaustive/Snippets/Example59.swift new file mode 100644 index 000000000000..6e790f64e501 --- /dev/null +++ b/seed/swift-sdk/exhaustive/Snippets/Example59.swift @@ -0,0 +1,13 @@ +import Foundation +import Exhaustive + +private func main() async throws { + let client = ExhaustiveClient( + baseURL: "https://api.fern.com", + token: "" + ) + + _ = try await client.reqWithHeaders.getWithCustomHeader(request: .init(body: "string")) +} + +try await main() diff --git a/seed/swift-sdk/exhaustive/Sources/Resources/Endpoints/Object/ObjectClient.swift b/seed/swift-sdk/exhaustive/Sources/Resources/Endpoints/Object/ObjectClient.swift index 844e5f525888..09c7519653ec 100644 --- a/seed/swift-sdk/exhaustive/Sources/Resources/Endpoints/Object/ObjectClient.swift +++ b/seed/swift-sdk/exhaustive/Sources/Resources/Endpoints/Object/ObjectClient.swift @@ -87,6 +87,16 @@ public final class ObjectClient: Sendable { ) } + public func getAndReturnMapOfDocumentedUnknownType(request: MapOfDocumentedUnknownType, requestOptions: RequestOptions? = nil) async throws -> MapOfDocumentedUnknownType { + return try await httpClient.performRequest( + method: .post, + path: "/object/get-and-return-map-of-documented-unknown-type", + body: request, + requestOptions: requestOptions, + responseType: MapOfDocumentedUnknownType.self + ) + } + /// Tests that string fields containing datetime-like values are NOT reformatted. /// The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" /// without being converted to "2023-08-31T14:15:22.000Z". diff --git a/seed/swift-sdk/exhaustive/Sources/Schemas/MapOfDocumentedUnknownType.swift b/seed/swift-sdk/exhaustive/Sources/Schemas/MapOfDocumentedUnknownType.swift new file mode 100644 index 000000000000..894071596c2d --- /dev/null +++ b/seed/swift-sdk/exhaustive/Sources/Schemas/MapOfDocumentedUnknownType.swift @@ -0,0 +1,4 @@ +import Foundation + +/// Tests that map value types with unknown types don't get spurious | undefined. +public typealias MapOfDocumentedUnknownType = [String: DocumentedUnknownType] diff --git a/seed/swift-sdk/exhaustive/Tests/Wire/Resources/Endpoints/Object/ObjectClientWireTests.swift b/seed/swift-sdk/exhaustive/Tests/Wire/Resources/Endpoints/Object/ObjectClientWireTests.swift index b4719f898ed1..69ea6cf756bb 100644 --- a/seed/swift-sdk/exhaustive/Tests/Wire/Resources/Endpoints/Object/ObjectClientWireTests.swift +++ b/seed/swift-sdk/exhaustive/Tests/Wire/Resources/Endpoints/Object/ObjectClientWireTests.swift @@ -546,6 +546,42 @@ import Exhaustive try #require(response == expectedResponse) } + @Test func getAndReturnMapOfDocumentedUnknownType1() async throws -> Void { + let stub = HTTPStub() + stub.setResponse( + body: Data( + """ + { + "string": { + "key": "value" + } + } + """.utf8 + ) + ) + let client = ExhaustiveClient( + baseURL: "https://api.fern.com", + token: "", + urlSession: stub.urlSession + ) + let expectedResponse = [ + "string": JSONValue.object( + [ + "key": JSONValue.string("value") + ] + ) + ] + let response = try await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType( + request: [ + "string": .object([ + "key": .string("value") + ]) + ], + requestOptions: RequestOptions(additionalHeaders: stub.headers) + ) + try #require(response == expectedResponse) + } + @Test func getAndReturnWithDatetimeLikeString1() async throws -> Void { let stub = HTTPStub() stub.setResponse( diff --git a/seed/swift-sdk/exhaustive/reference.md b/seed/swift-sdk/exhaustive/reference.md index e97f31f3c29f..548a7eeb5bf4 100644 --- a/seed/swift-sdk/exhaustive/reference.md +++ b/seed/swift-sdk/exhaustive/reference.md @@ -1594,6 +1594,67 @@ try await main() + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request: MapOfDocumentedUnknownType, requestOptions: RequestOptions?) -> MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```swift +import Foundation +import Exhaustive + +private func main() async throws { + let client = ExhaustiveClient(token: "") + + _ = try await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType(request: [ + "string": .object([ + "key": .string("value") + ]) + ]) +} + +try await main() +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `RequestOptions?` — Additional options for configuring the request, such as custom headers or timeout settings. + +
+
+
+
+ +
diff --git a/seed/ts-express/circular-references/serialization/resources/ast/types/JsonLikeWithNullAndUndefined.ts b/seed/ts-express/circular-references/serialization/resources/ast/types/JsonLikeWithNullAndUndefined.ts index 33b8056b63a9..d6e0e1f16e23 100644 --- a/seed/ts-express/circular-references/serialization/resources/ast/types/JsonLikeWithNullAndUndefined.ts +++ b/seed/ts-express/circular-references/serialization/resources/ast/types/JsonLikeWithNullAndUndefined.ts @@ -21,7 +21,7 @@ export const JsonLikeWithNullAndUndefined: core.serialization.Schema< export declare namespace JsonLikeWithNullAndUndefined { export type Raw = | ((serializers.JsonLikeWithNullAndUndefined.Raw | null | undefined) | null | undefined)[] - | Record + | Record | ((string | null | undefined) | null | undefined) | ((number | null | undefined) | null | undefined) | ((boolean | null | undefined) | null | undefined); diff --git a/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/service/requests/SearchRequest.ts b/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/service/requests/SearchRequest.ts index 3e0627a884c7..e8f1acda0d45 100644 --- a/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/service/requests/SearchRequest.ts +++ b/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/service/requests/SearchRequest.ts @@ -16,7 +16,7 @@ export const SearchRequest: core.serialization.Schema< export declare namespace SearchRequest { export interface Raw { query: string; - filters?: Record | null; + filters?: Record | null; includeTypes?: string[] | null; } } diff --git a/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/types/ComplexProfile.ts b/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/types/ComplexProfile.ts index 1f6078f7392c..9557da45d072 100644 --- a/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/types/ComplexProfile.ts +++ b/seed/ts-express/nullable-optional/serialization/resources/nullableOptional/types/ComplexProfile.ts @@ -56,7 +56,7 @@ export declare namespace ComplexProfile { optionalArray?: string[] | null; optionalNullableArray?: (string[] | null | undefined) | null; nullableListOfNullables?: (string | null | undefined)[] | null; - nullableMapOfNullables?: Record | null; + nullableMapOfNullables?: Record | null; nullableListOfUnions?: serializers.NotificationMethod.Raw[] | null; optionalMapOfEnums?: Record | null; } diff --git a/seed/ts-express/nullable/api/resources/nullable/types/Metadata.ts b/seed/ts-express/nullable/api/resources/nullable/types/Metadata.ts index 79ee890e66a4..cecc77183973 100644 --- a/seed/ts-express/nullable/api/resources/nullable/types/Metadata.ts +++ b/seed/ts-express/nullable/api/resources/nullable/types/Metadata.ts @@ -8,5 +8,5 @@ export interface Metadata { avatar: string | null; activated?: boolean | null; status: SeedNullable.Status; - values?: Record; + values?: Record; } diff --git a/seed/ts-express/nullable/serialization/resources/nullable/types/Metadata.ts b/seed/ts-express/nullable/serialization/resources/nullable/types/Metadata.ts index ba21a84952f8..153cbb7d9ae7 100644 --- a/seed/ts-express/nullable/serialization/resources/nullable/types/Metadata.ts +++ b/seed/ts-express/nullable/serialization/resources/nullable/types/Metadata.ts @@ -23,6 +23,6 @@ export declare namespace Metadata { avatar?: string | null; activated?: (boolean | null | undefined) | null; status: serializers.Status.Raw; - values?: Record | null; + values?: Record | null; } } diff --git a/seed/ts-sdk/accept-header/src/Client.ts b/seed/ts-sdk/accept-header/src/Client.ts index 3d8be67f372e..e4fa103b6210 100644 --- a/seed/ts-sdk/accept-header/src/Client.ts +++ b/seed/ts-sdk/accept-header/src/Client.ts @@ -42,8 +42,7 @@ export class SeedAcceptClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/accept-header/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/accept-header/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/accept-header/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/accept-header/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/accept-header/vitest.config.mts b/seed/ts-sdk/accept-header/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/accept-header/vitest.config.mts +++ b/seed/ts-sdk/accept-header/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/alias-extends/src/Client.ts b/seed/ts-sdk/alias-extends/src/Client.ts index 96f15b86c1c7..4d2142088c12 100644 --- a/seed/ts-sdk/alias-extends/src/Client.ts +++ b/seed/ts-sdk/alias-extends/src/Client.ts @@ -100,8 +100,7 @@ export class SeedAliasExtendsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/alias-extends/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/alias-extends/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/alias-extends/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/alias-extends/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/alias-extends/vitest.config.mts b/seed/ts-sdk/alias-extends/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/alias-extends/vitest.config.mts +++ b/seed/ts-sdk/alias-extends/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/alias/src/Client.ts b/seed/ts-sdk/alias/src/Client.ts index 249d65f286e1..0c5eb86d8251 100644 --- a/seed/ts-sdk/alias/src/Client.ts +++ b/seed/ts-sdk/alias/src/Client.ts @@ -89,8 +89,7 @@ export class SeedAliasClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/alias/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/alias/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/alias/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/alias/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/alias/vitest.config.mts b/seed/ts-sdk/alias/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/alias/vitest.config.mts +++ b/seed/ts-sdk/alias/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/any-auth/generate-endpoint-metadata/src/Client.ts b/seed/ts-sdk/any-auth/generate-endpoint-metadata/src/Client.ts index 8977ec5a2a35..04c389232a58 100644 --- a/seed/ts-sdk/any-auth/generate-endpoint-metadata/src/Client.ts +++ b/seed/ts-sdk/any-auth/generate-endpoint-metadata/src/Client.ts @@ -48,8 +48,7 @@ export class SeedAnyAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/any-auth/generate-endpoint-metadata/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/any-auth/generate-endpoint-metadata/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/any-auth/generate-endpoint-metadata/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/any-auth/generate-endpoint-metadata/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/any-auth/generate-endpoint-metadata/vitest.config.mts b/seed/ts-sdk/any-auth/generate-endpoint-metadata/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/any-auth/generate-endpoint-metadata/vitest.config.mts +++ b/seed/ts-sdk/any-auth/generate-endpoint-metadata/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/any-auth/no-custom-config/src/Client.ts b/seed/ts-sdk/any-auth/no-custom-config/src/Client.ts index 8977ec5a2a35..04c389232a58 100644 --- a/seed/ts-sdk/any-auth/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/any-auth/no-custom-config/src/Client.ts @@ -48,8 +48,7 @@ export class SeedAnyAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/any-auth/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/any-auth/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/any-auth/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/any-auth/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/any-auth/no-custom-config/vitest.config.mts b/seed/ts-sdk/any-auth/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/any-auth/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/any-auth/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/api-wide-base-path/src/Client.ts b/seed/ts-sdk/api-wide-base-path/src/Client.ts index 1bbc72c1df6f..a518fde3e33f 100644 --- a/seed/ts-sdk/api-wide-base-path/src/Client.ts +++ b/seed/ts-sdk/api-wide-base-path/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiWideBasePathClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/api-wide-base-path/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/api-wide-base-path/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/api-wide-base-path/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/api-wide-base-path/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/api-wide-base-path/vitest.config.mts b/seed/ts-sdk/api-wide-base-path/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/api-wide-base-path/vitest.config.mts +++ b/seed/ts-sdk/api-wide-base-path/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts index 8e7a4768c77c..d3d13bc76c8d 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts @@ -54,8 +54,7 @@ export class SeedAudiencesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/audiences/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/audiences/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/audiences/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/audiences/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/audiences/no-custom-config/vitest.config.mts b/seed/ts-sdk/audiences/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/audiences/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/audiences/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts index 9993659dcef4..f2f25d084faa 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts @@ -42,8 +42,7 @@ export class SeedAudiencesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/audiences/with-partner-audience/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/audiences/with-partner-audience/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/audiences/with-partner-audience/vitest.config.mts b/seed/ts-sdk/audiences/with-partner-audience/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/vitest.config.mts +++ b/seed/ts-sdk/audiences/with-partner-audience/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts index d68219f101ba..dd557cd71d90 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts +++ b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts @@ -42,8 +42,7 @@ export class SeedBasicAuthEnvironmentVariablesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/basic-auth-environment-variables/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/basic-auth-environment-variables/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/basic-auth-environment-variables/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/basic-auth-environment-variables/vitest.config.mts b/seed/ts-sdk/basic-auth-environment-variables/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/vitest.config.mts +++ b/seed/ts-sdk/basic-auth-environment-variables/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/basic-auth/src/Client.ts b/seed/ts-sdk/basic-auth/src/Client.ts index f6718a70786d..c2e274a69055 100644 --- a/seed/ts-sdk/basic-auth/src/Client.ts +++ b/seed/ts-sdk/basic-auth/src/Client.ts @@ -42,8 +42,7 @@ export class SeedBasicAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/basic-auth/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/basic-auth/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/basic-auth/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/basic-auth/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/basic-auth/vitest.config.mts b/seed/ts-sdk/basic-auth/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/basic-auth/vitest.config.mts +++ b/seed/ts-sdk/basic-auth/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts index 00a64162073a..379925cee196 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts +++ b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts @@ -42,8 +42,7 @@ export class SeedBearerTokenEnvironmentVariableClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/bearer-token-environment-variable/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/bearer-token-environment-variable/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/bearer-token-environment-variable/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/bearer-token-environment-variable/vitest.config.mts b/seed/ts-sdk/bearer-token-environment-variable/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/vitest.config.mts +++ b/seed/ts-sdk/bearer-token-environment-variable/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/bytes-download/src/Client.ts b/seed/ts-sdk/bytes-download/src/Client.ts index 6474498931b6..3905b4ed6802 100644 --- a/seed/ts-sdk/bytes-download/src/Client.ts +++ b/seed/ts-sdk/bytes-download/src/Client.ts @@ -42,8 +42,7 @@ export class SeedBytesDownloadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/bytes-download/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/bytes-download/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/bytes-download/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/bytes-download/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/bytes-download/vitest.config.mts b/seed/ts-sdk/bytes-download/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/bytes-download/vitest.config.mts +++ b/seed/ts-sdk/bytes-download/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/bytes-upload/src/Client.ts b/seed/ts-sdk/bytes-upload/src/Client.ts index 38dd903facbe..80d881b93697 100644 --- a/seed/ts-sdk/bytes-upload/src/Client.ts +++ b/seed/ts-sdk/bytes-upload/src/Client.ts @@ -42,8 +42,7 @@ export class SeedBytesUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/bytes-upload/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/bytes-upload/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/bytes-upload/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/bytes-upload/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/bytes-upload/vitest.config.mts b/seed/ts-sdk/bytes-upload/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/bytes-upload/vitest.config.mts +++ b/seed/ts-sdk/bytes-upload/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/circular-references-advanced/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/circular-references-advanced/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/circular-references-advanced/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/circular-references-advanced/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/circular-references-advanced/vitest.config.mts b/seed/ts-sdk/circular-references-advanced/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/circular-references-advanced/vitest.config.mts +++ b/seed/ts-sdk/circular-references-advanced/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/circular-references/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/circular-references/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/circular-references/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/circular-references/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/circular-references/vitest.config.mts b/seed/ts-sdk/circular-references/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/circular-references/vitest.config.mts +++ b/seed/ts-sdk/circular-references/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/client-side-params/src/Client.ts b/seed/ts-sdk/client-side-params/src/Client.ts index 8302b6233ba8..fac747ee5bb5 100644 --- a/seed/ts-sdk/client-side-params/src/Client.ts +++ b/seed/ts-sdk/client-side-params/src/Client.ts @@ -42,8 +42,7 @@ export class SeedClientSideParamsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/client-side-params/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/client-side-params/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/client-side-params/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/client-side-params/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/client-side-params/vitest.config.mts b/seed/ts-sdk/client-side-params/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/client-side-params/vitest.config.mts +++ b/seed/ts-sdk/client-side-params/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/content-type/src/Client.ts b/seed/ts-sdk/content-type/src/Client.ts index ab163e2df8eb..5f58c9ec79a8 100644 --- a/seed/ts-sdk/content-type/src/Client.ts +++ b/seed/ts-sdk/content-type/src/Client.ts @@ -42,8 +42,7 @@ export class SeedContentTypesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/content-type/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/content-type/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/content-type/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/content-type/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/content-type/vitest.config.mts b/seed/ts-sdk/content-type/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/content-type/vitest.config.mts +++ b/seed/ts-sdk/content-type/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/cross-package-type-names/no-custom-config/src/Client.ts b/seed/ts-sdk/cross-package-type-names/no-custom-config/src/Client.ts index 120f67764496..1c18d80b49bd 100644 --- a/seed/ts-sdk/cross-package-type-names/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/no-custom-config/src/Client.ts @@ -54,8 +54,7 @@ export class SeedCrossPackageTypeNamesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/cross-package-type-names/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/cross-package-type-names/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/cross-package-type-names/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/cross-package-type-names/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/cross-package-type-names/no-custom-config/vitest.config.mts b/seed/ts-sdk/cross-package-type-names/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/cross-package-type-names/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/cross-package-type-names/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/cross-package-type-names/serde-layer/src/Client.ts b/seed/ts-sdk/cross-package-type-names/serde-layer/src/Client.ts index 120f67764496..1c18d80b49bd 100644 --- a/seed/ts-sdk/cross-package-type-names/serde-layer/src/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/serde-layer/src/Client.ts @@ -54,8 +54,7 @@ export class SeedCrossPackageTypeNamesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/cross-package-type-names/serde-layer/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/cross-package-type-names/serde-layer/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/cross-package-type-names/serde-layer/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/cross-package-type-names/serde-layer/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/cross-package-type-names/serde-layer/vitest.config.mts b/seed/ts-sdk/cross-package-type-names/serde-layer/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/cross-package-type-names/serde-layer/vitest.config.mts +++ b/seed/ts-sdk/cross-package-type-names/serde-layer/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/dollar-string-examples/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/dollar-string-examples/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/dollar-string-examples/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/dollar-string-examples/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/dollar-string-examples/vitest.config.mts b/seed/ts-sdk/dollar-string-examples/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/dollar-string-examples/vitest.config.mts +++ b/seed/ts-sdk/dollar-string-examples/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/empty-clients/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/empty-clients/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/empty-clients/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/empty-clients/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/empty-clients/vitest.config.mts b/seed/ts-sdk/empty-clients/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/empty-clients/vitest.config.mts +++ b/seed/ts-sdk/empty-clients/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/endpoint-security-auth/src/Client.ts b/seed/ts-sdk/endpoint-security-auth/src/Client.ts index cde2e1850334..5c39c69a4199 100644 --- a/seed/ts-sdk/endpoint-security-auth/src/Client.ts +++ b/seed/ts-sdk/endpoint-security-auth/src/Client.ts @@ -48,8 +48,7 @@ export class SeedEndpointSecurityAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/endpoint-security-auth/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/endpoint-security-auth/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/endpoint-security-auth/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/endpoint-security-auth/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/endpoint-security-auth/vitest.config.mts b/seed/ts-sdk/endpoint-security-auth/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/endpoint-security-auth/vitest.config.mts +++ b/seed/ts-sdk/endpoint-security-auth/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/src/Client.ts b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/src/Client.ts index 35f253fe01c7..0f309b5c1825 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/src/Client.ts +++ b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/src/Client.ts @@ -66,8 +66,7 @@ export class SeedEnumClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/vitest.config.mts b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums-with-serde/vitest.config.mts +++ b/seed/ts-sdk/enum/forward-compatible-enums-with-serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/enum/forward-compatible-enums/src/Client.ts b/seed/ts-sdk/enum/forward-compatible-enums/src/Client.ts index 35f253fe01c7..0f309b5c1825 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums/src/Client.ts +++ b/seed/ts-sdk/enum/forward-compatible-enums/src/Client.ts @@ -66,8 +66,7 @@ export class SeedEnumClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/enum/forward-compatible-enums/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/enum/forward-compatible-enums/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/enum/forward-compatible-enums/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/enum/forward-compatible-enums/vitest.config.mts b/seed/ts-sdk/enum/forward-compatible-enums/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/enum/forward-compatible-enums/vitest.config.mts +++ b/seed/ts-sdk/enum/forward-compatible-enums/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/enum/no-custom-config/src/Client.ts b/seed/ts-sdk/enum/no-custom-config/src/Client.ts index 35f253fe01c7..0f309b5c1825 100644 --- a/seed/ts-sdk/enum/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/enum/no-custom-config/src/Client.ts @@ -66,8 +66,7 @@ export class SeedEnumClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/enum/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/enum/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/enum/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/enum/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/enum/no-custom-config/vitest.config.mts b/seed/ts-sdk/enum/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/enum/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/enum/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/enum/serde/src/Client.ts b/seed/ts-sdk/enum/serde/src/Client.ts index 35f253fe01c7..0f309b5c1825 100644 --- a/seed/ts-sdk/enum/serde/src/Client.ts +++ b/seed/ts-sdk/enum/serde/src/Client.ts @@ -66,8 +66,7 @@ export class SeedEnumClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/enum/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/enum/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/enum/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/enum/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/enum/serde/vitest.config.mts b/seed/ts-sdk/enum/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/enum/serde/vitest.config.mts +++ b/seed/ts-sdk/enum/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/error-property/no-custom-config/src/Client.ts b/seed/ts-sdk/error-property/no-custom-config/src/Client.ts index b88192a70325..fc59c7f919fb 100644 --- a/seed/ts-sdk/error-property/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/error-property/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedErrorPropertyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/error-property/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/error-property/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/error-property/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/error-property/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/error-property/no-custom-config/vitest.config.mts b/seed/ts-sdk/error-property/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/error-property/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/error-property/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/error-property/union-utils/src/Client.ts b/seed/ts-sdk/error-property/union-utils/src/Client.ts index b88192a70325..fc59c7f919fb 100644 --- a/seed/ts-sdk/error-property/union-utils/src/Client.ts +++ b/seed/ts-sdk/error-property/union-utils/src/Client.ts @@ -42,8 +42,7 @@ export class SeedErrorPropertyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/error-property/union-utils/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/error-property/union-utils/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/error-property/union-utils/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/error-property/union-utils/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/error-property/union-utils/vitest.config.mts b/seed/ts-sdk/error-property/union-utils/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/error-property/union-utils/vitest.config.mts +++ b/seed/ts-sdk/error-property/union-utils/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/errors/src/Client.ts b/seed/ts-sdk/errors/src/Client.ts index ecf0952b6d9f..e3959e9f94d1 100644 --- a/seed/ts-sdk/errors/src/Client.ts +++ b/seed/ts-sdk/errors/src/Client.ts @@ -42,8 +42,7 @@ export class SeedErrorsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/errors/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/errors/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/errors/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/errors/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/errors/vitest.config.mts b/seed/ts-sdk/errors/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/errors/vitest.config.mts +++ b/seed/ts-sdk/errors/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts index fd6a9058aa50..c9387feab019 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts @@ -155,8 +155,7 @@ export class SeedExamplesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/examples/examples-with-api-reference/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/examples/examples-with-api-reference/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/examples/examples-with-api-reference/vitest.config.mts b/seed/ts-sdk/examples/examples-with-api-reference/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/vitest.config.mts +++ b/seed/ts-sdk/examples/examples-with-api-reference/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts index fd6a9058aa50..c9387feab019 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts @@ -155,8 +155,7 @@ export class SeedExamplesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/examples/retain-original-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/examples/retain-original-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/examples/retain-original-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/examples/retain-original-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/examples/retain-original-casing/vitest.config.mts b/seed/ts-sdk/examples/retain-original-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/examples/retain-original-casing/vitest.config.mts +++ b/seed/ts-sdk/examples/retain-original-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/reference.md b/seed/ts-sdk/exhaustive/allow-extra-fields/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/reference.md +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/vitest.config.mts b/seed/ts-sdk/exhaustive/allow-extra-fields/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/reference.md b/seed/ts-sdk/exhaustive/bigint-serde-layer/reference.md index 81f245dc8eac..f1b0926f79ff 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/reference.md +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/snippet.json b/seed/ts-sdk/exhaustive/bigint-serde-layer/snippet.json index 1c9d39b59729..639a0234f9fc 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/snippet.json +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/Client.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts index ce6c03c0a255..feadfd90f609 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts @@ -733,6 +733,86 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.types.MapOfDocumentedUnknownType.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.types.MapOfDocumentedUnknownType.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..1d14f42f690d --- /dev/null +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../../api/index.js"; +import * as core from "../../../../../../core/index.js"; +import type * as serializers from "../../../../../index.js"; +import { DocumentedUnknownType } from "./DocumentedUnknownType.js"; + +export const MapOfDocumentedUnknownType: core.serialization.Schema< + serializers.types.MapOfDocumentedUnknownType.Raw, + SeedExhaustive.types.MapOfDocumentedUnknownType +> = core.serialization.record(core.serialization.string(), DocumentedUnknownType); + +export declare namespace MapOfDocumentedUnknownType { + export type Raw = Record; +} diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/src/serialization/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/wire/endpoints/object.test.ts index 78f539296788..8d9dce3d8f7d 100644 --- a/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/bigint-serde-layer/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/bigint/reference.md b/seed/ts-sdk/exhaustive/bigint/reference.md index 03cfb90bc0f6..960533acce9d 100644 --- a/seed/ts-sdk/exhaustive/bigint/reference.md +++ b/seed/ts-sdk/exhaustive/bigint/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/bigint/snippet.json b/seed/ts-sdk/exhaustive/bigint/snippet.json index 5c5f1330d69a..afba406b7e26 100644 --- a/seed/ts-sdk/exhaustive/bigint/snippet.json +++ b/seed/ts-sdk/exhaustive/bigint/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/bigint/src/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/resources/object/client/Client.ts index ce05ca701fe9..7216d0e4e30f 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/bigint/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/bigint/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/bigint/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/bigint/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/bigint/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/bigint/tests/wire/endpoints/object.test.ts index a2d62727274d..43339fcdd2ca 100644 --- a/seed/ts-sdk/exhaustive/bigint/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/bigint/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/reference.md b/seed/ts-sdk/exhaustive/consolidate-type-files/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/reference.md +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/snippet.json b/seed/ts-sdk/exhaustive/consolidate-type-files/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/snippet.json +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/src/Client.ts b/seed/ts-sdk/exhaustive/consolidate-type-files/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/src/Client.ts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/types/resources/object/types/types.ts b/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/types/resources/object/types/types.ts index 991ce7082da7..9738b90eb60a 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/types/resources/object/types/types.ts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/src/api/resources/types/resources/object/types/types.ts @@ -74,3 +74,8 @@ export interface ObjectWithDocumentedUnknownType { * Tests that unknown types are able to preserve their docstrings. */ export type DocumentedUnknownType = unknown; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/consolidate-type-files/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/consolidate-type-files/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/consolidate-type-files/vitest.config.mts b/seed/ts-sdk/exhaustive/consolidate-type-files/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/consolidate-type-files/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/consolidate-type-files/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/reference.md b/seed/ts-sdk/exhaustive/export-all-requests-at-root/reference.md index a330089c9bd1..dff5cb72327c 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/reference.md +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/snippet.json b/seed/ts-sdk/exhaustive/export-all-requests-at-root/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/snippet.json +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/Client.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/Client.ts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/export-all-requests-at-root/vitest.config.mts b/seed/ts-sdk/exhaustive/export-all-requests-at-root/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/export-all-requests-at-root/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/export-all-requests-at-root/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/Client.js b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/Client.js index a9513c199071..7936e0ba2360 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/Client.js +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/Client.js @@ -87,9 +87,9 @@ class SeedExhaustiveClient { */ fetch(input, init, requestOptions) { return __awaiter(this, void 0, void 0, function* () { + var _a; return core.makePassthroughRequest(input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.d.ts b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.d.ts index 6a9dfb879f12..083a6551bc66 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.d.ts +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.d.ts @@ -191,6 +191,19 @@ export declare class ObjectClient { */ getAndReturnWithDocumentedUnknownType(request: SeedExhaustive.types.ObjectWithDocumentedUnknownType, requestOptions?: ObjectClient.RequestOptions): core.HttpResponsePromise; private __getAndReturnWithDocumentedUnknownType; + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + getAndReturnMapOfDocumentedUnknownType(request: SeedExhaustive.types.MapOfDocumentedUnknownType, requestOptions?: ObjectClient.RequestOptions): core.HttpResponsePromise; + private __getAndReturnMapOfDocumentedUnknownType; /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.js b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.js index 8f39515586f1..fdcad0990244 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.js +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/endpoints/resources/object/client/Client.js @@ -522,6 +522,55 @@ class ObjectClient { return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/object/get-and-return-with-documented-unknown-type"); }); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + getAndReturnMapOfDocumentedUnknownType(request, requestOptions) { + return core.HttpResponsePromise.fromPromise(this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions)); + } + __getAndReturnMapOfDocumentedUnknownType(request, requestOptions) { + return __awaiter(this, void 0, void 0, function* () { + var _a, _b, _c, _d, _e, _f, _g, _h; + const _authRequest = yield this._options.authProvider.getAuthRequest(); + const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers); + const _response = yield core.fetcher({ + url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "/object/get-and-return-map-of-documented-unknown-type"), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams, + requestType: "json", + body: request, + timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000, + maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body, + rawResponse: _response.rawResponse, + }; + } + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/object/get-and-return-map-of-documented-unknown-type"); + }); + } /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.ts b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.ts new file mode 100644 index 000000000000..ffdd9fbf2236 --- /dev/null +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.ts @@ -0,0 +1,5 @@ +import type * as SeedExhaustive from "../../../../../index.js"; +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.js b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.js new file mode 100644 index 000000000000..860f74f7be95 --- /dev/null +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.js @@ -0,0 +1,3 @@ +"use strict"; +// This file was auto-generated by Fern from our API Definition. +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.d.ts b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.d.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.d.ts +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.d.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.js b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.js index 44b910a7195e..578111aa8625 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.js +++ b/seed/ts-sdk/exhaustive/local-files-no-source/cjs/api/resources/types/resources/object/types/index.js @@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./DocumentedUnknownType.js"), exports); __exportStar(require("./DoubleOptional.js"), exports); +__exportStar(require("./MapOfDocumentedUnknownType.js"), exports); __exportStar(require("./NestedObjectWithOptionalField.js"), exports); __exportStar(require("./NestedObjectWithRequiredField.js"), exports); __exportStar(require("./ObjectWithDatetimeLikeString.js"), exports); diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/Client.mjs b/seed/ts-sdk/exhaustive/local-files-no-source/esm/Client.mjs index 4ae24f89dd9a..a330fe065781 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/esm/Client.mjs +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/Client.mjs @@ -51,9 +51,9 @@ export class SeedExhaustiveClient { */ fetch(input, init, requestOptions) { return __awaiter(this, void 0, void 0, function* () { + var _a; return core.makePassthroughRequest(input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.d.mts b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.d.mts index a531a33a6611..d1a2b9a866a3 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.d.mts +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.d.mts @@ -191,6 +191,19 @@ export declare class ObjectClient { */ getAndReturnWithDocumentedUnknownType(request: SeedExhaustive.types.ObjectWithDocumentedUnknownType, requestOptions?: ObjectClient.RequestOptions): core.HttpResponsePromise; private __getAndReturnWithDocumentedUnknownType; + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + getAndReturnMapOfDocumentedUnknownType(request: SeedExhaustive.types.MapOfDocumentedUnknownType, requestOptions?: ObjectClient.RequestOptions): core.HttpResponsePromise; + private __getAndReturnMapOfDocumentedUnknownType; /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.mjs b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.mjs index 3b7d558c19cd..414fc4ec2cca 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.mjs +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/endpoints/resources/object/client/Client.mjs @@ -486,6 +486,55 @@ export class ObjectClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/object/get-and-return-with-documented-unknown-type"); }); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + getAndReturnMapOfDocumentedUnknownType(request, requestOptions) { + return core.HttpResponsePromise.fromPromise(this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions)); + } + __getAndReturnMapOfDocumentedUnknownType(request, requestOptions) { + return __awaiter(this, void 0, void 0, function* () { + var _a, _b, _c, _d, _e, _f, _g, _h; + const _authRequest = yield this._options.authProvider.getAuthRequest(); + const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers); + const _response = yield core.fetcher({ + url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "/object/get-and-return-map-of-documented-unknown-type"), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams, + requestType: "json", + body: request, + timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000, + maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries, + abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal, + fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body, + rawResponse: _response.rawResponse, + }; + } + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/object/get-and-return-map-of-documented-unknown-type"); + }); + } /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.mts b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.mts new file mode 100644 index 000000000000..890be5997dcd --- /dev/null +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.d.mts @@ -0,0 +1,5 @@ +import type * as SeedExhaustive from "../../../../../index.mjs"; +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.mjs b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.mjs new file mode 100644 index 000000000000..524f53c4d3af --- /dev/null +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.mjs @@ -0,0 +1,2 @@ +// This file was auto-generated by Fern from our API Definition. +export {}; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.d.mts b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.d.mts index 8ee82eb3f69e..dcdbd63e23e1 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.d.mts +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.d.mts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.mjs"; export * from "./DoubleOptional.mjs"; +export * from "./MapOfDocumentedUnknownType.mjs"; export * from "./NestedObjectWithOptionalField.mjs"; export * from "./NestedObjectWithRequiredField.mjs"; export * from "./ObjectWithDatetimeLikeString.mjs"; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.mjs b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.mjs index 8ee82eb3f69e..dcdbd63e23e1 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.mjs +++ b/seed/ts-sdk/exhaustive/local-files-no-source/esm/api/resources/types/resources/object/types/index.mjs @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.mjs"; export * from "./DoubleOptional.mjs"; +export * from "./MapOfDocumentedUnknownType.mjs"; export * from "./NestedObjectWithOptionalField.mjs"; export * from "./NestedObjectWithRequiredField.mjs"; export * from "./ObjectWithDatetimeLikeString.mjs"; diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/reference.md b/seed/ts-sdk/exhaustive/local-files-no-source/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/reference.md +++ b/seed/ts-sdk/exhaustive/local-files-no-source/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/local-files-no-source/snippet.json b/seed/ts-sdk/exhaustive/local-files-no-source/snippet.json index 6a9de08d1eb6..7d06603d2bee 100644 --- a/seed/ts-sdk/exhaustive/local-files-no-source/snippet.json +++ b/seed/ts-sdk/exhaustive/local-files-no-source/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/local-files/Client.ts b/seed/ts-sdk/exhaustive/local-files/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/local-files/Client.ts +++ b/seed/ts-sdk/exhaustive/local-files/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/local-files/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/local-files/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/local-files/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/local-files/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/local-files/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/local-files/snippet.json b/seed/ts-sdk/exhaustive/local-files/snippet.json index 6a9de08d1eb6..7d06603d2bee 100644 --- a/seed/ts-sdk/exhaustive/local-files/snippet.json +++ b/seed/ts-sdk/exhaustive/local-files/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/multiple-exports/reference.md b/seed/ts-sdk/exhaustive/multiple-exports/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/reference.md +++ b/seed/ts-sdk/exhaustive/multiple-exports/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/multiple-exports/snippet.json b/seed/ts-sdk/exhaustive/multiple-exports/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/snippet.json +++ b/seed/ts-sdk/exhaustive/multiple-exports/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/multiple-exports/src/Client.ts b/seed/ts-sdk/exhaustive/multiple-exports/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/src/Client.ts +++ b/seed/ts-sdk/exhaustive/multiple-exports/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/multiple-exports/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/multiple-exports/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/multiple-exports/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/multiple-exports/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/multiple-exports/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/multiple-exports/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/multiple-exports/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/multiple-exports/vitest.config.mts b/seed/ts-sdk/exhaustive/multiple-exports/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/multiple-exports/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/multiple-exports/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/reference.md b/seed/ts-sdk/exhaustive/never-throw-errors/reference.md index d05a31e7afa7..35d0cfa6cfec 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/reference.md +++ b/seed/ts-sdk/exhaustive/never-throw-errors/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> core.APIResponse<SeedExhaustive.MapOfDocumentedUnknownType, SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/snippet.json b/seed/ts-sdk/exhaustive/never-throw-errors/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/snippet.json +++ b/seed/ts-sdk/exhaustive/never-throw-errors/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/Client.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/src/Client.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/Client.ts index 31a9a323436a..d83cdc89dd8e 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/Client.ts @@ -754,6 +754,90 @@ export class ObjectClient { }; } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise< + core.APIResponse< + SeedExhaustive.types.MapOfDocumentedUnknownType, + SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error + > + > { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise< + core.WithRawResponse< + core.APIResponse< + SeedExhaustive.types.MapOfDocumentedUnknownType, + SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error + > + > + > { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: { + ok: true, + body: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + headers: _response.headers, + rawResponse: _response.rawResponse, + }, + rawResponse: _response.rawResponse, + }; + } + + return { + data: { + ok: false, + error: SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error._unknown( + _response.error, + ), + rawResponse: _response.rawResponse, + }, + rawResponse: _response.rawResponse, + }; + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/getAndReturnMapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/getAndReturnMapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..75879f0175ab --- /dev/null +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/getAndReturnMapOfDocumentedUnknownType.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as core from "../../../../../../core/index.js"; +import type * as SeedExhaustive from "../../../../../index.js"; + +export type Error = SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error._Unknown; + +export namespace Error { + export interface _Unknown { + statusCode: void; + content: core.Fetcher.Error; + } + + export interface _Visitor<_Result> { + _other: (value: core.Fetcher.Error) => _Result; + } +} + +export const Error = { + _unknown: ( + fetcherError: core.Fetcher.Error, + ): SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error._Unknown => { + return { + statusCode: undefined, + content: fetcherError, + }; + }, + + _visit: <_Result>( + value: SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error, + visitor: SeedExhaustive.endpoints.object.getAndReturnMapOfDocumentedUnknownType.Error._Visitor<_Result>, + ): _Result => { + switch (value.statusCode) { + default: + return visitor._other(value.content); + } + }, +} as const; diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/index.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/index.ts index 09ba24daf1cd..56729c2d37cd 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/index.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/endpoints/resources/object/client/index.ts @@ -1,3 +1,4 @@ +export * as getAndReturnMapOfDocumentedUnknownType from "./getAndReturnMapOfDocumentedUnknownType.js"; export * as getAndReturnNestedWithOptionalField from "./getAndReturnNestedWithOptionalField.js"; export * as getAndReturnNestedWithRequiredField from "./getAndReturnNestedWithRequiredField.js"; export * as getAndReturnNestedWithRequiredFieldAsList from "./getAndReturnNestedWithRequiredFieldAsList.js"; diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/never-throw-errors/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/never-throw-errors/tests/wire/endpoints/object.test.ts index 8dce7a28a702..f9cdb5778e3e 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/tests/wire/endpoints/object.test.ts @@ -546,6 +546,38 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + body: { + string: { + key: "value", + }, + }, + ok: true, + headers: expect.any(Object), + rawResponse: expect.any(Object), + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/never-throw-errors/vitest.config.mts b/seed/ts-sdk/exhaustive/never-throw-errors/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/never-throw-errors/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/never-throw-errors/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/no-custom-config/reference.md b/seed/ts-sdk/exhaustive/no-custom-config/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/reference.md +++ b/seed/ts-sdk/exhaustive/no-custom-config/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/no-custom-config/snippet.json b/seed/ts-sdk/exhaustive/no-custom-config/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/snippet.json +++ b/seed/ts-sdk/exhaustive/no-custom-config/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/no-custom-config/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/no-custom-config/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/no-custom-config/vitest.config.mts b/seed/ts-sdk/exhaustive/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/node-fetch/reference.md b/seed/ts-sdk/exhaustive/node-fetch/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/reference.md +++ b/seed/ts-sdk/exhaustive/node-fetch/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/node-fetch/snippet.json b/seed/ts-sdk/exhaustive/node-fetch/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/snippet.json +++ b/seed/ts-sdk/exhaustive/node-fetch/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/node-fetch/src/Client.ts b/seed/ts-sdk/exhaustive/node-fetch/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/src/Client.ts +++ b/seed/ts-sdk/exhaustive/node-fetch/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/node-fetch/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/node-fetch/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/node-fetch/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/node-fetch/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/node-fetch/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/node-fetch/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/node-fetch/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/node-fetch/vitest.config.mts b/seed/ts-sdk/exhaustive/node-fetch/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/node-fetch/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/node-fetch/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/output-src-only/Client.ts b/seed/ts-sdk/exhaustive/output-src-only/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/output-src-only/Client.ts +++ b/seed/ts-sdk/exhaustive/output-src-only/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/output-src-only/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/output-src-only/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/output-src-only/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/output-src-only/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/output-src-only/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/output-src-only/snippet.json b/seed/ts-sdk/exhaustive/output-src-only/snippet.json index 6a9de08d1eb6..7d06603d2bee 100644 --- a/seed/ts-sdk/exhaustive/output-src-only/snippet.json +++ b/seed/ts-sdk/exhaustive/output-src-only/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"./src/Client\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/package-path/reference.md b/seed/ts-sdk/exhaustive/package-path/reference.md index 562a7fc109a2..9ee9ac44a56f 100644 --- a/seed/ts-sdk/exhaustive/package-path/reference.md +++ b/seed/ts-sdk/exhaustive/package-path/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/package-path/snippet.json b/seed/ts-sdk/exhaustive/package-path/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/package-path/snippet.json +++ b/seed/ts-sdk/exhaustive/package-path/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/Client.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/Client.ts +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/mock-server/MockServerPool.ts index 33b57f0c9125..d48323281df0 100644 --- a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/wire/endpoints/object.test.ts index 00a25b6e727e..642b4dc745d4 100644 --- a/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/package-path/src/test-packagePath/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/package-path/vitest.config.mts b/seed/ts-sdk/exhaustive/package-path/vitest.config.mts index 49e3e6e86920..7686e34b88e7 100644 --- a/seed/ts-sdk/exhaustive/package-path/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/package-path/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./src/test-packagePath/tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/reference.md b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/reference.md index 901688db80fd..12bfff564ee3 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/reference.md +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/snippet.json b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/snippet.json index 85e4368487df..e386dcd71499 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/snippet.json +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/vitest.config.mts b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-camel-case/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/parameter-naming-camel-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/reference.md b/seed/ts-sdk/exhaustive/parameter-naming-original-name/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/reference.md +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/snippet.json b/seed/ts-sdk/exhaustive/parameter-naming-original-name/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/snippet.json +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-original-name/vitest.config.mts b/seed/ts-sdk/exhaustive/parameter-naming-original-name/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-original-name/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/parameter-naming-original-name/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/reference.md b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/reference.md index e070bbd03448..11c035b5db27 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/reference.md +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/snippet.json b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/snippet.json index a0c1916545b4..7532bf5d0def 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/snippet.json +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/vitest.config.mts b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-snake-case/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/parameter-naming-snake-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/reference.md b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/reference.md +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/snippet.json b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/snippet.json +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/vitest.config.mts b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/parameter-naming-wire-value/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/parameter-naming-wire-value/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/reference.md b/seed/ts-sdk/exhaustive/retain-original-casing/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/reference.md +++ b/seed/ts-sdk/exhaustive/retain-original-casing/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json b/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json +++ b/seed/ts-sdk/exhaustive/retain-original-casing/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/retain-original-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/retain-original-casing/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/vitest.config.mts b/seed/ts-sdk/exhaustive/retain-original-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/serde-layer/reference.md b/seed/ts-sdk/exhaustive/serde-layer/reference.md index 94131655f146..8c9541756b65 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/reference.md +++ b/seed/ts-sdk/exhaustive/serde-layer/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/serde-layer/snippet.json b/seed/ts-sdk/exhaustive/serde-layer/snippet.json index 28efc0cbffb6..57975de1d2e7 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/snippet.json +++ b/seed/ts-sdk/exhaustive/serde-layer/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/Client.ts b/seed/ts-sdk/exhaustive/serde-layer/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/src/Client.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts index 252c763bc087..9892651d9064 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/endpoints/resources/object/client/Client.ts @@ -733,6 +733,86 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.types.MapOfDocumentedUnknownType.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.types.MapOfDocumentedUnknownType.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..1d14f42f690d --- /dev/null +++ b/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../../api/index.js"; +import * as core from "../../../../../../core/index.js"; +import type * as serializers from "../../../../../index.js"; +import { DocumentedUnknownType } from "./DocumentedUnknownType.js"; + +export const MapOfDocumentedUnknownType: core.serialization.Schema< + serializers.types.MapOfDocumentedUnknownType.Raw, + SeedExhaustive.types.MapOfDocumentedUnknownType +> = core.serialization.record(core.serialization.string(), DocumentedUnknownType); + +export declare namespace MapOfDocumentedUnknownType { + export type Raw = Record; +} diff --git a/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/src/serialization/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/serde-layer/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/serde-layer/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/serde-layer/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/serde-layer/tests/wire/endpoints/object.test.ts index c5ebe6c91d5d..70b4146c2e31 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/serde-layer/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/serde-layer/vitest.config.mts b/seed/ts-sdk/exhaustive/serde-layer/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/serde-layer/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/serde-layer/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/use-jest/reference.md b/seed/ts-sdk/exhaustive/use-jest/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/use-jest/reference.md +++ b/seed/ts-sdk/exhaustive/use-jest/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/use-jest/snippet.json b/seed/ts-sdk/exhaustive/use-jest/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/use-jest/snippet.json +++ b/seed/ts-sdk/exhaustive/use-jest/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/use-jest/src/Client.ts b/seed/ts-sdk/exhaustive/use-jest/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/use-jest/src/Client.ts +++ b/seed/ts-sdk/exhaustive/use-jest/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/use-jest/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/use-jest/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/use-jest/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/use-jest/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/use-jest/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/use-jest/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/use-jest/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/use-jest/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/use-jest/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/use-jest/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/use-jest/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/reference.md b/seed/ts-sdk/exhaustive/web-stream-wrapper/reference.md index 137689618bf8..92280133da41 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/reference.md +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/reference.md @@ -1376,6 +1376,59 @@ await client.endpoints.object.getAndReturnWithDocumentedUnknownType({ + + + + +
client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ ...params }) -> SeedExhaustive.MapOfDocumentedUnknownType +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + "string": { + "key": "value" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SeedExhaustive.MapOfDocumentedUnknownType` + +
+
+ +
+
+ +**requestOptions:** `ObjectClient.RequestOptions` + +
+
+
+
+ +
diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/snippet.json b/seed/ts-sdk/exhaustive/web-stream-wrapper/snippet.json index dd828218feed..51cf479630d9 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/snippet.json +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/snippet.json @@ -265,6 +265,17 @@ "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnWithDocumentedUnknownType({\n documentedUnknownType: {\n \"key\": \"value\"\n }\n});\n" } }, + { + "id": { + "path": "/object/get-and-return-map-of-documented-unknown-type", + "method": "POST", + "identifier_override": "endpoint_endpoints/object.getAndReturnMapOfDocumentedUnknownType" + }, + "snippet": { + "type": "typescript", + "client": "import { SeedExhaustiveClient } from \"@fern/exhaustive\";\n\nconst client = new SeedExhaustiveClient({ environment: \"YOUR_BASE_URL\", token: \"YOUR_TOKEN\" });\nawait client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({\n \"string\": {\n \"key\": \"value\"\n }\n});\n" + } + }, { "id": { "path": "/object/get-and-return-with-datetime-like-string", diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/Client.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/Client.ts index 6e2853bdd5da..d919052b5bf5 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/Client.ts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/Client.ts @@ -66,8 +66,7 @@ export class SeedExhaustiveClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/endpoints/resources/object/client/Client.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/endpoints/resources/object/client/Client.ts index e09d5fe5674b..088699fcba8d 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/endpoints/resources/object/client/Client.ts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/endpoints/resources/object/client/Client.ts @@ -660,6 +660,77 @@ export class ObjectClient { ); } + /** + * @param {SeedExhaustive.types.MapOfDocumentedUnknownType} request + * @param {ObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + * "string": { + * "key": "value" + * } + * }) + */ + public getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__getAndReturnMapOfDocumentedUnknownType(request, requestOptions), + ); + } + + private async __getAndReturnMapOfDocumentedUnknownType( + request: SeedExhaustive.types.MapOfDocumentedUnknownType, + requestOptions?: ObjectClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await core.fetcher({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)), + "/object/get-and-return-map-of-documented-unknown-type", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as SeedExhaustive.types.MapOfDocumentedUnknownType, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedExhaustiveError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/object/get-and-return-map-of-documented-unknown-type", + ); + } + /** * Tests that string fields containing datetime-like values are NOT reformatted. * The datetimeLikeString field should preserve its exact value "2023-08-31T14:15:22Z" diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts new file mode 100644 index 000000000000..b061b2728b8f --- /dev/null +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/MapOfDocumentedUnknownType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as SeedExhaustive from "../../../../../index.js"; + +/** + * Tests that map value types with unknown types don't get spurious | undefined. + */ +export type MapOfDocumentedUnknownType = Record; diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/index.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/index.ts index fee77a677800..f722d82ca9d5 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/index.ts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/src/api/resources/types/resources/object/types/index.ts @@ -1,5 +1,6 @@ export * from "./DocumentedUnknownType.js"; export * from "./DoubleOptional.js"; +export * from "./MapOfDocumentedUnknownType.js"; export * from "./NestedObjectWithOptionalField.js"; export * from "./NestedObjectWithRequiredField.js"; export * from "./ObjectWithDatetimeLikeString.js"; diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/wire/endpoints/object.test.ts b/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/wire/endpoints/object.test.ts index 864887217e74..bd9b3cb4155e 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/wire/endpoints/object.test.ts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/tests/wire/endpoints/object.test.ts @@ -506,6 +506,33 @@ describe("ObjectClient", () => { }); }); + test("getAndReturnMapOfDocumentedUnknownType", async () => { + const server = mockServerPool.createServer(); + const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { string: { key: "value" } }; + const rawResponseBody = { string: { key: "value" } }; + + server + .mockEndpoint() + .post("/object/get-and-return-map-of-documented-unknown-type") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.endpoints.object.getAndReturnMapOfDocumentedUnknownType({ + string: { + key: "value", + }, + }); + expect(response).toEqual({ + string: { + key: "value", + }, + }); + }); + test("getAndReturnWithDatetimeLikeString", async () => { const server = mockServerPool.createServer(); const client = new SeedExhaustiveClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/seed/ts-sdk/exhaustive/web-stream-wrapper/vitest.config.mts b/seed/ts-sdk/exhaustive/web-stream-wrapper/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/web-stream-wrapper/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/web-stream-wrapper/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/exhaustive/with-audiences/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/exhaustive/with-audiences/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/exhaustive/with-audiences/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/exhaustive/with-audiences/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/exhaustive/with-audiences/vitest.config.mts b/seed/ts-sdk/exhaustive/with-audiences/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/exhaustive/with-audiences/vitest.config.mts +++ b/seed/ts-sdk/exhaustive/with-audiences/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/extends/src/Client.ts b/seed/ts-sdk/extends/src/Client.ts index 0425a1962097..b6be69e1e058 100644 --- a/seed/ts-sdk/extends/src/Client.ts +++ b/seed/ts-sdk/extends/src/Client.ts @@ -101,8 +101,7 @@ export class SeedExtendsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/extends/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/extends/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/extends/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/extends/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/extends/vitest.config.mts b/seed/ts-sdk/extends/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/extends/vitest.config.mts +++ b/seed/ts-sdk/extends/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/extra-properties/src/Client.ts b/seed/ts-sdk/extra-properties/src/Client.ts index 4198920772e3..2b0a65d2194a 100644 --- a/seed/ts-sdk/extra-properties/src/Client.ts +++ b/seed/ts-sdk/extra-properties/src/Client.ts @@ -42,8 +42,7 @@ export class SeedExtraPropertiesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/extra-properties/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/extra-properties/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/extra-properties/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/extra-properties/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/extra-properties/vitest.config.mts b/seed/ts-sdk/extra-properties/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/extra-properties/vitest.config.mts +++ b/seed/ts-sdk/extra-properties/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-download/file-download-response-headers/src/Client.ts b/seed/ts-sdk/file-download/file-download-response-headers/src/Client.ts index 39e91f624774..0c40f0574399 100644 --- a/seed/ts-sdk/file-download/file-download-response-headers/src/Client.ts +++ b/seed/ts-sdk/file-download/file-download-response-headers/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileDownloadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-download/file-download-response-headers/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-download/file-download-response-headers/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-download/file-download-response-headers/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-download/file-download-response-headers/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-download/file-download-response-headers/vitest.config.mts b/seed/ts-sdk/file-download/file-download-response-headers/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-download/file-download-response-headers/vitest.config.mts +++ b/seed/ts-sdk/file-download/file-download-response-headers/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts index 39e91f624774..0c40f0574399 100644 --- a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileDownloadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-download/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-download/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-download/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-download/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-download/no-custom-config/vitest.config.mts b/seed/ts-sdk/file-download/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-download/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/file-download/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-download/stream-wrapper/src/Client.ts b/seed/ts-sdk/file-download/stream-wrapper/src/Client.ts index 39e91f624774..0c40f0574399 100644 --- a/seed/ts-sdk/file-download/stream-wrapper/src/Client.ts +++ b/seed/ts-sdk/file-download/stream-wrapper/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileDownloadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-download/stream-wrapper/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-download/stream-wrapper/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-download/stream-wrapper/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-download/stream-wrapper/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload-openapi/src/Client.ts b/seed/ts-sdk/file-upload-openapi/src/Client.ts index dfa8c2dadbd8..3108f7e6f22a 100644 --- a/seed/ts-sdk/file-upload-openapi/src/Client.ts +++ b/seed/ts-sdk/file-upload-openapi/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload-openapi/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload-openapi/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload-openapi/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload-openapi/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload-openapi/vitest.config.mts b/seed/ts-sdk/file-upload-openapi/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-upload-openapi/vitest.config.mts +++ b/seed/ts-sdk/file-upload-openapi/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-upload/form-data-node16/src/Client.ts b/seed/ts-sdk/file-upload/form-data-node16/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/form-data-node16/src/Client.ts +++ b/seed/ts-sdk/file-upload/form-data-node16/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/form-data-node16/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/form-data-node16/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/form-data-node16/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/form-data-node16/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload/form-data-node16/vitest.config.mts b/seed/ts-sdk/file-upload/form-data-node16/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-upload/form-data-node16/vitest.config.mts +++ b/seed/ts-sdk/file-upload/form-data-node16/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-upload/inline/src/Client.ts b/seed/ts-sdk/file-upload/inline/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/inline/src/Client.ts +++ b/seed/ts-sdk/file-upload/inline/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/inline/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/inline/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/inline/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/inline/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload/inline/vitest.config.mts b/seed/ts-sdk/file-upload/inline/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-upload/inline/vitest.config.mts +++ b/seed/ts-sdk/file-upload/inline/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload/no-custom-config/vitest.config.mts b/seed/ts-sdk/file-upload/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/file-upload/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-upload/serde/src/Client.ts b/seed/ts-sdk/file-upload/serde/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/serde/src/Client.ts +++ b/seed/ts-sdk/file-upload/serde/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload/serde/vitest.config.mts b/seed/ts-sdk/file-upload/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/file-upload/serde/vitest.config.mts +++ b/seed/ts-sdk/file-upload/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/file-upload/use-jest/src/Client.ts b/seed/ts-sdk/file-upload/use-jest/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/use-jest/src/Client.ts +++ b/seed/ts-sdk/file-upload/use-jest/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/use-jest/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/use-jest/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/use-jest/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/use-jest/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/file-upload/wrapper/src/Client.ts b/seed/ts-sdk/file-upload/wrapper/src/Client.ts index 03d1130a67bb..08c30cfee90e 100644 --- a/seed/ts-sdk/file-upload/wrapper/src/Client.ts +++ b/seed/ts-sdk/file-upload/wrapper/src/Client.ts @@ -42,8 +42,7 @@ export class SeedFileUploadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/file-upload/wrapper/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/file-upload/wrapper/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/file-upload/wrapper/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/file-upload/wrapper/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/folders/src/Client.ts b/seed/ts-sdk/folders/src/Client.ts index a727d2373236..712d037415a5 100644 --- a/seed/ts-sdk/folders/src/Client.ts +++ b/seed/ts-sdk/folders/src/Client.ts @@ -91,8 +91,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/folders/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/folders/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/folders/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/folders/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/folders/vitest.config.mts b/seed/ts-sdk/folders/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/folders/vitest.config.mts +++ b/seed/ts-sdk/folders/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/header-auth-environment-variable/src/Client.ts b/seed/ts-sdk/header-auth-environment-variable/src/Client.ts index 3b64e372e97b..3dd6e0ff72ec 100644 --- a/seed/ts-sdk/header-auth-environment-variable/src/Client.ts +++ b/seed/ts-sdk/header-auth-environment-variable/src/Client.ts @@ -42,8 +42,7 @@ export class SeedHeaderTokenEnvironmentVariableClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/header-auth-environment-variable/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/header-auth-environment-variable/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/header-auth-environment-variable/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/header-auth-environment-variable/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/header-auth-environment-variable/vitest.config.mts b/seed/ts-sdk/header-auth-environment-variable/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/header-auth-environment-variable/vitest.config.mts +++ b/seed/ts-sdk/header-auth-environment-variable/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/header-auth/src/Client.ts b/seed/ts-sdk/header-auth/src/Client.ts index a115e706e98c..4935202679c9 100644 --- a/seed/ts-sdk/header-auth/src/Client.ts +++ b/seed/ts-sdk/header-auth/src/Client.ts @@ -42,8 +42,7 @@ export class SeedHeaderTokenClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/header-auth/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/header-auth/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/header-auth/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/header-auth/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/header-auth/vitest.config.mts b/seed/ts-sdk/header-auth/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/header-auth/vitest.config.mts +++ b/seed/ts-sdk/header-auth/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/http-head/src/Client.ts b/seed/ts-sdk/http-head/src/Client.ts index 019555893fb2..793f8a21fb89 100644 --- a/seed/ts-sdk/http-head/src/Client.ts +++ b/seed/ts-sdk/http-head/src/Client.ts @@ -42,8 +42,7 @@ export class SeedHttpHeadClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/http-head/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/http-head/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/http-head/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/http-head/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/http-head/vitest.config.mts b/seed/ts-sdk/http-head/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/http-head/vitest.config.mts +++ b/seed/ts-sdk/http-head/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/idempotency-headers/src/Client.ts b/seed/ts-sdk/idempotency-headers/src/Client.ts index 215024f2fe5a..e73d3db66dd2 100644 --- a/seed/ts-sdk/idempotency-headers/src/Client.ts +++ b/seed/ts-sdk/idempotency-headers/src/Client.ts @@ -42,8 +42,7 @@ export class SeedIdempotencyHeadersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/idempotency-headers/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/idempotency-headers/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/idempotency-headers/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/idempotency-headers/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/idempotency-headers/vitest.config.mts b/seed/ts-sdk/idempotency-headers/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/idempotency-headers/vitest.config.mts +++ b/seed/ts-sdk/idempotency-headers/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/imdb/branded-string-aliases/src/Client.ts b/seed/ts-sdk/imdb/branded-string-aliases/src/Client.ts index 5330649d1bed..2184fc26a83a 100644 --- a/seed/ts-sdk/imdb/branded-string-aliases/src/Client.ts +++ b/seed/ts-sdk/imdb/branded-string-aliases/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/imdb/branded-string-aliases/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/imdb/branded-string-aliases/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/imdb/branded-string-aliases/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/imdb/branded-string-aliases/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/imdb/branded-string-aliases/vitest.config.mts b/seed/ts-sdk/imdb/branded-string-aliases/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/imdb/branded-string-aliases/vitest.config.mts +++ b/seed/ts-sdk/imdb/branded-string-aliases/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts index 5330649d1bed..2184fc26a83a 100644 --- a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/imdb/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/imdb/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/imdb/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/imdb/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/imdb/no-custom-config/vitest.config.mts b/seed/ts-sdk/imdb/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/imdb/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/imdb/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts index 5330649d1bed..2184fc26a83a 100644 --- a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts +++ b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/imdb/omit-undefined/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/imdb/omit-undefined/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/imdb/omit-undefined/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/imdb/omit-undefined/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/imdb/omit-undefined/vitest.config.mts b/seed/ts-sdk/imdb/omit-undefined/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/imdb/omit-undefined/vitest.config.mts +++ b/seed/ts-sdk/imdb/omit-undefined/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/inferred-auth-explicit/src/Client.ts b/seed/ts-sdk/inferred-auth-explicit/src/Client.ts index 092ba28dffbe..6d9be3beacc4 100644 --- a/seed/ts-sdk/inferred-auth-explicit/src/Client.ts +++ b/seed/ts-sdk/inferred-auth-explicit/src/Client.ts @@ -60,8 +60,7 @@ export class SeedInferredAuthExplicitClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/inferred-auth-explicit/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/inferred-auth-explicit/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/inferred-auth-explicit/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/inferred-auth-explicit/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/inferred-auth-explicit/vitest.config.mts b/seed/ts-sdk/inferred-auth-explicit/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/inferred-auth-explicit/vitest.config.mts +++ b/seed/ts-sdk/inferred-auth-explicit/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/inferred-auth-implicit-api-key/src/Client.ts b/seed/ts-sdk/inferred-auth-implicit-api-key/src/Client.ts index c6909ed18774..1047f37bf144 100644 --- a/seed/ts-sdk/inferred-auth-implicit-api-key/src/Client.ts +++ b/seed/ts-sdk/inferred-auth-implicit-api-key/src/Client.ts @@ -60,8 +60,7 @@ export class SeedInferredAuthImplicitApiKeyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/inferred-auth-implicit-api-key/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/inferred-auth-implicit-api-key/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/inferred-auth-implicit-api-key/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/inferred-auth-implicit-api-key/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/inferred-auth-implicit-api-key/vitest.config.mts b/seed/ts-sdk/inferred-auth-implicit-api-key/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/inferred-auth-implicit-api-key/vitest.config.mts +++ b/seed/ts-sdk/inferred-auth-implicit-api-key/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/inferred-auth-implicit-no-expiry/src/Client.ts b/seed/ts-sdk/inferred-auth-implicit-no-expiry/src/Client.ts index 4dfc7450f3a5..57053891057a 100644 --- a/seed/ts-sdk/inferred-auth-implicit-no-expiry/src/Client.ts +++ b/seed/ts-sdk/inferred-auth-implicit-no-expiry/src/Client.ts @@ -60,8 +60,7 @@ export class SeedInferredAuthImplicitNoExpiryClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/inferred-auth-implicit-no-expiry/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/inferred-auth-implicit-no-expiry/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/inferred-auth-implicit-no-expiry/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/inferred-auth-implicit-no-expiry/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/inferred-auth-implicit-no-expiry/vitest.config.mts b/seed/ts-sdk/inferred-auth-implicit-no-expiry/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/inferred-auth-implicit-no-expiry/vitest.config.mts +++ b/seed/ts-sdk/inferred-auth-implicit-no-expiry/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/inferred-auth-implicit/src/Client.ts b/seed/ts-sdk/inferred-auth-implicit/src/Client.ts index 8ac5b565a9b3..d13721b5ceda 100644 --- a/seed/ts-sdk/inferred-auth-implicit/src/Client.ts +++ b/seed/ts-sdk/inferred-auth-implicit/src/Client.ts @@ -60,8 +60,7 @@ export class SeedInferredAuthImplicitClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/inferred-auth-implicit/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/inferred-auth-implicit/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/inferred-auth-implicit/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/inferred-auth-implicit/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/inferred-auth-implicit/vitest.config.mts b/seed/ts-sdk/inferred-auth-implicit/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/inferred-auth-implicit/vitest.config.mts +++ b/seed/ts-sdk/inferred-auth-implicit/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/license/src/Client.ts b/seed/ts-sdk/license/src/Client.ts index a7e0f973222e..bb42b0002936 100644 --- a/seed/ts-sdk/license/src/Client.ts +++ b/seed/ts-sdk/license/src/Client.ts @@ -81,8 +81,7 @@ export class SeedLicenseClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/license/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/license/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/license/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/license/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/license/vitest.config.mts b/seed/ts-sdk/license/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/license/vitest.config.mts +++ b/seed/ts-sdk/license/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/literal/src/Client.ts b/seed/ts-sdk/literal/src/Client.ts index 3bc0663c7d5b..61cbbd5d6c58 100644 --- a/seed/ts-sdk/literal/src/Client.ts +++ b/seed/ts-sdk/literal/src/Client.ts @@ -66,8 +66,7 @@ export class SeedLiteralClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/literal/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/literal/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/literal/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/literal/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/literal/vitest.config.mts b/seed/ts-sdk/literal/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/literal/vitest.config.mts +++ b/seed/ts-sdk/literal/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/literals-unions/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/literals-unions/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/literals-unions/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/literals-unions/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/literals-unions/vitest.config.mts b/seed/ts-sdk/literals-unions/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/literals-unions/vitest.config.mts +++ b/seed/ts-sdk/literals-unions/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts index 6e74cda969cb..d03939b4f3fa 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedMixedCaseClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/mixed-case/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/mixed-case/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/mixed-case/no-custom-config/vitest.config.mts b/seed/ts-sdk/mixed-case/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/mixed-case/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts index 6e74cda969cb..d03939b4f3fa 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts @@ -42,8 +42,7 @@ export class SeedMixedCaseClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/mixed-case/retain-original-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/vitest.config.mts b/seed/ts-sdk/mixed-case/retain-original-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/vitest.config.mts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/mixed-file-directory/src/Client.ts b/seed/ts-sdk/mixed-file-directory/src/Client.ts index 9255234f4d91..4e61cdcd56a2 100644 --- a/seed/ts-sdk/mixed-file-directory/src/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/Client.ts @@ -48,8 +48,7 @@ export class SeedMixedFileDirectoryClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/mixed-file-directory/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/mixed-file-directory/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/mixed-file-directory/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/mixed-file-directory/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/mixed-file-directory/vitest.config.mts b/seed/ts-sdk/mixed-file-directory/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/mixed-file-directory/vitest.config.mts +++ b/seed/ts-sdk/mixed-file-directory/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/multi-line-docs/src/Client.ts b/seed/ts-sdk/multi-line-docs/src/Client.ts index 3732ab11974c..e08815ba41ea 100644 --- a/seed/ts-sdk/multi-line-docs/src/Client.ts +++ b/seed/ts-sdk/multi-line-docs/src/Client.ts @@ -42,8 +42,7 @@ export class SeedMultiLineDocsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/multi-line-docs/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/multi-line-docs/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/multi-line-docs/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/multi-line-docs/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/multi-line-docs/vitest.config.mts b/seed/ts-sdk/multi-line-docs/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/multi-line-docs/vitest.config.mts +++ b/seed/ts-sdk/multi-line-docs/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts index 3beaa5fbaf7e..3d4e4157aa08 100644 --- a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts @@ -48,7 +48,12 @@ export class SeedMultiUrlEnvironmentNoDefaultClient { input, init, { - baseUrl: this._options.baseUrl, + baseUrl: + this._options.baseUrl ?? + (async () => { + const env = await core.Supplier.get(this._options.environment); + return typeof env === "string" ? env : (env as Record)?.ec2; + }), headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/multi-url-environment-no-default/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/multi-url-environment-no-default/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/multi-url-environment-no-default/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/multi-url-environment-no-default/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/multi-url-environment-no-default/vitest.config.mts b/seed/ts-sdk/multi-url-environment-no-default/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/multi-url-environment-no-default/vitest.config.mts +++ b/seed/ts-sdk/multi-url-environment-no-default/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/multi-url-environment/src/Client.ts b/seed/ts-sdk/multi-url-environment/src/Client.ts index aa1f0b23b4cf..b5ed3025214f 100644 --- a/seed/ts-sdk/multi-url-environment/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment/src/Client.ts @@ -48,7 +48,12 @@ export class SeedMultiUrlEnvironmentClient { input, init, { - baseUrl: this._options.baseUrl, + baseUrl: + this._options.baseUrl ?? + (async () => { + const env = await core.Supplier.get(this._options.environment); + return typeof env === "string" ? env : (env as Record)?.ec2; + }), headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/multi-url-environment/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/multi-url-environment/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/multi-url-environment/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/multi-url-environment/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/multi-url-environment/vitest.config.mts b/seed/ts-sdk/multi-url-environment/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/multi-url-environment/vitest.config.mts +++ b/seed/ts-sdk/multi-url-environment/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/multiple-request-bodies/src/Client.ts b/seed/ts-sdk/multiple-request-bodies/src/Client.ts index b467dae01477..a2951d45ecd6 100644 --- a/seed/ts-sdk/multiple-request-bodies/src/Client.ts +++ b/seed/ts-sdk/multiple-request-bodies/src/Client.ts @@ -157,8 +157,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/multiple-request-bodies/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/multiple-request-bodies/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/multiple-request-bodies/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/multiple-request-bodies/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/multiple-request-bodies/vitest.config.mts b/seed/ts-sdk/multiple-request-bodies/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/multiple-request-bodies/vitest.config.mts +++ b/seed/ts-sdk/multiple-request-bodies/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/no-environment/src/Client.ts b/seed/ts-sdk/no-environment/src/Client.ts index c44911e9c0f2..3f212fb73bf3 100644 --- a/seed/ts-sdk/no-environment/src/Client.ts +++ b/seed/ts-sdk/no-environment/src/Client.ts @@ -42,8 +42,7 @@ export class SeedNoEnvironmentClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/no-environment/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/no-environment/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/no-environment/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/no-environment/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/no-environment/vitest.config.mts b/seed/ts-sdk/no-environment/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/no-environment/vitest.config.mts +++ b/seed/ts-sdk/no-environment/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/no-retries/src/Client.ts b/seed/ts-sdk/no-retries/src/Client.ts index 483811fb8c0c..25eab1aa8493 100644 --- a/seed/ts-sdk/no-retries/src/Client.ts +++ b/seed/ts-sdk/no-retries/src/Client.ts @@ -42,8 +42,7 @@ export class SeedNoRetriesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/no-retries/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/no-retries/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/no-retries/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/no-retries/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/no-retries/vitest.config.mts b/seed/ts-sdk/no-retries/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/no-retries/vitest.config.mts +++ b/seed/ts-sdk/no-retries/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/nullable-allof-extends/src/Client.ts b/seed/ts-sdk/nullable-allof-extends/src/Client.ts index eff8b692a8aa..e07d5c3e3983 100644 --- a/seed/ts-sdk/nullable-allof-extends/src/Client.ts +++ b/seed/ts-sdk/nullable-allof-extends/src/Client.ts @@ -143,8 +143,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/nullable-allof-extends/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/nullable-allof-extends/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/nullable-allof-extends/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/nullable-allof-extends/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/nullable-allof-extends/vitest.config.mts b/seed/ts-sdk/nullable-allof-extends/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/nullable-allof-extends/vitest.config.mts +++ b/seed/ts-sdk/nullable-allof-extends/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/nullable-optional/src/Client.ts b/seed/ts-sdk/nullable-optional/src/Client.ts index 66c1a8d849d6..7bdfb2ef45f4 100644 --- a/seed/ts-sdk/nullable-optional/src/Client.ts +++ b/seed/ts-sdk/nullable-optional/src/Client.ts @@ -42,8 +42,7 @@ export class SeedNullableOptionalClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/nullable-optional/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/nullable-optional/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/nullable-optional/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/nullable-optional/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/nullable-optional/vitest.config.mts b/seed/ts-sdk/nullable-optional/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/nullable-optional/vitest.config.mts +++ b/seed/ts-sdk/nullable-optional/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/nullable-request-body/src/Client.ts b/seed/ts-sdk/nullable-request-body/src/Client.ts index bc8bc12e6ec7..9f8c83a01431 100644 --- a/seed/ts-sdk/nullable-request-body/src/Client.ts +++ b/seed/ts-sdk/nullable-request-body/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/nullable-request-body/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/nullable-request-body/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/nullable-request-body/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/nullable-request-body/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/nullable-request-body/vitest.config.mts b/seed/ts-sdk/nullable-request-body/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/nullable-request-body/vitest.config.mts +++ b/seed/ts-sdk/nullable-request-body/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/nullable/src/Client.ts b/seed/ts-sdk/nullable/src/Client.ts index 816efb63b644..9aae7f1086de 100644 --- a/seed/ts-sdk/nullable/src/Client.ts +++ b/seed/ts-sdk/nullable/src/Client.ts @@ -42,8 +42,7 @@ export class SeedNullableClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/nullable/src/api/resources/nullable/types/Metadata.ts b/seed/ts-sdk/nullable/src/api/resources/nullable/types/Metadata.ts index 619ae32f7f64..076e2d6a7d11 100644 --- a/seed/ts-sdk/nullable/src/api/resources/nullable/types/Metadata.ts +++ b/seed/ts-sdk/nullable/src/api/resources/nullable/types/Metadata.ts @@ -8,5 +8,5 @@ export interface Metadata { avatar: string | null; activated?: (boolean | null) | undefined; status: SeedNullable.Status; - values?: Record | undefined; + values?: Record | undefined; } diff --git a/seed/ts-sdk/nullable/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/nullable/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/nullable/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/nullable/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/nullable/vitest.config.mts b/seed/ts-sdk/nullable/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/nullable/vitest.config.mts +++ b/seed/ts-sdk/nullable/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-custom/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-custom/src/Client.ts index 05185f955a5f..ac7f7fa80122 100644 --- a/seed/ts-sdk/oauth-client-credentials-custom/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-custom/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-custom/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-custom/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-custom/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-custom/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-custom/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-custom/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-custom/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-custom/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts index 9f6a556b31bf..5c828b783208 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsDefaultClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-default/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-default/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-default/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-default/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-default/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-default/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/src/Client.ts index 5b373b656905..ef768eb9eb45 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsEnvironmentVariablesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/src/Client.ts index f0e594e2b273..892f5615e20c 100644 --- a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/src/Client.ts @@ -54,8 +54,7 @@ export class SeedOauthClientCredentialsMandatoryAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-mandatory-auth/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts index 05185f955a5f..ac7f7fa80122 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts index 05185f955a5f..ac7f7fa80122 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-reference/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-reference/src/Client.ts index f792396d0454..07511ea67a16 100644 --- a/seed/ts-sdk/oauth-client-credentials-reference/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-reference/src/Client.ts @@ -48,8 +48,7 @@ export class SeedOauthClientCredentialsReferenceClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-reference/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-reference/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-reference/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-reference/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-reference/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-reference/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-reference/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-reference/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials-with-variables/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-with-variables/src/Client.ts index 351a0a1f5939..e5cbc1050cf5 100644 --- a/seed/ts-sdk/oauth-client-credentials-with-variables/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-with-variables/src/Client.ts @@ -66,8 +66,7 @@ export class SeedOauthClientCredentialsWithVariablesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials-with-variables/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials-with-variables/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials-with-variables/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials-with-variables/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials-with-variables/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials-with-variables/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials-with-variables/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials-with-variables/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials/no-custom-config/src/Client.ts index 05185f955a5f..ac7f7fa80122 100644 --- a/seed/ts-sdk/oauth-client-credentials/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials/no-custom-config/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials/no-custom-config/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/oauth-client-credentials/serde/src/Client.ts b/seed/ts-sdk/oauth-client-credentials/serde/src/Client.ts index 05185f955a5f..ac7f7fa80122 100644 --- a/seed/ts-sdk/oauth-client-credentials/serde/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials/serde/src/Client.ts @@ -60,8 +60,7 @@ export class SeedOauthClientCredentialsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/oauth-client-credentials/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/oauth-client-credentials/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/oauth-client-credentials/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/oauth-client-credentials/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/oauth-client-credentials/serde/vitest.config.mts b/seed/ts-sdk/oauth-client-credentials/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/oauth-client-credentials/serde/vitest.config.mts +++ b/seed/ts-sdk/oauth-client-credentials/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/object/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/object/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/object/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/object/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/object/vitest.config.mts b/seed/ts-sdk/object/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/object/vitest.config.mts +++ b/seed/ts-sdk/object/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/objects-with-imports/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/objects-with-imports/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/objects-with-imports/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/objects-with-imports/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/objects-with-imports/vitest.config.mts b/seed/ts-sdk/objects-with-imports/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/objects-with-imports/vitest.config.mts +++ b/seed/ts-sdk/objects-with-imports/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/optional/src/Client.ts b/seed/ts-sdk/optional/src/Client.ts index 8f2e489a1904..8616c0645b8c 100644 --- a/seed/ts-sdk/optional/src/Client.ts +++ b/seed/ts-sdk/optional/src/Client.ts @@ -42,8 +42,7 @@ export class SeedObjectsWithImportsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/optional/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/optional/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/optional/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/optional/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/optional/vitest.config.mts b/seed/ts-sdk/optional/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/optional/vitest.config.mts +++ b/seed/ts-sdk/optional/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/package-yml/src/Client.ts b/seed/ts-sdk/package-yml/src/Client.ts index 71fdc22d8f13..f873d3d1a9ef 100644 --- a/seed/ts-sdk/package-yml/src/Client.ts +++ b/seed/ts-sdk/package-yml/src/Client.ts @@ -101,8 +101,7 @@ export class SeedPackageYmlClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/package-yml/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/package-yml/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/package-yml/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/package-yml/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/package-yml/vitest.config.mts b/seed/ts-sdk/package-yml/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/package-yml/vitest.config.mts +++ b/seed/ts-sdk/package-yml/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/pagination-custom/src/Client.ts b/seed/ts-sdk/pagination-custom/src/Client.ts index db29be172e23..081785e1a645 100644 --- a/seed/ts-sdk/pagination-custom/src/Client.ts +++ b/seed/ts-sdk/pagination-custom/src/Client.ts @@ -42,8 +42,7 @@ export class SeedPaginationClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/pagination-custom/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/pagination-custom/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/pagination-custom/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/pagination-custom/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/pagination-custom/vitest.config.mts b/seed/ts-sdk/pagination-custom/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/pagination-custom/vitest.config.mts +++ b/seed/ts-sdk/pagination-custom/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/pagination-uri-path/src/Client.ts b/seed/ts-sdk/pagination-uri-path/src/Client.ts index 62ae40c9f08c..4c3c1ce22d9c 100644 --- a/seed/ts-sdk/pagination-uri-path/src/Client.ts +++ b/seed/ts-sdk/pagination-uri-path/src/Client.ts @@ -42,8 +42,7 @@ export class SeedPaginationUriPathClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/pagination-uri-path/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/pagination-uri-path/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/pagination-uri-path/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/pagination-uri-path/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/pagination-uri-path/vitest.config.mts b/seed/ts-sdk/pagination-uri-path/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/pagination-uri-path/vitest.config.mts +++ b/seed/ts-sdk/pagination-uri-path/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/pagination/no-custom-config/src/Client.ts b/seed/ts-sdk/pagination/no-custom-config/src/Client.ts index 6b3cdc81f0bb..ccbadf55b110 100644 --- a/seed/ts-sdk/pagination/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/pagination/no-custom-config/src/Client.ts @@ -54,8 +54,7 @@ export class SeedPaginationClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/pagination/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/pagination/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/pagination/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/pagination/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/pagination/no-custom-config/vitest.config.mts b/seed/ts-sdk/pagination/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/pagination/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/pagination/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/pagination/page-index-semantics/src/Client.ts b/seed/ts-sdk/pagination/page-index-semantics/src/Client.ts index 6b3cdc81f0bb..ccbadf55b110 100644 --- a/seed/ts-sdk/pagination/page-index-semantics/src/Client.ts +++ b/seed/ts-sdk/pagination/page-index-semantics/src/Client.ts @@ -54,8 +54,7 @@ export class SeedPaginationClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/pagination/page-index-semantics/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/pagination/page-index-semantics/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/pagination/page-index-semantics/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/pagination/page-index-semantics/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/pagination/page-index-semantics/vitest.config.mts b/seed/ts-sdk/pagination/page-index-semantics/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/pagination/page-index-semantics/vitest.config.mts +++ b/seed/ts-sdk/pagination/page-index-semantics/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/no-custom-config/src/Client.ts b/seed/ts-sdk/path-parameters/no-custom-config/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/path-parameters/no-custom-config/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/no-custom-config/vitest.config.mts b/seed/ts-sdk/path-parameters/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/src/Client.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/vitest.config.mts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-retain-original-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/src/Client.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/src/Client.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/vitest.config.mts b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters-serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters/src/Client.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters/src/Client.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/no-inline-path-parameters/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/no-inline-path-parameters/vitest.config.mts b/seed/ts-sdk/path-parameters/no-inline-path-parameters/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/no-inline-path-parameters/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/no-inline-path-parameters/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/src/Client.ts b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/src/Client.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/vitest.config.mts b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-camel-case/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/parameter-naming-camel-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/parameter-naming-original-name/src/Client.ts b/seed/ts-sdk/path-parameters/parameter-naming-original-name/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-original-name/src/Client.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-original-name/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/parameter-naming-original-name/vitest.config.mts b/seed/ts-sdk/path-parameters/parameter-naming-original-name/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-original-name/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/parameter-naming-original-name/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/src/Client.ts b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/src/Client.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/vitest.config.mts b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-snake-case/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/parameter-naming-snake-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/src/Client.ts b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/src/Client.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/vitest.config.mts b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/parameter-naming-wire-value/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/parameter-naming-wire-value/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/path-parameters/retain-original-casing/src/Client.ts b/seed/ts-sdk/path-parameters/retain-original-casing/src/Client.ts index c2644877743c..781c5991305f 100644 --- a/seed/ts-sdk/path-parameters/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/path-parameters/retain-original-casing/src/Client.ts @@ -48,8 +48,7 @@ export class SeedPathParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/path-parameters/retain-original-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/path-parameters/retain-original-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/path-parameters/retain-original-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/path-parameters/retain-original-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/path-parameters/retain-original-casing/vitest.config.mts b/seed/ts-sdk/path-parameters/retain-original-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/path-parameters/retain-original-casing/vitest.config.mts +++ b/seed/ts-sdk/path-parameters/retain-original-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/plain-text/src/Client.ts b/seed/ts-sdk/plain-text/src/Client.ts index 1015780f7ff1..6e7816fa1a5d 100644 --- a/seed/ts-sdk/plain-text/src/Client.ts +++ b/seed/ts-sdk/plain-text/src/Client.ts @@ -42,8 +42,7 @@ export class SeedPlainTextClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/plain-text/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/plain-text/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/plain-text/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/plain-text/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/plain-text/vitest.config.mts b/seed/ts-sdk/plain-text/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/plain-text/vitest.config.mts +++ b/seed/ts-sdk/plain-text/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/property-access/generate-read-write-only-types/src/Client.ts b/seed/ts-sdk/property-access/generate-read-write-only-types/src/Client.ts index 96dc235e804c..bbba6bca6473 100644 --- a/seed/ts-sdk/property-access/generate-read-write-only-types/src/Client.ts +++ b/seed/ts-sdk/property-access/generate-read-write-only-types/src/Client.ts @@ -99,8 +99,7 @@ export class SeedPropertyAccessClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/property-access/generate-read-write-only-types/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/property-access/generate-read-write-only-types/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/property-access/generate-read-write-only-types/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/property-access/generate-read-write-only-types/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/property-access/generate-read-write-only-types/vitest.config.mts b/seed/ts-sdk/property-access/generate-read-write-only-types/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/property-access/generate-read-write-only-types/vitest.config.mts +++ b/seed/ts-sdk/property-access/generate-read-write-only-types/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/property-access/no-custom-config/src/Client.ts b/seed/ts-sdk/property-access/no-custom-config/src/Client.ts index dc816266e294..7ec4af283e58 100644 --- a/seed/ts-sdk/property-access/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/property-access/no-custom-config/src/Client.ts @@ -103,8 +103,7 @@ export class SeedPropertyAccessClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/property-access/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/property-access/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/property-access/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/property-access/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/property-access/no-custom-config/vitest.config.mts b/seed/ts-sdk/property-access/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/property-access/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/property-access/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/public-object/src/Client.ts b/seed/ts-sdk/public-object/src/Client.ts index 34ad060cb224..77f42bb1ffc3 100644 --- a/seed/ts-sdk/public-object/src/Client.ts +++ b/seed/ts-sdk/public-object/src/Client.ts @@ -42,8 +42,7 @@ export class SeedPublicObjectClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/public-object/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/public-object/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/public-object/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/public-object/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/public-object/vitest.config.mts b/seed/ts-sdk/public-object/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/public-object/vitest.config.mts +++ b/seed/ts-sdk/public-object/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters-openapi-as-objects/src/Client.ts b/seed/ts-sdk/query-parameters-openapi-as-objects/src/Client.ts index 3220782e4595..3d032e7d01f7 100644 --- a/seed/ts-sdk/query-parameters-openapi-as-objects/src/Client.ts +++ b/seed/ts-sdk/query-parameters-openapi-as-objects/src/Client.ts @@ -175,8 +175,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters-openapi-as-objects/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters-openapi-as-objects/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters-openapi-as-objects/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters-openapi-as-objects/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters-openapi-as-objects/vitest.config.mts b/seed/ts-sdk/query-parameters-openapi-as-objects/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters-openapi-as-objects/vitest.config.mts +++ b/seed/ts-sdk/query-parameters-openapi-as-objects/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters-openapi/src/Client.ts b/seed/ts-sdk/query-parameters-openapi/src/Client.ts index 3220782e4595..3d032e7d01f7 100644 --- a/seed/ts-sdk/query-parameters-openapi/src/Client.ts +++ b/seed/ts-sdk/query-parameters-openapi/src/Client.ts @@ -175,8 +175,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters-openapi/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters-openapi/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters-openapi/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters-openapi/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters-openapi/vitest.config.mts b/seed/ts-sdk/query-parameters-openapi/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters-openapi/vitest.config.mts +++ b/seed/ts-sdk/query-parameters-openapi/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/no-custom-config/vitest.config.mts b/seed/ts-sdk/query-parameters/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/src/Client.ts b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/src/Client.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/vitest.config.mts b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-camel-case/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/parameter-naming-camel-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/parameter-naming-original-name/src/Client.ts b/seed/ts-sdk/query-parameters/parameter-naming-original-name/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-original-name/src/Client.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-original-name/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-original-name/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/parameter-naming-original-name/vitest.config.mts b/seed/ts-sdk/query-parameters/parameter-naming-original-name/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-original-name/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/parameter-naming-original-name/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/src/Client.ts b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/src/Client.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/vitest.config.mts b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-snake-case/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/parameter-naming-snake-case/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/src/Client.ts b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/src/Client.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/vitest.config.mts b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/parameter-naming-wire-value/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/parameter-naming-wire-value/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/query-parameters/serde/src/Client.ts b/seed/ts-sdk/query-parameters/serde/src/Client.ts index 7fc598887f31..88b30e584745 100644 --- a/seed/ts-sdk/query-parameters/serde/src/Client.ts +++ b/seed/ts-sdk/query-parameters/serde/src/Client.ts @@ -42,8 +42,7 @@ export class SeedQueryParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/query-parameters/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/query-parameters/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/query-parameters/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/query-parameters/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/query-parameters/serde/vitest.config.mts b/seed/ts-sdk/query-parameters/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/query-parameters/serde/vitest.config.mts +++ b/seed/ts-sdk/query-parameters/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/request-parameters/flatten-request-parameters/src/Client.ts b/seed/ts-sdk/request-parameters/flatten-request-parameters/src/Client.ts index 8aa11612586b..9d099a1a88b6 100644 --- a/seed/ts-sdk/request-parameters/flatten-request-parameters/src/Client.ts +++ b/seed/ts-sdk/request-parameters/flatten-request-parameters/src/Client.ts @@ -42,8 +42,7 @@ export class SeedRequestParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/request-parameters/flatten-request-parameters/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/request-parameters/flatten-request-parameters/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/request-parameters/flatten-request-parameters/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/request-parameters/flatten-request-parameters/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/request-parameters/flatten-request-parameters/vitest.config.mts b/seed/ts-sdk/request-parameters/flatten-request-parameters/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/request-parameters/flatten-request-parameters/vitest.config.mts +++ b/seed/ts-sdk/request-parameters/flatten-request-parameters/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/request-parameters/no-custom-config/src/Client.ts b/seed/ts-sdk/request-parameters/no-custom-config/src/Client.ts index 8aa11612586b..9d099a1a88b6 100644 --- a/seed/ts-sdk/request-parameters/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/request-parameters/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedRequestParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/request-parameters/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/request-parameters/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/request-parameters/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/request-parameters/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/request-parameters/no-custom-config/vitest.config.mts b/seed/ts-sdk/request-parameters/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/request-parameters/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/request-parameters/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/src/Client.ts b/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/src/Client.ts index 8aa11612586b..9d099a1a88b6 100644 --- a/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/src/Client.ts +++ b/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/src/Client.ts @@ -42,8 +42,7 @@ export class SeedRequestParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/request-parameters/use-big-int-and-default-request-parameter-values/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/src/Client.ts b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/src/Client.ts index 8aa11612586b..9d099a1a88b6 100644 --- a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/src/Client.ts +++ b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/src/Client.ts @@ -42,8 +42,7 @@ export class SeedRequestParametersClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/vitest.config.mts b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/request-parameters/use-default-request-parameter-values/vitest.config.mts +++ b/seed/ts-sdk/request-parameters/use-default-request-parameter-values/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/required-nullable/src/Client.ts b/seed/ts-sdk/required-nullable/src/Client.ts index e62a4868ad5c..055619f4714a 100644 --- a/seed/ts-sdk/required-nullable/src/Client.ts +++ b/seed/ts-sdk/required-nullable/src/Client.ts @@ -169,8 +169,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/required-nullable/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/required-nullable/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/required-nullable/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/required-nullable/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/required-nullable/vitest.config.mts b/seed/ts-sdk/required-nullable/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/required-nullable/vitest.config.mts +++ b/seed/ts-sdk/required-nullable/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/reserved-keywords/src/Client.ts b/seed/ts-sdk/reserved-keywords/src/Client.ts index 09b12ddbcaf0..b932f3976ef9 100644 --- a/seed/ts-sdk/reserved-keywords/src/Client.ts +++ b/seed/ts-sdk/reserved-keywords/src/Client.ts @@ -42,8 +42,7 @@ export class SeedNurseryApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/reserved-keywords/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/reserved-keywords/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/reserved-keywords/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/reserved-keywords/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/reserved-keywords/vitest.config.mts b/seed/ts-sdk/reserved-keywords/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/reserved-keywords/vitest.config.mts +++ b/seed/ts-sdk/reserved-keywords/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/response-property/src/Client.ts b/seed/ts-sdk/response-property/src/Client.ts index 1383dd1d0ce7..289c87040345 100644 --- a/seed/ts-sdk/response-property/src/Client.ts +++ b/seed/ts-sdk/response-property/src/Client.ts @@ -42,8 +42,7 @@ export class SeedResponsePropertyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/response-property/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/response-property/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/response-property/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/response-property/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/response-property/vitest.config.mts b/seed/ts-sdk/response-property/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/response-property/vitest.config.mts +++ b/seed/ts-sdk/response-property/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/server-sent-event-examples/src/Client.ts b/seed/ts-sdk/server-sent-event-examples/src/Client.ts index aa25809ac816..3f23e3add89c 100644 --- a/seed/ts-sdk/server-sent-event-examples/src/Client.ts +++ b/seed/ts-sdk/server-sent-event-examples/src/Client.ts @@ -42,8 +42,7 @@ export class SeedServerSentEventsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/server-sent-event-examples/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/server-sent-event-examples/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/server-sent-event-examples/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/server-sent-event-examples/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/server-sent-event-examples/vitest.config.mts b/seed/ts-sdk/server-sent-event-examples/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/server-sent-event-examples/vitest.config.mts +++ b/seed/ts-sdk/server-sent-event-examples/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/server-sent-events/src/Client.ts b/seed/ts-sdk/server-sent-events/src/Client.ts index aa25809ac816..3f23e3add89c 100644 --- a/seed/ts-sdk/server-sent-events/src/Client.ts +++ b/seed/ts-sdk/server-sent-events/src/Client.ts @@ -42,8 +42,7 @@ export class SeedServerSentEventsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/server-sent-events/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/server-sent-events/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/server-sent-events/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/server-sent-events/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/server-sent-events/vitest.config.mts b/seed/ts-sdk/server-sent-events/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/server-sent-events/vitest.config.mts +++ b/seed/ts-sdk/server-sent-events/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/server-url-templating/src/Client.ts b/seed/ts-sdk/server-url-templating/src/Client.ts index 5201cadacdcc..6407f9195906 100644 --- a/seed/ts-sdk/server-url-templating/src/Client.ts +++ b/seed/ts-sdk/server-url-templating/src/Client.ts @@ -201,7 +201,12 @@ export class SeedApiClient { input, init, { - baseUrl: this._options.baseUrl, + baseUrl: + this._options.baseUrl ?? + (async () => { + const env = await core.Supplier.get(this._options.environment); + return typeof env === "string" ? env : (env as Record)?.base; + }), headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/server-url-templating/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/server-url-templating/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/server-url-templating/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/server-url-templating/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/server-url-templating/vitest.config.mts b/seed/ts-sdk/server-url-templating/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/server-url-templating/vitest.config.mts +++ b/seed/ts-sdk/server-url-templating/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/allow-custom-fetcher/src/Client.ts b/seed/ts-sdk/simple-api/allow-custom-fetcher/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/allow-custom-fetcher/src/Client.ts +++ b/seed/ts-sdk/simple-api/allow-custom-fetcher/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/allow-custom-fetcher/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/allow-custom-fetcher/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/allow-custom-fetcher/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/allow-custom-fetcher/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/allow-custom-fetcher/vitest.config.mts b/seed/ts-sdk/simple-api/allow-custom-fetcher/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/allow-custom-fetcher/vitest.config.mts +++ b/seed/ts-sdk/simple-api/allow-custom-fetcher/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/allow-extra-fields/src/Client.ts b/seed/ts-sdk/simple-api/allow-extra-fields/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/allow-extra-fields/src/Client.ts +++ b/seed/ts-sdk/simple-api/allow-extra-fields/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/allow-extra-fields/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/allow-extra-fields/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/allow-extra-fields/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/allow-extra-fields/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/allow-extra-fields/vitest.config.mts b/seed/ts-sdk/simple-api/allow-extra-fields/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/allow-extra-fields/vitest.config.mts +++ b/seed/ts-sdk/simple-api/allow-extra-fields/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/bundle/src/Client.ts b/seed/ts-sdk/simple-api/bundle/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/bundle/src/Client.ts +++ b/seed/ts-sdk/simple-api/bundle/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/bundle/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/bundle/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/bundle/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/bundle/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/bundle/vitest.config.mts b/seed/ts-sdk/simple-api/bundle/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/bundle/vitest.config.mts +++ b/seed/ts-sdk/simple-api/bundle/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/custom-package-json/src/Client.ts b/seed/ts-sdk/simple-api/custom-package-json/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/custom-package-json/src/Client.ts +++ b/seed/ts-sdk/simple-api/custom-package-json/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/custom-package-json/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/custom-package-json/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/custom-package-json/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/custom-package-json/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/custom-package-json/vitest.config.mts b/seed/ts-sdk/simple-api/custom-package-json/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/custom-package-json/vitest.config.mts +++ b/seed/ts-sdk/simple-api/custom-package-json/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/jsr/src/Client.ts b/seed/ts-sdk/simple-api/jsr/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/jsr/src/Client.ts +++ b/seed/ts-sdk/simple-api/jsr/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/jsr/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/jsr/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/jsr/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/jsr/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/jsr/vitest.config.mts b/seed/ts-sdk/simple-api/jsr/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/jsr/vitest.config.mts +++ b/seed/ts-sdk/simple-api/jsr/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/legacy-exports/src/Client.ts b/seed/ts-sdk/simple-api/legacy-exports/src/Client.ts index 93cd3d9822ac..ed59e3f096c8 100644 --- a/seed/ts-sdk/simple-api/legacy-exports/src/Client.ts +++ b/seed/ts-sdk/simple-api/legacy-exports/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/legacy-exports/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/legacy-exports/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/legacy-exports/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/legacy-exports/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/legacy-exports/vitest.config.mts b/seed/ts-sdk/simple-api/legacy-exports/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/legacy-exports/vitest.config.mts +++ b/seed/ts-sdk/simple-api/legacy-exports/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/naming-shorthand/src/Client.ts b/seed/ts-sdk/simple-api/naming-shorthand/src/Client.ts index 7d92566c1e46..b14e552c3146 100644 --- a/seed/ts-sdk/simple-api/naming-shorthand/src/Client.ts +++ b/seed/ts-sdk/simple-api/naming-shorthand/src/Client.ts @@ -42,8 +42,7 @@ export class AcmeClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/naming-shorthand/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/naming-shorthand/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/naming-shorthand/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/naming-shorthand/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/naming-shorthand/vitest.config.mts b/seed/ts-sdk/simple-api/naming-shorthand/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/naming-shorthand/vitest.config.mts +++ b/seed/ts-sdk/simple-api/naming-shorthand/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/naming/src/Client.ts b/seed/ts-sdk/simple-api/naming/src/Client.ts index fcfe5ed1b0a7..227ef03a913e 100644 --- a/seed/ts-sdk/simple-api/naming/src/Client.ts +++ b/seed/ts-sdk/simple-api/naming/src/Client.ts @@ -42,8 +42,7 @@ export class AcmeSdkClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/naming/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/naming/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/naming/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/naming/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/naming/vitest.config.mts b/seed/ts-sdk/simple-api/naming/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/naming/vitest.config.mts +++ b/seed/ts-sdk/simple-api/naming/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/no-custom-config/src/Client.ts b/seed/ts-sdk/simple-api/no-custom-config/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/simple-api/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/no-custom-config/vitest.config.mts b/seed/ts-sdk/simple-api/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/simple-api/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/no-linter-and-formatter/src/Client.ts b/seed/ts-sdk/simple-api/no-linter-and-formatter/src/Client.ts index a40773b106db..28566e847af1 100644 --- a/seed/ts-sdk/simple-api/no-linter-and-formatter/src/Client.ts +++ b/seed/ts-sdk/simple-api/no-linter-and-formatter/src/Client.ts @@ -41,8 +41,7 @@ export class SeedSimpleApiClient { public async fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise { return core.makePassthroughRequest(input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/no-linter-and-formatter/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/no-linter-and-formatter/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/no-linter-and-formatter/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/no-linter-and-formatter/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/no-linter-and-formatter/vitest.config.mts b/seed/ts-sdk/simple-api/no-linter-and-formatter/vitest.config.mts index e21d088aa14c..bc1f402d9945 100644 --- a/seed/ts-sdk/simple-api/no-linter-and-formatter/vitest.config.mts +++ b/seed/ts-sdk/simple-api/no-linter-and-formatter/vitest.config.mts @@ -3,6 +3,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json" + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/no-scripts/src/Client.ts b/seed/ts-sdk/simple-api/no-scripts/src/Client.ts index a40773b106db..28566e847af1 100644 --- a/seed/ts-sdk/simple-api/no-scripts/src/Client.ts +++ b/seed/ts-sdk/simple-api/no-scripts/src/Client.ts @@ -41,8 +41,7 @@ export class SeedSimpleApiClient { public async fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise { return core.makePassthroughRequest(input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/no-scripts/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/no-scripts/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/no-scripts/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/no-scripts/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/no-scripts/vitest.config.mts b/seed/ts-sdk/simple-api/no-scripts/vitest.config.mts index e21d088aa14c..bc1f402d9945 100644 --- a/seed/ts-sdk/simple-api/no-scripts/vitest.config.mts +++ b/seed/ts-sdk/simple-api/no-scripts/vitest.config.mts @@ -3,6 +3,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json" + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/oidc-token/src/Client.ts b/seed/ts-sdk/simple-api/oidc-token/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/oidc-token/src/Client.ts +++ b/seed/ts-sdk/simple-api/oidc-token/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/oidc-token/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/oidc-token/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/oidc-token/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/oidc-token/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/oidc-token/vitest.config.mts b/seed/ts-sdk/simple-api/oidc-token/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/oidc-token/vitest.config.mts +++ b/seed/ts-sdk/simple-api/oidc-token/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/omit-fern-headers/src/Client.ts b/seed/ts-sdk/simple-api/omit-fern-headers/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/omit-fern-headers/src/Client.ts +++ b/seed/ts-sdk/simple-api/omit-fern-headers/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/omit-fern-headers/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/omit-fern-headers/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/omit-fern-headers/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/omit-fern-headers/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/omit-fern-headers/vitest.config.mts b/seed/ts-sdk/simple-api/omit-fern-headers/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/omit-fern-headers/vitest.config.mts +++ b/seed/ts-sdk/simple-api/omit-fern-headers/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-oxc/src/Client.ts b/seed/ts-sdk/simple-api/use-oxc/src/Client.ts index 833808fb2ba8..1f25e80d7257 100644 --- a/seed/ts-sdk/simple-api/use-oxc/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-oxc/src/Client.ts @@ -43,8 +43,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-oxc/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-oxc/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-oxc/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-oxc/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-oxc/vitest.config.mts b/seed/ts-sdk/simple-api/use-oxc/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-oxc/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-oxc/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-oxfmt/src/Client.ts b/seed/ts-sdk/simple-api/use-oxfmt/src/Client.ts index 1320110b6822..dc508a610e24 100644 --- a/seed/ts-sdk/simple-api/use-oxfmt/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-oxfmt/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-oxfmt/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-oxfmt/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-oxfmt/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-oxfmt/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-oxfmt/vitest.config.mts b/seed/ts-sdk/simple-api/use-oxfmt/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-oxfmt/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-oxfmt/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-oxlint/src/Client.ts b/seed/ts-sdk/simple-api/use-oxlint/src/Client.ts index 833808fb2ba8..1f25e80d7257 100644 --- a/seed/ts-sdk/simple-api/use-oxlint/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-oxlint/src/Client.ts @@ -43,8 +43,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-oxlint/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-oxlint/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-oxlint/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-oxlint/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-oxlint/vitest.config.mts b/seed/ts-sdk/simple-api/use-oxlint/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-oxlint/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-oxlint/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-prettier-no-linter/src/Client.ts b/seed/ts-sdk/simple-api/use-prettier-no-linter/src/Client.ts index 833808fb2ba8..1f25e80d7257 100644 --- a/seed/ts-sdk/simple-api/use-prettier-no-linter/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-prettier-no-linter/src/Client.ts @@ -43,8 +43,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-prettier-no-linter/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-prettier-no-linter/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-prettier-no-linter/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-prettier-no-linter/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-prettier-no-linter/vitest.config.mts b/seed/ts-sdk/simple-api/use-prettier-no-linter/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-prettier-no-linter/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-prettier-no-linter/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-prettier/src/Client.ts b/seed/ts-sdk/simple-api/use-prettier/src/Client.ts index 1320110b6822..dc508a610e24 100644 --- a/seed/ts-sdk/simple-api/use-prettier/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-prettier/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-prettier/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-prettier/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-prettier/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-prettier/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-prettier/vitest.config.mts b/seed/ts-sdk/simple-api/use-prettier/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-prettier/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-prettier/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-api/use-yarn/src/Client.ts b/seed/ts-sdk/simple-api/use-yarn/src/Client.ts index 7bde96b2e273..9ed573724436 100644 --- a/seed/ts-sdk/simple-api/use-yarn/src/Client.ts +++ b/seed/ts-sdk/simple-api/use-yarn/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSimpleApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-api/use-yarn/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-api/use-yarn/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-api/use-yarn/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-api/use-yarn/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-api/use-yarn/vitest.config.mts b/seed/ts-sdk/simple-api/use-yarn/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-api/use-yarn/vitest.config.mts +++ b/seed/ts-sdk/simple-api/use-yarn/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/simple-fhir/src/Client.ts b/seed/ts-sdk/simple-fhir/src/Client.ts index 326e1ad3519b..2549036abfea 100644 --- a/seed/ts-sdk/simple-fhir/src/Client.ts +++ b/seed/ts-sdk/simple-fhir/src/Client.ts @@ -89,8 +89,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/simple-fhir/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/simple-fhir/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/simple-fhir/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/simple-fhir/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/simple-fhir/vitest.config.mts b/seed/ts-sdk/simple-fhir/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/simple-fhir/vitest.config.mts +++ b/seed/ts-sdk/simple-fhir/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/single-url-environment-default/src/Client.ts b/seed/ts-sdk/single-url-environment-default/src/Client.ts index b35057a76122..06260da6a00b 100644 --- a/seed/ts-sdk/single-url-environment-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-default/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSingleUrlEnvironmentDefaultClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/single-url-environment-default/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/single-url-environment-default/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/single-url-environment-default/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/single-url-environment-default/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/single-url-environment-default/vitest.config.mts b/seed/ts-sdk/single-url-environment-default/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/single-url-environment-default/vitest.config.mts +++ b/seed/ts-sdk/single-url-environment-default/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts index 2a8c56899bd4..90bdea23e550 100644 --- a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts @@ -42,8 +42,7 @@ export class SeedSingleUrlEnvironmentNoDefaultClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/single-url-environment-no-default/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/single-url-environment-no-default/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/single-url-environment-no-default/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/single-url-environment-no-default/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/single-url-environment-no-default/vitest.config.mts b/seed/ts-sdk/single-url-environment-no-default/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/single-url-environment-no-default/vitest.config.mts +++ b/seed/ts-sdk/single-url-environment-no-default/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/streaming-parameter/src/Client.ts b/seed/ts-sdk/streaming-parameter/src/Client.ts index 76b2172a3998..41c74bcf1539 100644 --- a/seed/ts-sdk/streaming-parameter/src/Client.ts +++ b/seed/ts-sdk/streaming-parameter/src/Client.ts @@ -42,8 +42,7 @@ export class SeedStreamingClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/streaming-parameter/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/streaming-parameter/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/streaming-parameter/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/streaming-parameter/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/streaming-parameter/vitest.config.mts b/seed/ts-sdk/streaming-parameter/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/streaming-parameter/vitest.config.mts +++ b/seed/ts-sdk/streaming-parameter/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts index 76b2172a3998..41c74bcf1539 100644 --- a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedStreamingClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/streaming/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/streaming/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/streaming/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/streaming/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/streaming/no-custom-config/vitest.config.mts b/seed/ts-sdk/streaming/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/streaming/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/streaming/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/streaming/serde-layer/src/Client.ts b/seed/ts-sdk/streaming/serde-layer/src/Client.ts index 76b2172a3998..41c74bcf1539 100644 --- a/seed/ts-sdk/streaming/serde-layer/src/Client.ts +++ b/seed/ts-sdk/streaming/serde-layer/src/Client.ts @@ -42,8 +42,7 @@ export class SeedStreamingClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/streaming/serde-layer/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/streaming/serde-layer/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/streaming/serde-layer/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/streaming/serde-layer/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/streaming/serde-layer/vitest.config.mts b/seed/ts-sdk/streaming/serde-layer/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/streaming/serde-layer/vitest.config.mts +++ b/seed/ts-sdk/streaming/serde-layer/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/streaming/wrapper/src/Client.ts b/seed/ts-sdk/streaming/wrapper/src/Client.ts index 76b2172a3998..41c74bcf1539 100644 --- a/seed/ts-sdk/streaming/wrapper/src/Client.ts +++ b/seed/ts-sdk/streaming/wrapper/src/Client.ts @@ -42,8 +42,7 @@ export class SeedStreamingClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/streaming/wrapper/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/streaming/wrapper/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/streaming/wrapper/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/streaming/wrapper/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/trace/exhaustive/src/Client.ts b/seed/ts-sdk/trace/exhaustive/src/Client.ts index 6028ef4970b1..c5a44e004812 100644 --- a/seed/ts-sdk/trace/exhaustive/src/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/Client.ts @@ -84,8 +84,7 @@ export class SeedTraceClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/trace/exhaustive/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/trace/exhaustive/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/trace/exhaustive/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/trace/exhaustive/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/trace/exhaustive/vitest.config.mts b/seed/ts-sdk/trace/exhaustive/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/trace/exhaustive/vitest.config.mts +++ b/seed/ts-sdk/trace/exhaustive/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/trace/no-custom-config/src/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/Client.ts index 6028ef4970b1..c5a44e004812 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/Client.ts @@ -84,8 +84,7 @@ export class SeedTraceClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/trace/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/trace/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/trace/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/trace/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/trace/no-custom-config/vitest.config.mts b/seed/ts-sdk/trace/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/trace/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/trace/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/trace/serde-no-throwing/src/Client.ts b/seed/ts-sdk/trace/serde-no-throwing/src/Client.ts index 6028ef4970b1..c5a44e004812 100644 --- a/seed/ts-sdk/trace/serde-no-throwing/src/Client.ts +++ b/seed/ts-sdk/trace/serde-no-throwing/src/Client.ts @@ -84,8 +84,7 @@ export class SeedTraceClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/trace/serde-no-throwing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/trace/serde-no-throwing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/trace/serde-no-throwing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/trace/serde-no-throwing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/trace/serde-no-throwing/vitest.config.mts b/seed/ts-sdk/trace/serde-no-throwing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/trace/serde-no-throwing/vitest.config.mts +++ b/seed/ts-sdk/trace/serde-no-throwing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/trace/serde/src/Client.ts b/seed/ts-sdk/trace/serde/src/Client.ts index 6028ef4970b1..c5a44e004812 100644 --- a/seed/ts-sdk/trace/serde/src/Client.ts +++ b/seed/ts-sdk/trace/serde/src/Client.ts @@ -84,8 +84,7 @@ export class SeedTraceClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/trace/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/trace/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/trace/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/trace/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/trace/serde/vitest.config.mts b/seed/ts-sdk/trace/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/trace/serde/vitest.config.mts +++ b/seed/ts-sdk/trace/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/ts-express-casing/src/Client.ts b/seed/ts-sdk/ts-express-casing/src/Client.ts index 5330649d1bed..2184fc26a83a 100644 --- a/seed/ts-sdk/ts-express-casing/src/Client.ts +++ b/seed/ts-sdk/ts-express-casing/src/Client.ts @@ -42,8 +42,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/ts-express-casing/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/ts-express-casing/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/ts-express-casing/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/ts-express-casing/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/ts-express-casing/vitest.config.mts b/seed/ts-sdk/ts-express-casing/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/ts-express-casing/vitest.config.mts +++ b/seed/ts-sdk/ts-express-casing/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/ts-extra-properties/src/Client.ts b/seed/ts-sdk/ts-extra-properties/src/Client.ts index 3b224b1e3ff2..6f8b0c7cbfa1 100644 --- a/seed/ts-sdk/ts-extra-properties/src/Client.ts +++ b/seed/ts-sdk/ts-extra-properties/src/Client.ts @@ -160,8 +160,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/ts-extra-properties/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/ts-extra-properties/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/ts-extra-properties/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/ts-extra-properties/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/ts-extra-properties/vitest.config.mts b/seed/ts-sdk/ts-extra-properties/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/ts-extra-properties/vitest.config.mts +++ b/seed/ts-sdk/ts-extra-properties/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/ts-inline-types/inline/src/Client.ts b/seed/ts-sdk/ts-inline-types/inline/src/Client.ts index 5836421f9bb9..82f3208fdfb3 100644 --- a/seed/ts-sdk/ts-inline-types/inline/src/Client.ts +++ b/seed/ts-sdk/ts-inline-types/inline/src/Client.ts @@ -230,8 +230,7 @@ export class SeedObjectClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/ts-inline-types/inline/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/ts-inline-types/inline/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/ts-inline-types/inline/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/ts-inline-types/inline/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/ts-inline-types/inline/vitest.config.mts b/seed/ts-sdk/ts-inline-types/inline/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/ts-inline-types/inline/vitest.config.mts +++ b/seed/ts-sdk/ts-inline-types/inline/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts b/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts index 5836421f9bb9..82f3208fdfb3 100644 --- a/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts +++ b/seed/ts-sdk/ts-inline-types/no-inline/src/Client.ts @@ -230,8 +230,7 @@ export class SeedObjectClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/ts-inline-types/no-inline/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/ts-inline-types/no-inline/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/ts-inline-types/no-inline/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/ts-inline-types/no-inline/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/ts-inline-types/no-inline/vitest.config.mts b/seed/ts-sdk/ts-inline-types/no-inline/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/ts-inline-types/no-inline/vitest.config.mts +++ b/seed/ts-sdk/ts-inline-types/no-inline/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/undiscriminated-union-with-response-property/src/Client.ts b/seed/ts-sdk/undiscriminated-union-with-response-property/src/Client.ts index 0174e17d9e75..397b679d4912 100644 --- a/seed/ts-sdk/undiscriminated-union-with-response-property/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-union-with-response-property/src/Client.ts @@ -138,8 +138,7 @@ export class SeedUndiscriminatedUnionWithResponsePropertyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/undiscriminated-union-with-response-property/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/undiscriminated-union-with-response-property/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/undiscriminated-union-with-response-property/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/undiscriminated-union-with-response-property/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/undiscriminated-union-with-response-property/vitest.config.mts b/seed/ts-sdk/undiscriminated-union-with-response-property/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/undiscriminated-union-with-response-property/vitest.config.mts +++ b/seed/ts-sdk/undiscriminated-union-with-response-property/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts index da3d2ce24651..dfa69a8946ee 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedUndiscriminatedUnionsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/vitest.config.mts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts index da3d2ce24651..dfa69a8946ee 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts @@ -42,8 +42,7 @@ export class SeedUndiscriminatedUnionsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/vitest.config.mts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/vitest.config.mts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/unions-with-local-date/src/Client.ts b/seed/ts-sdk/unions-with-local-date/src/Client.ts index 32c837ebaf43..17de42fa9db1 100644 --- a/seed/ts-sdk/unions-with-local-date/src/Client.ts +++ b/seed/ts-sdk/unions-with-local-date/src/Client.ts @@ -54,8 +54,7 @@ export class SeedUnionsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/unions-with-local-date/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/unions-with-local-date/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/unions-with-local-date/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/unions-with-local-date/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/unions-with-local-date/vitest.config.mts b/seed/ts-sdk/unions-with-local-date/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/unions-with-local-date/vitest.config.mts +++ b/seed/ts-sdk/unions-with-local-date/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/unions/src/Client.ts b/seed/ts-sdk/unions/src/Client.ts index d9137d1ede0d..334128ada4d7 100644 --- a/seed/ts-sdk/unions/src/Client.ts +++ b/seed/ts-sdk/unions/src/Client.ts @@ -48,8 +48,7 @@ export class SeedUnionsClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/unions/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/unions/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/unions/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/unions/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/unions/vitest.config.mts b/seed/ts-sdk/unions/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/unions/vitest.config.mts +++ b/seed/ts-sdk/unions/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts index eea86a48c6a1..4e9c4615809c 100644 --- a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts @@ -42,8 +42,7 @@ export class SeedUnknownAsAnyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/unknown/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/unknown/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/unknown/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/unknown/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/unknown/no-custom-config/vitest.config.mts b/seed/ts-sdk/unknown/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/unknown/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/unknown/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts index eea86a48c6a1..4e9c4615809c 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts +++ b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts @@ -42,8 +42,7 @@ export class SeedUnknownAsAnyClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/unknown/unknown-as-any/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/unknown/unknown-as-any/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/unknown/unknown-as-any/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/unknown/unknown-as-any/vitest.config.mts b/seed/ts-sdk/unknown/unknown-as-any/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/vitest.config.mts +++ b/seed/ts-sdk/unknown/unknown-as-any/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/url-form-encoded/src/Client.ts b/seed/ts-sdk/url-form-encoded/src/Client.ts index 1a53e1a6fa18..aa968164bdf4 100644 --- a/seed/ts-sdk/url-form-encoded/src/Client.ts +++ b/seed/ts-sdk/url-form-encoded/src/Client.ts @@ -95,8 +95,7 @@ export class SeedApiClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/url-form-encoded/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/url-form-encoded/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/url-form-encoded/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/url-form-encoded/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/url-form-encoded/vitest.config.mts b/seed/ts-sdk/url-form-encoded/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/url-form-encoded/vitest.config.mts +++ b/seed/ts-sdk/url-form-encoded/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/validation/src/Client.ts b/seed/ts-sdk/validation/src/Client.ts index c93a651521fd..b645e26e60c5 100644 --- a/seed/ts-sdk/validation/src/Client.ts +++ b/seed/ts-sdk/validation/src/Client.ts @@ -154,8 +154,7 @@ export class SeedValidationClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/validation/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/validation/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/validation/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/validation/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/validation/vitest.config.mts b/seed/ts-sdk/validation/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/validation/vitest.config.mts +++ b/seed/ts-sdk/validation/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/variables/src/Client.ts b/seed/ts-sdk/variables/src/Client.ts index 3286d5a1f6e6..7bfe9a0d0373 100644 --- a/seed/ts-sdk/variables/src/Client.ts +++ b/seed/ts-sdk/variables/src/Client.ts @@ -42,8 +42,7 @@ export class SeedVariablesClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/variables/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/variables/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/variables/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/variables/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/variables/vitest.config.mts b/seed/ts-sdk/variables/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/variables/vitest.config.mts +++ b/seed/ts-sdk/variables/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/version-no-default/src/Client.ts b/seed/ts-sdk/version-no-default/src/Client.ts index 12ad500e02a8..da503ed6c9ca 100644 --- a/seed/ts-sdk/version-no-default/src/Client.ts +++ b/seed/ts-sdk/version-no-default/src/Client.ts @@ -42,8 +42,7 @@ export class SeedVersionClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/version-no-default/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/version-no-default/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/version-no-default/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/version-no-default/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/version-no-default/vitest.config.mts b/seed/ts-sdk/version-no-default/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/version-no-default/vitest.config.mts +++ b/seed/ts-sdk/version-no-default/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/version/src/Client.ts b/seed/ts-sdk/version/src/Client.ts index 12ad500e02a8..da503ed6c9ca 100644 --- a/seed/ts-sdk/version/src/Client.ts +++ b/seed/ts-sdk/version/src/Client.ts @@ -42,8 +42,7 @@ export class SeedVersionClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/version/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/version/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/version/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/version/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/version/vitest.config.mts b/seed/ts-sdk/version/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/version/vitest.config.mts +++ b/seed/ts-sdk/version/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/webhook-audience/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/webhook-audience/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/webhook-audience/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/webhook-audience/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/webhook-audience/vitest.config.mts b/seed/ts-sdk/webhook-audience/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/webhook-audience/vitest.config.mts +++ b/seed/ts-sdk/webhook-audience/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/webhooks/no-custom-config/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/webhooks/no-custom-config/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/webhooks/no-custom-config/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/webhooks/no-custom-config/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/webhooks/no-custom-config/vitest.config.mts b/seed/ts-sdk/webhooks/no-custom-config/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/webhooks/no-custom-config/vitest.config.mts +++ b/seed/ts-sdk/webhooks/no-custom-config/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/websocket-bearer-auth/websockets/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/websocket-bearer-auth/websockets/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/websocket-bearer-auth/websockets/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/websocket-bearer-auth/websockets/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/websocket-bearer-auth/websockets/vitest.config.mts b/seed/ts-sdk/websocket-bearer-auth/websockets/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/websocket-bearer-auth/websockets/vitest.config.mts +++ b/seed/ts-sdk/websocket-bearer-auth/websockets/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/websocket-inferred-auth/websockets/src/Client.ts b/seed/ts-sdk/websocket-inferred-auth/websockets/src/Client.ts index 48368aff9566..10c3ca6cd87f 100644 --- a/seed/ts-sdk/websocket-inferred-auth/websockets/src/Client.ts +++ b/seed/ts-sdk/websocket-inferred-auth/websockets/src/Client.ts @@ -48,8 +48,7 @@ export class SeedWebsocketAuthClient { input, init, { - environment: this._options.environment, - baseUrl: this._options.baseUrl, + baseUrl: this._options.baseUrl ?? this._options.environment, headers: this._options.headers, timeoutInSeconds: this._options.timeoutInSeconds, maxRetries: this._options.maxRetries, diff --git a/seed/ts-sdk/websocket-inferred-auth/websockets/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/websocket-inferred-auth/websockets/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/websocket-inferred-auth/websockets/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/websocket-inferred-auth/websockets/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/websocket-inferred-auth/websockets/vitest.config.mts b/seed/ts-sdk/websocket-inferred-auth/websockets/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/websocket-inferred-auth/websockets/vitest.config.mts +++ b/seed/ts-sdk/websocket-inferred-auth/websockets/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/websocket/no-serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/websocket/no-serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/websocket/no-serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/websocket/no-serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/websocket/no-serde/vitest.config.mts b/seed/ts-sdk/websocket/no-serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/websocket/no-serde/vitest.config.mts +++ b/seed/ts-sdk/websocket/no-serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/websocket/no-websocket-clients/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/websocket/no-websocket-clients/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/websocket/no-websocket-clients/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/websocket/no-websocket-clients/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/websocket/no-websocket-clients/vitest.config.mts b/seed/ts-sdk/websocket/no-websocket-clients/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/websocket/no-websocket-clients/vitest.config.mts +++ b/seed/ts-sdk/websocket/no-websocket-clients/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/seed/ts-sdk/websocket/serde/tests/mock-server/MockServerPool.ts b/seed/ts-sdk/websocket/serde/tests/mock-server/MockServerPool.ts index e1a90f7fb2e3..d7d891a2d80b 100644 --- a/seed/ts-sdk/websocket/serde/tests/mock-server/MockServerPool.ts +++ b/seed/ts-sdk/websocket/serde/tests/mock-server/MockServerPool.ts @@ -103,4 +103,4 @@ class MockServerPool { } } -export const mockServerPool = new MockServerPool(); +export const mockServerPool: MockServerPool = new MockServerPool(); diff --git a/seed/ts-sdk/websocket/serde/vitest.config.mts b/seed/ts-sdk/websocket/serde/vitest.config.mts index ba2ec4f9d45a..0dee5a752d39 100644 --- a/seed/ts-sdk/websocket/serde/vitest.config.mts +++ b/seed/ts-sdk/websocket/serde/vitest.config.mts @@ -1,6 +1,10 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { + typecheck: { + enabled: true, + tsconfig: "./tests/tsconfig.json", + }, projects: [ { test: { diff --git a/test-definitions/fern/apis/csharp-namespace-collision/definition/System/__package__.yml b/test-definitions/fern/apis/csharp-namespace-collision/definition/System/__package__.yml index 75179e639768..b3d0a5c6cb11 100644 --- a/test-definitions/fern/apis/csharp-namespace-collision/definition/System/__package__.yml +++ b/test-definitions/fern/apis/csharp-namespace-collision/definition/System/__package__.yml @@ -1,8 +1,12 @@ +imports: + root: __package__.yml + types: Task: properties: name: string user: User + owner: root.User User: properties: @@ -27,3 +31,9 @@ service: path: "" request: Task response: Task + getUser: + method: GET + path: /{userId} + path-parameters: + userId: string + response: root.User diff --git a/test-definitions/fern/apis/exhaustive/definition/endpoints/object.yml b/test-definitions/fern/apis/exhaustive/definition/endpoints/object.yml index 9896c5f60a5a..e7b0f2cedc06 100644 --- a/test-definitions/fern/apis/exhaustive/definition/endpoints/object.yml +++ b/test-definitions/fern/apis/exhaustive/definition/endpoints/object.yml @@ -80,6 +80,12 @@ service: request: objects.ObjectWithDocumentedUnknownType response: objects.ObjectWithDocumentedUnknownType + getAndReturnMapOfDocumentedUnknownType: + path: /get-and-return-map-of-documented-unknown-type + method: POST + request: objects.MapOfDocumentedUnknownType + response: objects.MapOfDocumentedUnknownType + getAndReturnWithDatetimeLikeString: docs: | Tests that string fields containing datetime-like values are NOT reformatted. diff --git a/test-definitions/fern/apis/exhaustive/definition/types/object.yml b/test-definitions/fern/apis/exhaustive/definition/types/object.yml index 8f8d09641cb9..52b1aa822259 100644 --- a/test-definitions/fern/apis/exhaustive/definition/types/object.yml +++ b/test-definitions/fern/apis/exhaustive/definition/types/object.yml @@ -72,6 +72,10 @@ types: Tests that unknown types are able to preserve their docstrings. type: unknown + MapOfDocumentedUnknownType: + docs: Tests that map value types with unknown types don't get spurious | undefined. + type: map + errors: ObjectWithOptionalFieldError: status-code: 400