From d97c5cc094e5feceb1e6d6ed8f04e570efc2a87d Mon Sep 17 00:00:00 2001 From: Armando Belardo <11140328+armandobelardo@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:39:11 -0500 Subject: [PATCH] fix, python: just use jsonable_encoder and remove .value from enum references (#3044) * just use jsonable_encoder * bump version * run lint * ignore enum too --- generators/python/sdk/CHANGELOG.md | 3 + generators/python/sdk/VERSION | 2 +- .../endpoint_function_generator.py | 27 +- .../inlined_request_body_parameters.py | 6 +- seed/csharp-model/enum/ir.json | 1455 +++++++++++++++-- seed/csharp-sdk/enum/ir.json | 1455 +++++++++++++++-- seed/fastapi/seed.yml | 1 + seed/go-fiber/enum/inlined_request.go | 5 +- seed/go-fiber/enum/query_param.go | 10 +- seed/go-fiber/enum/types.go | 107 ++ seed/go-model/enum/types.go | 107 ++ seed/go-sdk/enum/inlined_request.go | 5 +- seed/go-sdk/enum/pathparam/client.go | 5 +- seed/go-sdk/enum/query_param.go | 10 +- seed/go-sdk/enum/snippet.json | 2 +- seed/go-sdk/enum/types.go | 107 ++ .../requests/SendEnumInlinedRequest.java | 119 +- .../resources/pathparam/PathParamService.java | 9 +- .../queryparam/QueryParamService.java | 6 +- seed/java-spring/enum/types/Color.java | 26 + .../enum/types/ColorOrOperand.java | 217 +++ seed/openapi/enum/openapi.yml | 74 +- seed/postman/enum/collection.json | 21 +- seed/pydantic/enum/poetry.lock | 126 +- seed/pydantic/enum/pyproject.toml | 1 + seed/pydantic/enum/src/seed/enum/__init__.py | 4 +- seed/pydantic/enum/src/seed/enum/color.py | 17 + .../enum/src/seed/enum/color_or_operand.py | 26 + .../src/seed/resources/service/client.py | 6 +- seed/python-sdk/enum/.fernignore | 1 + seed/python-sdk/enum/poetry.lock | 168 +- seed/python-sdk/enum/snippet.json | 2 +- seed/python-sdk/enum/src/seed/__init__.py | 13 +- .../seed/resources/inlined_request/client.py | 49 +- .../src/seed/resources/path_param/client.py | 43 +- .../src/seed/resources/query_param/client.py | 79 +- .../enum/src/seed/types/__init__.py | 4 +- seed/python-sdk/enum/src/seed/types/color.py | 17 + .../enum/src/seed/types/color_or_operand.py | 34 + seed/python-sdk/enum/tests/test_json.py | 38 + .../notification/resources/service/client.py | 8 +- .../file/resources/service/client.py | 4 +- .../health/resources/service/client.py | 4 +- .../src/seed/resources/service/client.py | 4 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../src/seed/endpoints/http_methods/client.py | 16 +- .../src/seed/endpoints/params/client.py | 12 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../resources/http_methods/client.py | 16 +- .../endpoints/resources/params/client.py | 12 +- .../src/seed/resources/payment/client.py | 4 +- .../imdb/src/seed/resources/imdb/client.py | 4 +- .../python-sdk/package-yml/src/seed/client.py | 4 +- .../src/seed/resources/service/client.py | 8 +- .../trace/src/seed/resources/admin/client.py | 44 +- .../src/seed/resources/playlist/client.py | 34 +- .../src/seed/resources/problem/client.py | 16 +- .../src/seed/resources/submission/client.py | 16 +- .../src/seed/resources/sysprop/client.py | 4 +- .../resources/v_2/resources/problem/client.py | 12 +- .../resources/v_3/resources/problem/client.py | 12 +- .../src/seed/resources/service/client.py | 4 +- seed/ruby-model/enum/lib/seed_enum_client.rb | 2 + .../enum/lib/seed_enum_client/types/color.rb | 8 + .../types/color_or_operand.rb | 87 + .../inlined_request/client.rb | 27 +- .../lib/seed_enum_client/path_param/client.rb | 15 +- .../seed_enum_client/query_param/client.rb | 36 +- .../enum/lib/seed_enum_client/types/color.rb | 8 + .../types/color_or_operand.rb | 87 + seed/ruby-sdk/enum/lib/types_export.rb | 2 + .../requests/SendEnumInlinedRequest.d.ts | 5 +- .../pathParam/service/PathParamService.d.ts | 3 + .../pathParam/service/PathParamService.js | 2 +- .../queryParam/service/QueryParamService.d.ts | 6 +- seed/ts-express/enum/api/types/Color.d.ts | 8 + seed/ts-express/enum/api/types/Color.js | 10 + .../enum/api/types/ColorOrOperand.d.ts | 15 + .../enum/api/types/ColorOrOperand.js | 5 + seed/ts-express/enum/api/types/index.d.ts | 2 + seed/ts-express/enum/api/types/index.js | 2 + .../requests/SendEnumInlinedRequest.d.ts | 5 +- .../requests/SendEnumInlinedRequest.js | 5 +- .../enum/serialization/types/Color.d.ts | 10 + .../enum/serialization/types/Color.js | 34 + .../serialization/types/ColorOrOperand.d.ts | 18 + .../serialization/types/ColorOrOperand.js | 52 + .../enum/serialization/types/index.d.ts | 2 + .../enum/serialization/types/index.js | 2 + seed/ts-sdk/enum/snippet.json | 4 +- .../resources/inlinedRequest/client/Client.ts | 2 +- .../client/requests/SendEnumInlinedRequest.ts | 5 +- .../api/resources/pathParam/client/Client.ts | 14 +- .../api/resources/queryParam/client/Client.ts | 27 +- .../requests/SendEnumAsQueryParamRequest.ts | 3 +- .../SendEnumListAsQueryParamRequest.ts | 3 +- seed/ts-sdk/enum/src/api/types/Color.ts | 10 + .../enum/src/api/types/ColorOrOperand.ts | 19 + seed/ts-sdk/enum/src/api/types/index.ts | 2 + .../client/requests/SendEnumInlinedRequest.ts | 10 +- .../enum/src/serialization/types/Color.ts | 16 + .../src/serialization/types/ColorOrOperand.ts | 36 + .../enum/src/serialization/types/index.ts | 2 + .../fern/apis/enum/definition/__package__.yml | 14 +- .../apis/enum/definition/inlined-request.yml | 5 +- .../fern/apis/enum/definition/path-param.yml | 5 +- .../fern/apis/enum/definition/query-param.yml | 15 +- 115 files changed, 4701 insertions(+), 734 deletions(-) create mode 100644 seed/java-spring/enum/types/Color.java create mode 100644 seed/java-spring/enum/types/ColorOrOperand.java create mode 100644 seed/pydantic/enum/src/seed/enum/color.py create mode 100644 seed/pydantic/enum/src/seed/enum/color_or_operand.py create mode 100644 seed/python-sdk/enum/.fernignore create mode 100644 seed/python-sdk/enum/src/seed/types/color.py create mode 100644 seed/python-sdk/enum/src/seed/types/color_or_operand.py create mode 100644 seed/python-sdk/enum/tests/test_json.py create mode 100644 seed/ruby-model/enum/lib/seed_enum_client/types/color.rb create mode 100644 seed/ruby-model/enum/lib/seed_enum_client/types/color_or_operand.rb create mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/types/color.rb create mode 100644 seed/ruby-sdk/enum/lib/seed_enum_client/types/color_or_operand.rb create mode 100644 seed/ts-express/enum/api/types/Color.d.ts create mode 100644 seed/ts-express/enum/api/types/Color.js create mode 100644 seed/ts-express/enum/api/types/ColorOrOperand.d.ts create mode 100644 seed/ts-express/enum/api/types/ColorOrOperand.js create mode 100644 seed/ts-express/enum/serialization/types/Color.d.ts create mode 100644 seed/ts-express/enum/serialization/types/Color.js create mode 100644 seed/ts-express/enum/serialization/types/ColorOrOperand.d.ts create mode 100644 seed/ts-express/enum/serialization/types/ColorOrOperand.js create mode 100644 seed/ts-sdk/enum/src/api/types/Color.ts create mode 100644 seed/ts-sdk/enum/src/api/types/ColorOrOperand.ts create mode 100644 seed/ts-sdk/enum/src/serialization/types/Color.ts create mode 100644 seed/ts-sdk/enum/src/serialization/types/ColorOrOperand.ts diff --git a/generators/python/sdk/CHANGELOG.md b/generators/python/sdk/CHANGELOG.md index d1aaa21ca6e..6f9701cccd9 100644 --- a/generators/python/sdk/CHANGELOG.md +++ b/generators/python/sdk/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.11.4] - 2024-02-23 + +- Fix: We now grab enum values appropriately when enums are within unions. ## [0.11.3] - 2024-02-22 diff --git a/generators/python/sdk/VERSION b/generators/python/sdk/VERSION index 1a96df19c09..35ad34429be 100644 --- a/generators/python/sdk/VERSION +++ b/generators/python/sdk/VERSION @@ -1 +1 @@ -0.11.3 +0.11.4 diff --git a/generators/python/src/fern_python/generators/sdk/client_generator/endpoint_function_generator.py b/generators/python/src/fern_python/generators/sdk/client_generator/endpoint_function_generator.py index 7ee06a04e5f..179da041009 100644 --- a/generators/python/src/fern_python/generators/sdk/client_generator/endpoint_function_generator.py +++ b/generators/python/src/fern_python/generators/sdk/client_generator/endpoint_function_generator.py @@ -532,19 +532,18 @@ def write(writer: AST.NodeWriter) -> None: writer.write_node(AST.Expression(f"{possible_path_part_literal}")) else: writer.write("{") - if self._context.resolved_schema_is_enum(reference=parameter_obj.value_type): - writer.write(f"{get_parameter_name(parameter_obj.name)}.value") - elif self._context.resolved_schema_is_optional_enum(reference=parameter_obj.value_type): - writer.write(f"{get_parameter_name(parameter_obj.name)}.value") - else: - writer.write( - get_parameter_name( - self._get_path_parameter_from_name( - endpoint=endpoint, - path_parameter_name=part.path_parameter, - ).name, + writer.write_node( + self._context.core_utilities.jsonable_encoder( + AST.Expression( + get_parameter_name( + self._get_path_parameter_from_name( + endpoint=endpoint, + path_parameter_name=part.path_parameter, + ).name, + ) ) ) + ) writer.write("}") writer.write(part.tail) writer.write('"') @@ -644,12 +643,6 @@ def write_ternary(writer: AST.NodeWriter) -> None: reference = AST.Expression(AST.CodeWriter(write_ternary)) - elif self._context.resolved_schema_is_enum(reference=query_parameter.value_type): - return AST.Expression(f"{parameter_name}.value") - - elif self._context.resolved_schema_is_optional_enum(reference=query_parameter.value_type): - return AST.Expression(f"{parameter_name}.value if {parameter_name} is not None else None") - elif not self._is_httpx_primitive_data(query_parameter.value_type, allow_optional=True): reference = self._context.core_utilities.jsonable_encoder(reference) diff --git a/generators/python/src/fern_python/generators/sdk/client_generator/request_body_parameters/inlined_request_body_parameters.py b/generators/python/src/fern_python/generators/sdk/client_generator/request_body_parameters/inlined_request_body_parameters.py index c1e0dac36a4..19874d8c2a3 100644 --- a/generators/python/src/fern_python/generators/sdk/client_generator/request_body_parameters/inlined_request_body_parameters.py +++ b/generators/python/src/fern_python/generators/sdk/client_generator/request_body_parameters/inlined_request_body_parameters.py @@ -127,11 +127,7 @@ def write(writer: AST.NodeWriter) -> None: with writer.indent(): for required_property in required_properties: literal_value = self._context.get_literal_value(reference=required_property.value_type) - if self._context.resolved_schema_is_enum(reference=required_property.value_type): - writer.write_line( - f'"{required_property.name.wire_value}": {self._get_property_name(required_property)}.value,' - ) - elif literal_value is not None and type(literal_value) is str: + if literal_value is not None and type(literal_value) is str: writer.write_line(f'"{required_property.name.wire_value}": "{literal_value}",') elif literal_value is not None and type(literal_value) is bool: writer.write_line(f'"{required_property.name.wire_value}": {literal_value},') diff --git a/seed/csharp-model/enum/ir.json b/seed/csharp-model/enum/ir.json index 5ec3d1c1739..b389afef620 100644 --- a/seed/csharp-model/enum/ir.json +++ b/seed/csharp-model/enum/ir.json @@ -228,6 +228,300 @@ } ], "docs": "Tests enum name and value can be\ndifferent." + }, + "type_:Color": { + "name": { + "name": { + "originalName": "Color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Color" + }, + "shape": { + "type": "enum", + "values": [ + { + "name": { + "name": { + "originalName": "RED", + "camelCase": { + "unsafeName": "red", + "safeName": "red" + }, + "snakeCase": { + "unsafeName": "red", + "safeName": "red" + }, + "screamingSnakeCase": { + "unsafeName": "RED", + "safeName": "RED" + }, + "pascalCase": { + "unsafeName": "Red", + "safeName": "Red" + } + }, + "wireValue": "red" + } + }, + { + "name": { + "name": { + "originalName": "BLUE", + "camelCase": { + "unsafeName": "blue", + "safeName": "blue" + }, + "snakeCase": { + "unsafeName": "blue", + "safeName": "blue" + }, + "screamingSnakeCase": { + "unsafeName": "BLUE", + "safeName": "BLUE" + }, + "pascalCase": { + "unsafeName": "Blue", + "safeName": "Blue" + } + }, + "wireValue": "blue" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_:ColorOrOperand": { + "name": { + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "shape": { + "type": "union", + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ + { + "discriminantValue": { + "name": { + "originalName": "color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "wireValue": "color" + }, + "shape": { + "propertiesType": "singleProperty", + "name": { + "name": { + "originalName": "value", + "camelCase": { + "unsafeName": "value", + "safeName": "value" + }, + "snakeCase": { + "unsafeName": "value", + "safeName": "value" + }, + "screamingSnakeCase": { + "unsafeName": "VALUE", + "safeName": "VALUE" + }, + "pascalCase": { + "unsafeName": "Value", + "safeName": "Value" + } + }, + "wireValue": "value" + }, + "type": { + "type": "named", + "name": { + "originalName": "Color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Color" + } + } + }, + { + "discriminantValue": { + "name": { + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "wireValue": "operand" + }, + "shape": { + "propertiesType": "singleProperty", + "name": { + "name": { + "originalName": "value", + "camelCase": { + "unsafeName": "value", + "safeName": "value" + }, + "snakeCase": { + "unsafeName": "value", + "safeName": "value" + }, + "screamingSnakeCase": { + "unsafeName": "VALUE", + "safeName": "VALUE" + }, + "pascalCase": { + "unsafeName": "Value", + "safeName": "Value" + } + }, + "wireValue": "value" + }, + "type": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + } + } + } + ] + }, + "referencedTypes": {}, + "examples": [] } }, "errors": {}, @@ -367,6 +661,57 @@ }, "wireValue": "operand" }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + } + }, + { + "name": { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "wireValue": "maybeOperand" + }, "valueType": { "container": { "optional": { @@ -400,6 +745,114 @@ }, "type": "container" } + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + } + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + } } ] }, @@ -503,67 +956,58 @@ }, "value": { "shape": { - "container": { - "optional": { - "shape": { - "type": "named", - "typeName": { - "typeId": "type_:Operand", - "fernFilepath": { - "allParts": [], - "packagePath": [] - }, - "name": { - "originalName": "Operand", - "camelCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" - }, - "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" - } - } + "type": "named", + "typeName": { + "typeId": "type_:Operand", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + } + }, + "shape": { + "type": "enum", + "value": { + "name": { + "originalName": ">", + "camelCase": { + "unsafeName": "", + "safeName": "" }, - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": ">", - "camelCase": { - "unsafeName": "", - "safeName": "" - }, - "snakeCase": { - "unsafeName": "", - "safeName": "" - }, - "screamingSnakeCase": { - "unsafeName": "", - "safeName": "" - }, - "pascalCase": { - "unsafeName": "", - "safeName": "" - } - }, - "wireValue": ">" - } + "snakeCase": { + "unsafeName": "", + "safeName": "" + }, + "screamingSnakeCase": { + "unsafeName": "", + "safeName": "" + }, + "pascalCase": { + "unsafeName": "", + "safeName": "" } }, - "jsonExample": ">" - }, - "type": "optional" - }, - "type": "container" + "wireValue": ">" + } + } }, "jsonExample": ">" } @@ -650,79 +1094,262 @@ "unsafeName": "SEND", "safeName": "SEND" }, - "pascalCase": { - "unsafeName": "Send", - "safeName": "Send" - } - }, - "auth": false, - "idempotent": false, - "method": "POST", - "path": { - "head": "/path/", - "parts": [ - { - "pathParameter": "operand", - "tail": "" - } - ] - }, - "fullPath": { - "head": "path/", - "parts": [ - { - "pathParameter": "operand", - "tail": "" - } - ] - }, - "pathParameters": [ + "pascalCase": { + "unsafeName": "Send", + "safeName": "Send" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/path/", + "parts": [ + { + "pathParameter": "operand", + "tail": "/" + }, + { + "pathParameter": "maybeOperand", + "tail": "/" + }, + { + "pathParameter": "operandOrColor", + "tail": "/" + }, + { + "pathParameter": "maybeOperandOrColor", + "tail": "" + } + ] + }, + "fullPath": { + "head": "path/", + "parts": [ + { + "pathParameter": "operand", + "tail": "/" + }, + { + "pathParameter": "maybeOperand", + "tail": "/" + }, + { + "pathParameter": "operandOrColor", + "tail": "/" + }, + { + "pathParameter": "maybeOperandOrColor", + "tail": "" + } + ] + }, + "pathParameters": [ + { + "name": { + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" + }, { "name": { - "originalName": "operand", + "originalName": "operandOrColor", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" } }, "valueType": { "type": "named", "name": { - "originalName": "Operand", + "originalName": "ColorOrOperand", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" } }, "fernFilepath": { "allParts": [], "packagePath": [] }, - "typeId": "type_:Operand" + "typeId": "type_:ColorOrOperand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" }, "location": "ENDPOINT" } @@ -776,6 +1403,165 @@ "typeId": "type_:Operand" }, "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" } ], "queryParameters": [], @@ -783,7 +1569,7 @@ "errors": [], "examples": [ { - "url": "/path/>", + "url": "/path/>/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", "rootPathParameters": [], "endpointPathParameters": [ { @@ -968,25 +1754,77 @@ { "name": { "name": { - "originalName": "operand", + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "wireValue": "operand" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "maybeOperand", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" } }, - "wireValue": "operand" + "wireValue": "maybeOperand" }, "valueType": { "container": { @@ -1022,6 +1860,116 @@ "type": "container" }, "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false } ], "headers": [], @@ -1122,67 +2070,58 @@ }, "value": { "shape": { - "container": { - "optional": { - "shape": { - "type": "named", - "typeName": { - "typeId": "type_:Operand", - "fernFilepath": { - "allParts": [], - "packagePath": [] - }, - "name": { - "originalName": "Operand", - "camelCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" - }, - "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" - } - } + "type": "named", + "typeName": { + "typeId": "type_:Operand", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + } + }, + "shape": { + "type": "enum", + "value": { + "name": { + "originalName": ">", + "camelCase": { + "unsafeName": "", + "safeName": "" }, - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": ">", - "camelCase": { - "unsafeName": "", - "safeName": "" - }, - "snakeCase": { - "unsafeName": "", - "safeName": "" - }, - "screamingSnakeCase": { - "unsafeName": "", - "safeName": "" - }, - "pascalCase": { - "unsafeName": "", - "safeName": "" - } - }, - "wireValue": ">" - } + "snakeCase": { + "unsafeName": "", + "safeName": "" + }, + "screamingSnakeCase": { + "unsafeName": "", + "safeName": "" + }, + "pascalCase": { + "unsafeName": "", + "safeName": "" } }, - "jsonExample": ">" - }, - "type": "optional" - }, - "type": "container" + "wireValue": ">" + } + } }, "jsonExample": ">" } @@ -1252,6 +2191,58 @@ }, "wireValue": "operand" }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "wireValue": "maybeOperand" + }, "valueType": { "container": { "optional": { @@ -1286,6 +2277,116 @@ "type": "container" }, "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": true } ], "headers": [], @@ -1389,7 +2490,9 @@ "serviceTypeReferenceInfo": { "typesReferencedOnlyByService": {}, "sharedTypes": [ - "type_:Operand" + "type_:Operand", + "type_:Color", + "type_:ColorOrOperand" ] }, "webhookGroups": {}, @@ -1613,7 +2716,9 @@ }, "websocket": null, "types": [ - "type_:Operand" + "type_:Operand", + "type_:Color", + "type_:ColorOrOperand" ], "errors": [], "subpackages": [ diff --git a/seed/csharp-sdk/enum/ir.json b/seed/csharp-sdk/enum/ir.json index 5ec3d1c1739..b389afef620 100644 --- a/seed/csharp-sdk/enum/ir.json +++ b/seed/csharp-sdk/enum/ir.json @@ -228,6 +228,300 @@ } ], "docs": "Tests enum name and value can be\ndifferent." + }, + "type_:Color": { + "name": { + "name": { + "originalName": "Color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Color" + }, + "shape": { + "type": "enum", + "values": [ + { + "name": { + "name": { + "originalName": "RED", + "camelCase": { + "unsafeName": "red", + "safeName": "red" + }, + "snakeCase": { + "unsafeName": "red", + "safeName": "red" + }, + "screamingSnakeCase": { + "unsafeName": "RED", + "safeName": "RED" + }, + "pascalCase": { + "unsafeName": "Red", + "safeName": "Red" + } + }, + "wireValue": "red" + } + }, + { + "name": { + "name": { + "originalName": "BLUE", + "camelCase": { + "unsafeName": "blue", + "safeName": "blue" + }, + "snakeCase": { + "unsafeName": "blue", + "safeName": "blue" + }, + "screamingSnakeCase": { + "unsafeName": "BLUE", + "safeName": "BLUE" + }, + "pascalCase": { + "unsafeName": "Blue", + "safeName": "Blue" + } + }, + "wireValue": "blue" + } + } + ] + }, + "referencedTypes": {}, + "examples": [] + }, + "type_:ColorOrOperand": { + "name": { + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "shape": { + "type": "union", + "discriminant": { + "name": { + "originalName": "type", + "camelCase": { + "unsafeName": "type", + "safeName": "type" + }, + "snakeCase": { + "unsafeName": "type", + "safeName": "type" + }, + "screamingSnakeCase": { + "unsafeName": "TYPE", + "safeName": "TYPE" + }, + "pascalCase": { + "unsafeName": "Type", + "safeName": "Type" + } + }, + "wireValue": "type" + }, + "extends": [], + "baseProperties": [], + "types": [ + { + "discriminantValue": { + "name": { + "originalName": "color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "wireValue": "color" + }, + "shape": { + "propertiesType": "singleProperty", + "name": { + "name": { + "originalName": "value", + "camelCase": { + "unsafeName": "value", + "safeName": "value" + }, + "snakeCase": { + "unsafeName": "value", + "safeName": "value" + }, + "screamingSnakeCase": { + "unsafeName": "VALUE", + "safeName": "VALUE" + }, + "pascalCase": { + "unsafeName": "Value", + "safeName": "Value" + } + }, + "wireValue": "value" + }, + "type": { + "type": "named", + "name": { + "originalName": "Color", + "camelCase": { + "unsafeName": "color", + "safeName": "color" + }, + "snakeCase": { + "unsafeName": "color", + "safeName": "color" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR", + "safeName": "COLOR" + }, + "pascalCase": { + "unsafeName": "Color", + "safeName": "Color" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Color" + } + } + }, + { + "discriminantValue": { + "name": { + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "wireValue": "operand" + }, + "shape": { + "propertiesType": "singleProperty", + "name": { + "name": { + "originalName": "value", + "camelCase": { + "unsafeName": "value", + "safeName": "value" + }, + "snakeCase": { + "unsafeName": "value", + "safeName": "value" + }, + "screamingSnakeCase": { + "unsafeName": "VALUE", + "safeName": "VALUE" + }, + "pascalCase": { + "unsafeName": "Value", + "safeName": "Value" + } + }, + "wireValue": "value" + }, + "type": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + } + } + } + ] + }, + "referencedTypes": {}, + "examples": [] } }, "errors": {}, @@ -367,6 +661,57 @@ }, "wireValue": "operand" }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + } + }, + { + "name": { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "wireValue": "maybeOperand" + }, "valueType": { "container": { "optional": { @@ -400,6 +745,114 @@ }, "type": "container" } + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + } + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + } } ] }, @@ -503,67 +956,58 @@ }, "value": { "shape": { - "container": { - "optional": { - "shape": { - "type": "named", - "typeName": { - "typeId": "type_:Operand", - "fernFilepath": { - "allParts": [], - "packagePath": [] - }, - "name": { - "originalName": "Operand", - "camelCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" - }, - "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" - } - } + "type": "named", + "typeName": { + "typeId": "type_:Operand", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + } + }, + "shape": { + "type": "enum", + "value": { + "name": { + "originalName": ">", + "camelCase": { + "unsafeName": "", + "safeName": "" }, - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": ">", - "camelCase": { - "unsafeName": "", - "safeName": "" - }, - "snakeCase": { - "unsafeName": "", - "safeName": "" - }, - "screamingSnakeCase": { - "unsafeName": "", - "safeName": "" - }, - "pascalCase": { - "unsafeName": "", - "safeName": "" - } - }, - "wireValue": ">" - } + "snakeCase": { + "unsafeName": "", + "safeName": "" + }, + "screamingSnakeCase": { + "unsafeName": "", + "safeName": "" + }, + "pascalCase": { + "unsafeName": "", + "safeName": "" } }, - "jsonExample": ">" - }, - "type": "optional" - }, - "type": "container" + "wireValue": ">" + } + } }, "jsonExample": ">" } @@ -650,79 +1094,262 @@ "unsafeName": "SEND", "safeName": "SEND" }, - "pascalCase": { - "unsafeName": "Send", - "safeName": "Send" - } - }, - "auth": false, - "idempotent": false, - "method": "POST", - "path": { - "head": "/path/", - "parts": [ - { - "pathParameter": "operand", - "tail": "" - } - ] - }, - "fullPath": { - "head": "path/", - "parts": [ - { - "pathParameter": "operand", - "tail": "" - } - ] - }, - "pathParameters": [ + "pascalCase": { + "unsafeName": "Send", + "safeName": "Send" + } + }, + "auth": false, + "idempotent": false, + "method": "POST", + "path": { + "head": "/path/", + "parts": [ + { + "pathParameter": "operand", + "tail": "/" + }, + { + "pathParameter": "maybeOperand", + "tail": "/" + }, + { + "pathParameter": "operandOrColor", + "tail": "/" + }, + { + "pathParameter": "maybeOperandOrColor", + "tail": "" + } + ] + }, + "fullPath": { + "head": "path/", + "parts": [ + { + "pathParameter": "operand", + "tail": "/" + }, + { + "pathParameter": "maybeOperand", + "tail": "/" + }, + { + "pathParameter": "operandOrColor", + "tail": "/" + }, + { + "pathParameter": "maybeOperandOrColor", + "tail": "" + } + ] + }, + "pathParameters": [ + { + "name": { + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" + }, { "name": { - "originalName": "operand", + "originalName": "operandOrColor", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" } }, "valueType": { "type": "named", "name": { - "originalName": "Operand", + "originalName": "ColorOrOperand", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" } }, "fernFilepath": { "allParts": [], "packagePath": [] }, - "typeId": "type_:Operand" + "typeId": "type_:ColorOrOperand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" }, "location": "ENDPOINT" } @@ -776,6 +1403,165 @@ "typeId": "type_:Operand" }, "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "location": "ENDPOINT" + }, + { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "location": "ENDPOINT" } ], "queryParameters": [], @@ -783,7 +1569,7 @@ "errors": [], "examples": [ { - "url": "/path/>", + "url": "/path/>/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", "rootPathParameters": [], "endpointPathParameters": [ { @@ -968,25 +1754,77 @@ { "name": { "name": { - "originalName": "operand", + "originalName": "operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "wireValue": "operand" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "maybeOperand", "camelCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" }, "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" }, "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" }, "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" } }, - "wireValue": "operand" + "wireValue": "maybeOperand" }, "valueType": { "container": { @@ -1022,6 +1860,116 @@ "type": "container" }, "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "allowMultiple": false + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": false } ], "headers": [], @@ -1122,67 +2070,58 @@ }, "value": { "shape": { - "container": { - "optional": { - "shape": { - "type": "named", - "typeName": { - "typeId": "type_:Operand", - "fernFilepath": { - "allParts": [], - "packagePath": [] - }, - "name": { - "originalName": "Operand", - "camelCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "snakeCase": { - "unsafeName": "operand", - "safeName": "operand" - }, - "screamingSnakeCase": { - "unsafeName": "OPERAND", - "safeName": "OPERAND" - }, - "pascalCase": { - "unsafeName": "Operand", - "safeName": "Operand" - } - } + "type": "named", + "typeName": { + "typeId": "type_:Operand", + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + } + }, + "shape": { + "type": "enum", + "value": { + "name": { + "originalName": ">", + "camelCase": { + "unsafeName": "", + "safeName": "" }, - "shape": { - "type": "enum", - "value": { - "name": { - "originalName": ">", - "camelCase": { - "unsafeName": "", - "safeName": "" - }, - "snakeCase": { - "unsafeName": "", - "safeName": "" - }, - "screamingSnakeCase": { - "unsafeName": "", - "safeName": "" - }, - "pascalCase": { - "unsafeName": "", - "safeName": "" - } - }, - "wireValue": ">" - } + "snakeCase": { + "unsafeName": "", + "safeName": "" + }, + "screamingSnakeCase": { + "unsafeName": "", + "safeName": "" + }, + "pascalCase": { + "unsafeName": "", + "safeName": "" } }, - "jsonExample": ">" - }, - "type": "optional" - }, - "type": "container" + "wireValue": ">" + } + } }, "jsonExample": ">" } @@ -1252,6 +2191,58 @@ }, "wireValue": "operand" }, + "valueType": { + "type": "named", + "name": { + "originalName": "Operand", + "camelCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "snakeCase": { + "unsafeName": "operand", + "safeName": "operand" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND", + "safeName": "OPERAND" + }, + "pascalCase": { + "unsafeName": "Operand", + "safeName": "Operand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:Operand" + }, + "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "maybeOperand", + "camelCase": { + "unsafeName": "maybeOperand", + "safeName": "maybeOperand" + }, + "snakeCase": { + "unsafeName": "maybe_operand", + "safeName": "maybe_operand" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND", + "safeName": "MAYBE_OPERAND" + }, + "pascalCase": { + "unsafeName": "MaybeOperand", + "safeName": "MaybeOperand" + } + }, + "wireValue": "maybeOperand" + }, "valueType": { "container": { "optional": { @@ -1286,6 +2277,116 @@ "type": "container" }, "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "operandOrColor", + "camelCase": { + "unsafeName": "operandOrColor", + "safeName": "operandOrColor" + }, + "snakeCase": { + "unsafeName": "operand_or_color", + "safeName": "operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "OPERAND_OR_COLOR", + "safeName": "OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "OperandOrColor", + "safeName": "OperandOrColor" + } + }, + "wireValue": "operandOrColor" + }, + "valueType": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "allowMultiple": true + }, + { + "name": { + "name": { + "originalName": "maybeOperandOrColor", + "camelCase": { + "unsafeName": "maybeOperandOrColor", + "safeName": "maybeOperandOrColor" + }, + "snakeCase": { + "unsafeName": "maybe_operand_or_color", + "safeName": "maybe_operand_or_color" + }, + "screamingSnakeCase": { + "unsafeName": "MAYBE_OPERAND_OR_COLOR", + "safeName": "MAYBE_OPERAND_OR_COLOR" + }, + "pascalCase": { + "unsafeName": "MaybeOperandOrColor", + "safeName": "MaybeOperandOrColor" + } + }, + "wireValue": "maybeOperandOrColor" + }, + "valueType": { + "container": { + "optional": { + "type": "named", + "name": { + "originalName": "ColorOrOperand", + "camelCase": { + "unsafeName": "colorOrOperand", + "safeName": "colorOrOperand" + }, + "snakeCase": { + "unsafeName": "color_or_operand", + "safeName": "color_or_operand" + }, + "screamingSnakeCase": { + "unsafeName": "COLOR_OR_OPERAND", + "safeName": "COLOR_OR_OPERAND" + }, + "pascalCase": { + "unsafeName": "ColorOrOperand", + "safeName": "ColorOrOperand" + } + }, + "fernFilepath": { + "allParts": [], + "packagePath": [] + }, + "typeId": "type_:ColorOrOperand" + }, + "type": "optional" + }, + "type": "container" + }, + "allowMultiple": true } ], "headers": [], @@ -1389,7 +2490,9 @@ "serviceTypeReferenceInfo": { "typesReferencedOnlyByService": {}, "sharedTypes": [ - "type_:Operand" + "type_:Operand", + "type_:Color", + "type_:ColorOrOperand" ] }, "webhookGroups": {}, @@ -1613,7 +2716,9 @@ }, "websocket": null, "types": [ - "type_:Operand" + "type_:Operand", + "type_:Color", + "type_:ColorOrOperand" ], "errors": [], "subpackages": [ diff --git a/seed/fastapi/seed.yml b/seed/fastapi/seed.yml index be670d91cf6..efa19584e92 100644 --- a/seed/fastapi/seed.yml +++ b/seed/fastapi/seed.yml @@ -29,3 +29,4 @@ allowedFailures: - streaming - literal - websocket + - enum diff --git a/seed/go-fiber/enum/inlined_request.go b/seed/go-fiber/enum/inlined_request.go index da27590d949..1320f67451d 100644 --- a/seed/go-fiber/enum/inlined_request.go +++ b/seed/go-fiber/enum/inlined_request.go @@ -3,5 +3,8 @@ package enum type SendEnumInlinedRequest struct { - Operand *Operand `json:"operand,omitempty" url:"operand,omitempty"` + Operand Operand `json:"operand,omitempty" url:"operand,omitempty"` + MaybeOperand *Operand `json:"maybeOperand,omitempty" url:"maybeOperand,omitempty"` + OperandOrColor *ColorOrOperand `json:"operandOrColor,omitempty" url:"operandOrColor,omitempty"` + MaybeOperandOrColor *ColorOrOperand `json:"maybeOperandOrColor,omitempty" url:"maybeOperandOrColor,omitempty"` } diff --git a/seed/go-fiber/enum/query_param.go b/seed/go-fiber/enum/query_param.go index 656161de39d..56fd63f75fb 100644 --- a/seed/go-fiber/enum/query_param.go +++ b/seed/go-fiber/enum/query_param.go @@ -3,9 +3,15 @@ package enum type SendEnumAsQueryParamRequest struct { - Operand *Operand `query:"operand"` + Operand Operand `query:"operand"` + MaybeOperand *Operand `query:"maybeOperand"` + OperandOrColor *ColorOrOperand `query:"operandOrColor"` + MaybeOperandOrColor *ColorOrOperand `query:"maybeOperandOrColor"` } type SendEnumListAsQueryParamRequest struct { - Operand []*Operand `query:"operand"` + Operand []Operand `query:"operand"` + MaybeOperand []*Operand `query:"maybeOperand"` + OperandOrColor []*ColorOrOperand `query:"operandOrColor"` + MaybeOperandOrColor []*ColorOrOperand `query:"maybeOperandOrColor"` } diff --git a/seed/go-fiber/enum/types.go b/seed/go-fiber/enum/types.go index 68bc8963a63..214bee4da5b 100644 --- a/seed/go-fiber/enum/types.go +++ b/seed/go-fiber/enum/types.go @@ -3,9 +3,116 @@ package enum import ( + json "encoding/json" fmt "fmt" ) +type Color string + +const ( + ColorRed Color = "red" + ColorBlue Color = "blue" +) + +func NewColorFromString(s string) (Color, error) { + switch s { + case "red": + return ColorRed, nil + case "blue": + return ColorBlue, nil + } + var t Color + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (c Color) Ptr() *Color { + return &c +} + +type ColorOrOperand struct { + Type string + Color Color + Operand Operand +} + +func NewColorOrOperandFromColor(value Color) *ColorOrOperand { + return &ColorOrOperand{Type: "color", Color: value} +} + +func NewColorOrOperandFromOperand(value Operand) *ColorOrOperand { + return &ColorOrOperand{Type: "operand", Operand: value} +} + +func (c *ColorOrOperand) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + c.Type = unmarshaler.Type + switch unmarshaler.Type { + case "color": + var valueUnmarshaler struct { + Color Color `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Color = valueUnmarshaler.Color + case "operand": + var valueUnmarshaler struct { + Operand Operand `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Operand = valueUnmarshaler.Operand + } + return nil +} + +func (c ColorOrOperand) MarshalJSON() ([]byte, error) { + switch c.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + var marshaler = struct { + Type string `json:"type"` + Color Color `json:"value,omitempty"` + }{ + Type: c.Type, + Color: c.Color, + } + return json.Marshal(marshaler) + case "operand": + var marshaler = struct { + Type string `json:"type"` + Operand Operand `json:"value,omitempty"` + }{ + Type: c.Type, + Operand: c.Operand, + } + return json.Marshal(marshaler) + } +} + +type ColorOrOperandVisitor interface { + VisitColor(Color) error + VisitOperand(Operand) error +} + +func (c *ColorOrOperand) Accept(visitor ColorOrOperandVisitor) error { + switch c.Type { + default: + return fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + return visitor.VisitColor(c.Color) + case "operand": + return visitor.VisitOperand(c.Operand) + } +} + // Tests enum name and value can be // different. type Operand string diff --git a/seed/go-model/enum/types.go b/seed/go-model/enum/types.go index 68bc8963a63..214bee4da5b 100644 --- a/seed/go-model/enum/types.go +++ b/seed/go-model/enum/types.go @@ -3,9 +3,116 @@ package enum import ( + json "encoding/json" fmt "fmt" ) +type Color string + +const ( + ColorRed Color = "red" + ColorBlue Color = "blue" +) + +func NewColorFromString(s string) (Color, error) { + switch s { + case "red": + return ColorRed, nil + case "blue": + return ColorBlue, nil + } + var t Color + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (c Color) Ptr() *Color { + return &c +} + +type ColorOrOperand struct { + Type string + Color Color + Operand Operand +} + +func NewColorOrOperandFromColor(value Color) *ColorOrOperand { + return &ColorOrOperand{Type: "color", Color: value} +} + +func NewColorOrOperandFromOperand(value Operand) *ColorOrOperand { + return &ColorOrOperand{Type: "operand", Operand: value} +} + +func (c *ColorOrOperand) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + c.Type = unmarshaler.Type + switch unmarshaler.Type { + case "color": + var valueUnmarshaler struct { + Color Color `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Color = valueUnmarshaler.Color + case "operand": + var valueUnmarshaler struct { + Operand Operand `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Operand = valueUnmarshaler.Operand + } + return nil +} + +func (c ColorOrOperand) MarshalJSON() ([]byte, error) { + switch c.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + var marshaler = struct { + Type string `json:"type"` + Color Color `json:"value,omitempty"` + }{ + Type: c.Type, + Color: c.Color, + } + return json.Marshal(marshaler) + case "operand": + var marshaler = struct { + Type string `json:"type"` + Operand Operand `json:"value,omitempty"` + }{ + Type: c.Type, + Operand: c.Operand, + } + return json.Marshal(marshaler) + } +} + +type ColorOrOperandVisitor interface { + VisitColor(Color) error + VisitOperand(Operand) error +} + +func (c *ColorOrOperand) Accept(visitor ColorOrOperandVisitor) error { + switch c.Type { + default: + return fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + return visitor.VisitColor(c.Color) + case "operand": + return visitor.VisitOperand(c.Operand) + } +} + // Tests enum name and value can be // different. type Operand string diff --git a/seed/go-sdk/enum/inlined_request.go b/seed/go-sdk/enum/inlined_request.go index da27590d949..1320f67451d 100644 --- a/seed/go-sdk/enum/inlined_request.go +++ b/seed/go-sdk/enum/inlined_request.go @@ -3,5 +3,8 @@ package enum type SendEnumInlinedRequest struct { - Operand *Operand `json:"operand,omitempty" url:"operand,omitempty"` + Operand Operand `json:"operand,omitempty" url:"operand,omitempty"` + MaybeOperand *Operand `json:"maybeOperand,omitempty" url:"maybeOperand,omitempty"` + OperandOrColor *ColorOrOperand `json:"operandOrColor,omitempty" url:"operandOrColor,omitempty"` + MaybeOperandOrColor *ColorOrOperand `json:"maybeOperandOrColor,omitempty" url:"maybeOperandOrColor,omitempty"` } diff --git a/seed/go-sdk/enum/pathparam/client.go b/seed/go-sdk/enum/pathparam/client.go index 5d422431d2e..6a86fa39277 100644 --- a/seed/go-sdk/enum/pathparam/client.go +++ b/seed/go-sdk/enum/pathparam/client.go @@ -34,6 +34,9 @@ func NewClient(opts ...option.RequestOption) *Client { func (c *Client) Send( ctx context.Context, operand fern.Operand, + maybeOperand *fern.Operand, + operandOrColor *fern.ColorOrOperand, + maybeOperandOrColor *fern.ColorOrOperand, opts ...option.RequestOption, ) error { options := core.NewRequestOptions(opts...) @@ -45,7 +48,7 @@ func (c *Client) Send( if options.BaseURL != "" { baseURL = options.BaseURL } - endpointURL := fmt.Sprintf(baseURL+"/"+"path/%v", operand) + endpointURL := fmt.Sprintf(baseURL+"/"+"path/%v/%v/%v/%v", operand, maybeOperand, operandOrColor, maybeOperandOrColor) headers := core.MergeHeaders(c.header.Clone(), options.ToHeader()) diff --git a/seed/go-sdk/enum/query_param.go b/seed/go-sdk/enum/query_param.go index 77a52be50b9..776a838da3f 100644 --- a/seed/go-sdk/enum/query_param.go +++ b/seed/go-sdk/enum/query_param.go @@ -3,9 +3,15 @@ package enum type SendEnumAsQueryParamRequest struct { - Operand *Operand `json:"-" url:"operand,omitempty"` + Operand Operand `json:"-" url:"operand,omitempty"` + MaybeOperand *Operand `json:"-" url:"maybeOperand,omitempty"` + OperandOrColor *ColorOrOperand `json:"-" url:"operandOrColor,omitempty"` + MaybeOperandOrColor *ColorOrOperand `json:"-" url:"maybeOperandOrColor,omitempty"` } type SendEnumListAsQueryParamRequest struct { - Operand []*Operand `json:"-" url:"operand,omitempty"` + Operand []Operand `json:"-" url:"operand,omitempty"` + MaybeOperand []*Operand `json:"-" url:"maybeOperand,omitempty"` + OperandOrColor []*ColorOrOperand `json:"-" url:"operandOrColor,omitempty"` + MaybeOperandOrColor []*ColorOrOperand `json:"-" url:"maybeOperandOrColor,omitempty"` } diff --git a/seed/go-sdk/enum/snippet.json b/seed/go-sdk/enum/snippet.json index 525f077b55b..c769b9ebb7d 100644 --- a/seed/go-sdk/enum/snippet.json +++ b/seed/go-sdk/enum/snippet.json @@ -12,7 +12,7 @@ }, { "id": { - "path": "/path/{operand}", + "path": "/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", "method": "POST" }, "snippet": { diff --git a/seed/go-sdk/enum/types.go b/seed/go-sdk/enum/types.go index 68bc8963a63..214bee4da5b 100644 --- a/seed/go-sdk/enum/types.go +++ b/seed/go-sdk/enum/types.go @@ -3,9 +3,116 @@ package enum import ( + json "encoding/json" fmt "fmt" ) +type Color string + +const ( + ColorRed Color = "red" + ColorBlue Color = "blue" +) + +func NewColorFromString(s string) (Color, error) { + switch s { + case "red": + return ColorRed, nil + case "blue": + return ColorBlue, nil + } + var t Color + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (c Color) Ptr() *Color { + return &c +} + +type ColorOrOperand struct { + Type string + Color Color + Operand Operand +} + +func NewColorOrOperandFromColor(value Color) *ColorOrOperand { + return &ColorOrOperand{Type: "color", Color: value} +} + +func NewColorOrOperandFromOperand(value Operand) *ColorOrOperand { + return &ColorOrOperand{Type: "operand", Operand: value} +} + +func (c *ColorOrOperand) UnmarshalJSON(data []byte) error { + var unmarshaler struct { + Type string `json:"type"` + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + c.Type = unmarshaler.Type + switch unmarshaler.Type { + case "color": + var valueUnmarshaler struct { + Color Color `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Color = valueUnmarshaler.Color + case "operand": + var valueUnmarshaler struct { + Operand Operand `json:"value,omitempty"` + } + if err := json.Unmarshal(data, &valueUnmarshaler); err != nil { + return err + } + c.Operand = valueUnmarshaler.Operand + } + return nil +} + +func (c ColorOrOperand) MarshalJSON() ([]byte, error) { + switch c.Type { + default: + return nil, fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + var marshaler = struct { + Type string `json:"type"` + Color Color `json:"value,omitempty"` + }{ + Type: c.Type, + Color: c.Color, + } + return json.Marshal(marshaler) + case "operand": + var marshaler = struct { + Type string `json:"type"` + Operand Operand `json:"value,omitempty"` + }{ + Type: c.Type, + Operand: c.Operand, + } + return json.Marshal(marshaler) + } +} + +type ColorOrOperandVisitor interface { + VisitColor(Color) error + VisitOperand(Operand) error +} + +func (c *ColorOrOperand) Accept(visitor ColorOrOperandVisitor) error { + switch c.Type { + default: + return fmt.Errorf("invalid type %s in %T", c.Type, c) + case "color": + return visitor.VisitColor(c.Color) + case "operand": + return visitor.VisitOperand(c.Operand) + } +} + // Tests enum name and value can be // different. type Operand string diff --git a/seed/java-spring/enum/resources/inlinedrequest/requests/SendEnumInlinedRequest.java b/seed/java-spring/enum/resources/inlinedrequest/requests/SendEnumInlinedRequest.java index d13184eefe9..03b6b5afd1a 100644 --- a/seed/java-spring/enum/resources/inlinedrequest/requests/SendEnumInlinedRequest.java +++ b/seed/java-spring/enum/resources/inlinedrequest/requests/SendEnumInlinedRequest.java @@ -15,6 +15,7 @@ import java.lang.String; import java.util.Objects; import java.util.Optional; +import types.ColorOrOperand; import types.Operand; @JsonInclude(JsonInclude.Include.NON_EMPTY) @@ -22,17 +23,42 @@ builder = SendEnumInlinedRequest.Builder.class ) public final class SendEnumInlinedRequest { - private final Optional operand; + private final Operand operand; - private SendEnumInlinedRequest(Optional operand) { + private final Optional maybeOperand; + + private final ColorOrOperand operandOrColor; + + private final Optional maybeOperandOrColor; + + private SendEnumInlinedRequest(Operand operand, Optional maybeOperand, + ColorOrOperand operandOrColor, Optional maybeOperandOrColor) { this.operand = operand; + this.maybeOperand = maybeOperand; + this.operandOrColor = operandOrColor; + this.maybeOperandOrColor = maybeOperandOrColor; } @JsonProperty("operand") - public Optional getOperand() { + public Operand getOperand() { return operand; } + @JsonProperty("maybeOperand") + public Optional getMaybeOperand() { + return maybeOperand; + } + + @JsonProperty("operandOrColor") + public ColorOrOperand getOperandOrColor() { + return operandOrColor; + } + + @JsonProperty("maybeOperandOrColor") + public Optional getMaybeOperandOrColor() { + return maybeOperandOrColor; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -40,12 +66,12 @@ public boolean equals(Object other) { } private boolean equalTo(SendEnumInlinedRequest other) { - return operand.equals(other.operand); + return operand.equals(other.operand) && maybeOperand.equals(other.maybeOperand) && operandOrColor.equals(other.operandOrColor) && maybeOperandOrColor.equals(other.maybeOperandOrColor); } @java.lang.Override public int hashCode() { - return Objects.hash(this.operand); + return Objects.hash(this.operand, this.maybeOperand, this.operandOrColor, this.maybeOperandOrColor); } @java.lang.Override @@ -53,40 +79,105 @@ public String toString() { return ObjectMappers.stringify(this); } - public static Builder builder() { + public static OperandStage builder() { return new Builder(); } + public interface OperandStage { + OperandOrColorStage operand(Operand operand); + + Builder from(SendEnumInlinedRequest other); + } + + public interface OperandOrColorStage { + _FinalStage operandOrColor(ColorOrOperand operandOrColor); + } + + public interface _FinalStage { + SendEnumInlinedRequest build(); + + _FinalStage maybeOperand(Optional maybeOperand); + + _FinalStage maybeOperand(Operand maybeOperand); + + _FinalStage maybeOperandOrColor(Optional maybeOperandOrColor); + + _FinalStage maybeOperandOrColor(ColorOrOperand maybeOperandOrColor); + } + @JsonIgnoreProperties( ignoreUnknown = true ) - public static final class Builder { - private Optional operand = Optional.empty(); + public static final class Builder implements OperandStage, OperandOrColorStage, _FinalStage { + private Operand operand; + + private ColorOrOperand operandOrColor; + + private Optional maybeOperandOrColor = Optional.empty(); + + private Optional maybeOperand = Optional.empty(); private Builder() { } + @java.lang.Override public Builder from(SendEnumInlinedRequest other) { operand(other.getOperand()); + maybeOperand(other.getMaybeOperand()); + operandOrColor(other.getOperandOrColor()); + maybeOperandOrColor(other.getMaybeOperandOrColor()); + return this; + } + + @java.lang.Override + @JsonSetter("operand") + public OperandOrColorStage operand(Operand operand) { + this.operand = operand; + return this; + } + + @java.lang.Override + @JsonSetter("operandOrColor") + public _FinalStage operandOrColor(ColorOrOperand operandOrColor) { + this.operandOrColor = operandOrColor; return this; } + @java.lang.Override + public _FinalStage maybeOperandOrColor(ColorOrOperand maybeOperandOrColor) { + this.maybeOperandOrColor = Optional.of(maybeOperandOrColor); + return this; + } + + @java.lang.Override @JsonSetter( - value = "operand", + value = "maybeOperandOrColor", nulls = Nulls.SKIP ) - public Builder operand(Optional operand) { - this.operand = operand; + public _FinalStage maybeOperandOrColor(Optional maybeOperandOrColor) { + this.maybeOperandOrColor = maybeOperandOrColor; + return this; + } + + @java.lang.Override + public _FinalStage maybeOperand(Operand maybeOperand) { + this.maybeOperand = Optional.of(maybeOperand); return this; } - public Builder operand(Operand operand) { - this.operand = Optional.of(operand); + @java.lang.Override + @JsonSetter( + value = "maybeOperand", + nulls = Nulls.SKIP + ) + public _FinalStage maybeOperand(Optional maybeOperand) { + this.maybeOperand = maybeOperand; return this; } + @java.lang.Override public SendEnumInlinedRequest build() { - return new SendEnumInlinedRequest(operand); + return new SendEnumInlinedRequest(operand, maybeOperand, operandOrColor, maybeOperandOrColor); } } } diff --git a/seed/java-spring/enum/resources/pathparam/PathParamService.java b/seed/java-spring/enum/resources/pathparam/PathParamService.java index 2ee71c74bda..d35140dcdb4 100644 --- a/seed/java-spring/enum/resources/pathparam/PathParamService.java +++ b/seed/java-spring/enum/resources/pathparam/PathParamService.java @@ -4,15 +4,20 @@ package resources.pathparam; +import java.util.Optional; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; +import types.ColorOrOperand; import types.Operand; @RequestMapping( path = "/" ) public interface PathParamService { - @PostMapping("/path/{operand}") - void send(@PathVariable("operand") Operand operand); + @PostMapping("/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}") + void send(@PathVariable("operand") Operand operand, + @PathVariable("maybeOperand") Optional maybeOperand, + @PathVariable("operandOrColor") ColorOrOperand operandOrColor, + @PathVariable("maybeOperandOrColor") Optional maybeOperandOrColor); } diff --git a/seed/java-spring/enum/resources/queryparam/QueryParamService.java b/seed/java-spring/enum/resources/queryparam/QueryParamService.java index 34c0c1842d5..91e4be54d02 100644 --- a/seed/java-spring/enum/resources/queryparam/QueryParamService.java +++ b/seed/java-spring/enum/resources/queryparam/QueryParamService.java @@ -15,8 +15,10 @@ ) public interface QueryParamService { @PostMapping("/query") - void send(@RequestParam("operand") Optional operand); + void send(@RequestParam("operand") Operand operand, + @RequestParam("maybeOperand") Optional maybeOperand); @PostMapping("/query-list") - void sendList(@RequestParam("operand") Optional operand); + void sendList(@RequestParam("operand") Operand operand, + @RequestParam("maybeOperand") Optional maybeOperand); } diff --git a/seed/java-spring/enum/types/Color.java b/seed/java-spring/enum/types/Color.java new file mode 100644 index 00000000000..fbdb262f564 --- /dev/null +++ b/seed/java-spring/enum/types/Color.java @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +package types; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +public enum Color { + RED("red"), + + BLUE("blue"); + + private final String value; + + Color(String value) { + this.value = value; + } + + @JsonValue + @java.lang.Override + public String toString() { + return this.value; + } +} diff --git a/seed/java-spring/enum/types/ColorOrOperand.java b/seed/java-spring/enum/types/ColorOrOperand.java new file mode 100644 index 00000000000..6973b6ed966 --- /dev/null +++ b/seed/java-spring/enum/types/ColorOrOperand.java @@ -0,0 +1,217 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +package types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Object; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public final class ColorOrOperand { + private final Value value; + + @JsonCreator( + mode = JsonCreator.Mode.DELEGATING + ) + private ColorOrOperand(Value value) { + this.value = value; + } + + public T visit(Visitor visitor) { + return value.visit(visitor); + } + + public static ColorOrOperand color(Color value) { + return new ColorOrOperand(new ColorValue(value)); + } + + public static ColorOrOperand operand(Operand value) { + return new ColorOrOperand(new OperandValue(value)); + } + + public boolean isColor() { + return value instanceof ColorValue; + } + + public boolean isOperand() { + return value instanceof OperandValue; + } + + public boolean _isUnknown() { + return value instanceof _UnknownValue; + } + + public Optional getColor() { + if (isColor()) { + return Optional.of(((ColorValue) value).value); + } + return Optional.empty(); + } + + public Optional getOperand() { + if (isOperand()) { + return Optional.of(((OperandValue) value).value); + } + return Optional.empty(); + } + + public Optional _getUnknown() { + if (_isUnknown()) { + return Optional.of(((_UnknownValue) value).value); + } + return Optional.empty(); + } + + @JsonValue + private Value getValue() { + return this.value; + } + + public interface Visitor { + T visitColor(Color color); + + T visitOperand(Operand operand); + + T _visitUnknown(Object unknownType); + } + + @JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "type", + visible = true, + defaultImpl = _UnknownValue.class + ) + @JsonSubTypes({ + @JsonSubTypes.Type(ColorValue.class), + @JsonSubTypes.Type(OperandValue.class) + }) + @JsonIgnoreProperties( + ignoreUnknown = true + ) + private interface Value { + T visit(Visitor visitor); + } + + @JsonTypeName("color") + private static final class ColorValue implements Value { + @JsonProperty("value") + private Color value; + + @JsonCreator( + mode = JsonCreator.Mode.PROPERTIES + ) + private ColorValue(@JsonProperty("value") Color value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitColor(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof ColorValue && equalTo((ColorValue) other); + } + + private boolean equalTo(ColorValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ColorOrOperand{" + "value: " + value + "}"; + } + } + + @JsonTypeName("operand") + private static final class OperandValue implements Value { + @JsonProperty("value") + private Operand value; + + @JsonCreator( + mode = JsonCreator.Mode.PROPERTIES + ) + private OperandValue(@JsonProperty("value") Operand value) { + this.value = value; + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor.visitOperand(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof OperandValue && equalTo((OperandValue) other); + } + + private boolean equalTo(OperandValue other) { + return value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.value); + } + + @java.lang.Override + public String toString() { + return "ColorOrOperand{" + "value: " + value + "}"; + } + } + + private static final class _UnknownValue implements Value { + private String type; + + @JsonValue + private Object value; + + @JsonCreator( + mode = JsonCreator.Mode.PROPERTIES + ) + private _UnknownValue(@JsonProperty("value") Object value) { + } + + @java.lang.Override + public T visit(Visitor visitor) { + return visitor._visitUnknown(value); + } + + @java.lang.Override + public boolean equals(Object other) { + if (this == other) return true; + return other instanceof _UnknownValue && equalTo((_UnknownValue) other); + } + + private boolean equalTo(_UnknownValue other) { + return type.equals(other.type) && value.equals(other.value); + } + + @java.lang.Override + public int hashCode() { + return Objects.hash(this.type, this.value); + } + + @java.lang.Override + public String toString() { + return "ColorOrOperand{" + "type: " + type + ", value: " + value + "}"; + } + } +} diff --git a/seed/openapi/enum/openapi.yml b/seed/openapi/enum/openapi.yml index d6b55a82e17..a899c8c6cdb 100644 --- a/seed/openapi/enum/openapi.yml +++ b/seed/openapi/enum/openapi.yml @@ -21,12 +21,22 @@ paths: properties: operand: $ref: '#/components/schemas/Operand' + maybeOperand: + $ref: '#/components/schemas/Operand' + nullable: true + operandOrColor: + $ref: '#/components/schemas/ColorOrOperand' + maybeOperandOrColor: + $ref: '#/components/schemas/ColorOrOperand' nullable: true + required: + - operand + - operandOrColor examples: Example1: value: operand: '>' - /path/{operand}: + /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}: post: operationId: pathParam_send tags: @@ -40,6 +50,23 @@ paths: examples: Example1: value: '>' + - name: maybeOperand + in: path + required: true + schema: + $ref: '#/components/schemas/Operand' + nullable: true + - name: operandOrColor + in: path + required: true + schema: + $ref: '#/components/schemas/ColorOrOperand' + - name: maybeOperandOrColor + in: path + required: true + schema: + $ref: '#/components/schemas/ColorOrOperand' + nullable: true responses: '204': description: '' @@ -51,13 +78,18 @@ paths: parameters: - name: operand in: query - required: false + required: true schema: $ref: '#/components/schemas/Operand' - nullable: true examples: Example1: value: '>' + - name: maybeOperand + in: query + required: false + schema: + $ref: '#/components/schemas/Operand' + nullable: true responses: '204': description: '' @@ -68,6 +100,13 @@ paths: - QueryParam parameters: - name: operand + in: query + required: true + schema: + type: array + items: + $ref: '#/components/schemas/Operand' + - name: maybeOperand in: query required: false schema: @@ -90,4 +129,33 @@ components: description: |- Tests enum name and value can be different. + Color: + title: Color + type: string + enum: + - red + - blue + ColorOrOperand: + title: ColorOrOperand + oneOf: + - type: object + properties: + type: + type: string + enum: + - color + value: + $ref: '#/components/schemas/Color' + required: + - type + - type: object + properties: + type: + type: string + enum: + - operand + value: + $ref: '#/components/schemas/Operand' + required: + - type securitySchemes: {} diff --git a/seed/postman/enum/collection.json b/seed/postman/enum/collection.json index a26aa7098a0..bcac8e87aa7 100644 --- a/seed/postman/enum/collection.json +++ b/seed/postman/enum/collection.json @@ -109,13 +109,16 @@ "request": { "description": null, "url": { - "raw": "{{baseUrl}}/path/:operand", + "raw": "{{baseUrl}}/path/:operand/:maybeOperand/:operandOrColor/:maybeOperandOrColor", "host": [ "{{baseUrl}}" ], "path": [ "path", - ":operand" + ":operand", + ":maybeOperand", + ":operandOrColor", + ":maybeOperandOrColor" ], "query": [], "variable": [ @@ -145,13 +148,16 @@ "originalRequest": { "description": null, "url": { - "raw": "{{baseUrl}}/path/:operand", + "raw": "{{baseUrl}}/path/:operand/:maybeOperand/:operandOrColor/:maybeOperandOrColor", "host": [ "{{baseUrl}}" ], "path": [ "path", - ":operand" + ":operand", + ":maybeOperand", + ":operandOrColor", + ":maybeOperandOrColor" ], "query": [], "variable": [ @@ -266,7 +272,7 @@ "request": { "description": null, "url": { - "raw": "{{baseUrl}}/query-list?operand=", + "raw": "{{baseUrl}}/query-list?operand=&maybeOperand=", "host": [ "{{baseUrl}}" ], @@ -278,6 +284,11 @@ "key": "operand", "value": "", "description": null + }, + { + "key": "maybeOperand", + "value": "", + "description": null } ], "variable": [] diff --git a/seed/pydantic/enum/poetry.lock b/seed/pydantic/enum/poetry.lock index 630d36b81e7..de1b12902f6 100644 --- a/seed/pydantic/enum/poetry.lock +++ b/seed/pydantic/enum/poetry.lock @@ -1,5 +1,19 @@ # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +[[package]] +name = "annotated-types" +version = "0.6.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.8" +files = [ + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} + [[package]] name = "colorama" version = "0.4.6" @@ -120,6 +134,116 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "pydantic" +version = "2.6.2" +description = "Data validation using Python type hints" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic-2.6.2-py3-none-any.whl", hash = "sha256:37a5432e54b12fecaa1049c5195f3d860a10e01bdfd24f1840ef14bd0d3aeab3"}, + {file = "pydantic-2.6.2.tar.gz", hash = "sha256:a09be1c3d28f3abe37f8a78af58284b236a92ce520105ddc91a6d29ea1176ba7"}, +] + +[package.dependencies] +annotated-types = ">=0.4.0" +pydantic-core = "2.16.3" +typing-extensions = ">=4.6.1" + +[package.extras] +email = ["email-validator (>=2.0.0)"] + +[[package]] +name = "pydantic-core" +version = "2.16.3" +description = "" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pydantic_core-2.16.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:75b81e678d1c1ede0785c7f46690621e4c6e63ccd9192af1f0bd9d504bbb6bf4"}, + {file = "pydantic_core-2.16.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9c865a7ee6f93783bd5d781af5a4c43dadc37053a5b42f7d18dc019f8c9d2bd1"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:162e498303d2b1c036b957a1278fa0899d02b2842f1ff901b6395104c5554a45"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2f583bd01bbfbff4eaee0868e6fc607efdfcc2b03c1c766b06a707abbc856187"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b926dd38db1519ed3043a4de50214e0d600d404099c3392f098a7f9d75029ff8"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:716b542728d4c742353448765aa7cdaa519a7b82f9564130e2b3f6766018c9ec"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc4ad7f7ee1a13d9cb49d8198cd7d7e3aa93e425f371a68235f784e99741561f"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bd87f48924f360e5d1c5f770d6155ce0e7d83f7b4e10c2f9ec001c73cf475c99"}, + {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0df446663464884297c793874573549229f9eca73b59360878f382a0fc085979"}, + {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4df8a199d9f6afc5ae9a65f8f95ee52cae389a8c6b20163762bde0426275b7db"}, + {file = "pydantic_core-2.16.3-cp310-none-win32.whl", hash = "sha256:456855f57b413f077dff513a5a28ed838dbbb15082ba00f80750377eed23d132"}, + {file = "pydantic_core-2.16.3-cp310-none-win_amd64.whl", hash = "sha256:732da3243e1b8d3eab8c6ae23ae6a58548849d2e4a4e03a1924c8ddf71a387cb"}, + {file = "pydantic_core-2.16.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:519ae0312616026bf4cedc0fe459e982734f3ca82ee8c7246c19b650b60a5ee4"}, + {file = "pydantic_core-2.16.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b3992a322a5617ded0a9f23fd06dbc1e4bd7cf39bc4ccf344b10f80af58beacd"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d62da299c6ecb04df729e4b5c52dc0d53f4f8430b4492b93aa8de1f541c4aac"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2acca2be4bb2f2147ada8cac612f8a98fc09f41c89f87add7256ad27332c2fda"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1b662180108c55dfbf1280d865b2d116633d436cfc0bba82323554873967b340"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e7c6ed0dc9d8e65f24f5824291550139fe6f37fac03788d4580da0d33bc00c97"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1bb0827f56654b4437955555dc3aeeebeddc47c2d7ed575477f082622c49e"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e56f8186d6210ac7ece503193ec84104da7ceb98f68ce18c07282fcc2452e76f"}, + {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:936e5db01dd49476fa8f4383c259b8b1303d5dd5fb34c97de194560698cc2c5e"}, + {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:33809aebac276089b78db106ee692bdc9044710e26f24a9a2eaa35a0f9fa70ba"}, + {file = "pydantic_core-2.16.3-cp311-none-win32.whl", hash = "sha256:ded1c35f15c9dea16ead9bffcde9bb5c7c031bff076355dc58dcb1cb436c4721"}, + {file = "pydantic_core-2.16.3-cp311-none-win_amd64.whl", hash = "sha256:d89ca19cdd0dd5f31606a9329e309d4fcbb3df860960acec32630297d61820df"}, + {file = "pydantic_core-2.16.3-cp311-none-win_arm64.whl", hash = "sha256:6162f8d2dc27ba21027f261e4fa26f8bcb3cf9784b7f9499466a311ac284b5b9"}, + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0f56ae86b60ea987ae8bcd6654a887238fd53d1384f9b222ac457070b7ac4cff"}, + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9bd22a2a639e26171068f8ebb5400ce2c1bc7d17959f60a3b753ae13c632975"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4204e773b4b408062960e65468d5346bdfe139247ee5f1ca2a378983e11388a2"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f651dd19363c632f4abe3480a7c87a9773be27cfe1341aef06e8759599454120"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf09e615a0bf98d406657e0008e4a8701b11481840be7d31755dc9f97c44053"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e47755d8152c1ab5b55928ab422a76e2e7b22b5ed8e90a7d584268dd49e9c6b"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500960cb3a0543a724a81ba859da816e8cf01b0e6aaeedf2c3775d12ee49cade"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf6204fe865da605285c34cf1172879d0314ff267b1c35ff59de7154f35fdc2e"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d33dd21f572545649f90c38c227cc8631268ba25c460b5569abebdd0ec5974ca"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:49d5d58abd4b83fb8ce763be7794d09b2f50f10aa65c0f0c1696c677edeb7cbf"}, + {file = "pydantic_core-2.16.3-cp312-none-win32.whl", hash = "sha256:f53aace168a2a10582e570b7736cc5bef12cae9cf21775e3eafac597e8551fbe"}, + {file = "pydantic_core-2.16.3-cp312-none-win_amd64.whl", hash = "sha256:0d32576b1de5a30d9a97f300cc6a3f4694c428d956adbc7e6e2f9cad279e45ed"}, + {file = "pydantic_core-2.16.3-cp312-none-win_arm64.whl", hash = "sha256:ec08be75bb268473677edb83ba71e7e74b43c008e4a7b1907c6d57e940bf34b6"}, + {file = "pydantic_core-2.16.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:b1f6f5938d63c6139860f044e2538baeee6f0b251a1816e7adb6cbce106a1f01"}, + {file = "pydantic_core-2.16.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2a1ef6a36fdbf71538142ed604ad19b82f67b05749512e47f247a6ddd06afdc7"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:704d35ecc7e9c31d48926150afada60401c55efa3b46cd1ded5a01bdffaf1d48"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d937653a696465677ed583124b94a4b2d79f5e30b2c46115a68e482c6a591c8a"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9803edf8e29bd825f43481f19c37f50d2b01899448273b3a7758441b512acf8"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:72282ad4892a9fb2da25defeac8c2e84352c108705c972db82ab121d15f14e6d"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f752826b5b8361193df55afcdf8ca6a57d0232653494ba473630a83ba50d8c9"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4384a8f68ddb31a0b0c3deae88765f5868a1b9148939c3f4121233314ad5532c"}, + {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a4b2bf78342c40b3dc830880106f54328928ff03e357935ad26c7128bbd66ce8"}, + {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:13dcc4802961b5f843a9385fc821a0b0135e8c07fc3d9949fd49627c1a5e6ae5"}, + {file = "pydantic_core-2.16.3-cp38-none-win32.whl", hash = "sha256:e3e70c94a0c3841e6aa831edab1619ad5c511199be94d0c11ba75fe06efe107a"}, + {file = "pydantic_core-2.16.3-cp38-none-win_amd64.whl", hash = "sha256:ecdf6bf5f578615f2e985a5e1f6572e23aa632c4bd1dc67f8f406d445ac115ed"}, + {file = "pydantic_core-2.16.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bda1ee3e08252b8d41fa5537413ffdddd58fa73107171a126d3b9ff001b9b820"}, + {file = "pydantic_core-2.16.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:21b888c973e4f26b7a96491c0965a8a312e13be108022ee510248fe379a5fa23"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be0ec334369316fa73448cc8c982c01e5d2a81c95969d58b8f6e272884df0074"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5b6079cc452a7c53dd378c6f881ac528246b3ac9aae0f8eef98498a75657805"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ee8d5f878dccb6d499ba4d30d757111847b6849ae07acdd1205fffa1fc1253c"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7233d65d9d651242a68801159763d09e9ec96e8a158dbf118dc090cd77a104c9"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6119dc90483a5cb50a1306adb8d52c66e447da88ea44f323e0ae1a5fcb14256"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:578114bc803a4c1ff9946d977c221e4376620a46cf78da267d946397dc9514a8"}, + {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d8f99b147ff3fcf6b3cc60cb0c39ea443884d5559a30b1481e92495f2310ff2b"}, + {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4ac6b4ce1e7283d715c4b729d8f9dab9627586dafce81d9eaa009dd7f25dd972"}, + {file = "pydantic_core-2.16.3-cp39-none-win32.whl", hash = "sha256:e7774b570e61cb998490c5235740d475413a1f6de823169b4cf94e2fe9e9f6b2"}, + {file = "pydantic_core-2.16.3-cp39-none-win_amd64.whl", hash = "sha256:9091632a25b8b87b9a605ec0e61f241c456e9248bfdcf7abdf344fdb169c81cf"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:36fa178aacbc277bc6b62a2c3da95226520da4f4e9e206fdf076484363895d2c"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcca5d2bf65c6fb591fff92da03f94cd4f315972f97c21975398bd4bd046854a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a72fb9963cba4cd5793854fd12f4cfee731e86df140f59ff52a49b3552db241"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60cc1a081f80a2105a59385b92d82278b15d80ebb3adb200542ae165cd7d183"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cbcc558401de90a746d02ef330c528f2e668c83350f045833543cd57ecead1ad"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fee427241c2d9fb7192b658190f9f5fd6dfe41e02f3c1489d2ec1e6a5ab1e04a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f4cb85f693044e0f71f394ff76c98ddc1bc0953e48c061725e540396d5c8a2e1"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b29eeb887aa931c2fcef5aa515d9d176d25006794610c264ddc114c053bf96fe"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a425479ee40ff021f8216c9d07a6a3b54b31c8267c6e17aa88b70d7ebd0e5e5b"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5c5cbc703168d1b7a838668998308018a2718c2130595e8e190220238addc96f"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b6add4c0b39a513d323d3b93bc173dac663c27b99860dd5bf491b240d26137"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f76ee558751746d6a38f89d60b6228fa174e5172d143886af0f85aa306fd89"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:00ee1c97b5364b84cb0bd82e9bbf645d5e2871fb8c58059d158412fee2d33d8a"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:287073c66748f624be4cef893ef9174e3eb88fe0b8a78dc22e88eca4bc357ca6"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed25e1835c00a332cb10c683cd39da96a719ab1dfc08427d476bce41b92531fc"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:86b3d0033580bd6bbe07590152007275bd7af95f98eaa5bd36f3da219dcd93da"}, + {file = "pydantic_core-2.16.3.tar.gz", hash = "sha256:1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad"}, +] + +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" + [[package]] name = "pytest" version = "7.4.4" @@ -167,4 +291,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "e423beea4ece0c9d87e967ec99d7e91aa063843993572a169ed4a11a2bdfeeda" +content-hash = "e43de98e6e0aecd9a41bb3ae81751df75bb6121adf9608a0e1ae30b47cf18021" diff --git a/seed/pydantic/enum/pyproject.toml b/seed/pydantic/enum/pyproject.toml index b269377b1b9..9043ce15b39 100644 --- a/seed/pydantic/enum/pyproject.toml +++ b/seed/pydantic/enum/pyproject.toml @@ -10,6 +10,7 @@ packages = [ [tool.poetry.dependencies] python = "^3.8" +pydantic = ">= 1.9.2" [tool.poetry.dev-dependencies] mypy = "^1.8.0" diff --git a/seed/pydantic/enum/src/seed/enum/__init__.py b/seed/pydantic/enum/src/seed/enum/__init__.py index a4d342f0272..386934fa924 100644 --- a/seed/pydantic/enum/src/seed/enum/__init__.py +++ b/seed/pydantic/enum/src/seed/enum/__init__.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from .color import Color +from .color_or_operand import ColorOrOperand, ColorOrOperand_Color, ColorOrOperand_Operand from .operand import Operand -__all__ = ["Operand"] +__all__ = ["Color", "ColorOrOperand", "ColorOrOperand_Color", "ColorOrOperand_Operand", "Operand"] diff --git a/seed/pydantic/enum/src/seed/enum/color.py b/seed/pydantic/enum/src/seed/enum/color.py new file mode 100644 index 00000000000..60d5b8562f6 --- /dev/null +++ b/seed/pydantic/enum/src/seed/enum/color.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class Color(str, enum.Enum): + RED = "red" + BLUE = "blue" + + def visit(self, red: typing.Callable[[], T_Result], blue: typing.Callable[[], T_Result]) -> T_Result: + if self is Color.RED: + return red() + if self is Color.BLUE: + return blue() diff --git a/seed/pydantic/enum/src/seed/enum/color_or_operand.py b/seed/pydantic/enum/src/seed/enum/color_or_operand.py new file mode 100644 index 00000000000..ceff83690d6 --- /dev/null +++ b/seed/pydantic/enum/src/seed/enum/color_or_operand.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .color import Color +from .operand import Operand + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class ColorOrOperand_Color(pydantic.BaseModel): + type: typing.Literal["color"] + value: Color + + +class ColorOrOperand_Operand(pydantic.BaseModel): + type: typing.Literal["operand"] + value: Operand + + +ColorOrOperand = typing.Union[ColorOrOperand_Color, ColorOrOperand_Operand] diff --git a/seed/python-sdk/api-wide-base-path/src/seed/resources/service/client.py b/seed/python-sdk/api-wide-base-path/src/seed/resources/service/client.py index b917d394c37..b857a854649 100644 --- a/seed/python-sdk/api-wide-base-path/src/seed/resources/service/client.py +++ b/seed/python-sdk/api-wide-base-path/src/seed/resources/service/client.py @@ -36,7 +36,8 @@ def post( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"test/{path_param}/{service_param}/{endpoint_param}" + f"{self._client_wrapper.get_base_url()}/", + f"test/{jsonable_encoder(path_param)}/{jsonable_encoder(service_param)}/{jsonable_encoder(endpoint_param)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -90,7 +91,8 @@ async def post( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"test/{path_param}/{service_param}/{endpoint_param}" + f"{self._client_wrapper.get_base_url()}/", + f"test/{jsonable_encoder(path_param)}/{jsonable_encoder(service_param)}/{jsonable_encoder(endpoint_param)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/enum/.fernignore b/seed/python-sdk/enum/.fernignore new file mode 100644 index 00000000000..4fc131f4ac4 --- /dev/null +++ b/seed/python-sdk/enum/.fernignore @@ -0,0 +1 @@ +tests/test_json.py \ No newline at end of file diff --git a/seed/python-sdk/enum/poetry.lock b/seed/python-sdk/enum/poetry.lock index bdeefd84a9b..c8a61e9df27 100644 --- a/seed/python-sdk/enum/poetry.lock +++ b/seed/python-sdk/enum/poetry.lock @@ -236,18 +236,18 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.6.1" +version = "2.6.2" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, - {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, + {file = "pydantic-2.6.2-py3-none-any.whl", hash = "sha256:37a5432e54b12fecaa1049c5195f3d860a10e01bdfd24f1840ef14bd0d3aeab3"}, + {file = "pydantic-2.6.2.tar.gz", hash = "sha256:a09be1c3d28f3abe37f8a78af58284b236a92ce520105ddc91a6d29ea1176ba7"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.16.2" +pydantic-core = "2.16.3" typing-extensions = ">=4.6.1" [package.extras] @@ -255,90 +255,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.16.2" +version = "2.16.3" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, - {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, - {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, - {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, - {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, - {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, - {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, - {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, - {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, - {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, - {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, - {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, - {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, - {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, - {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, - {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, - {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, - {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, - {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, - {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, - {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, - {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, - {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, - {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, - {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, - {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, - {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, - {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, - {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, - {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, - {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, + {file = "pydantic_core-2.16.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:75b81e678d1c1ede0785c7f46690621e4c6e63ccd9192af1f0bd9d504bbb6bf4"}, + {file = "pydantic_core-2.16.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9c865a7ee6f93783bd5d781af5a4c43dadc37053a5b42f7d18dc019f8c9d2bd1"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:162e498303d2b1c036b957a1278fa0899d02b2842f1ff901b6395104c5554a45"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2f583bd01bbfbff4eaee0868e6fc607efdfcc2b03c1c766b06a707abbc856187"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b926dd38db1519ed3043a4de50214e0d600d404099c3392f098a7f9d75029ff8"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:716b542728d4c742353448765aa7cdaa519a7b82f9564130e2b3f6766018c9ec"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc4ad7f7ee1a13d9cb49d8198cd7d7e3aa93e425f371a68235f784e99741561f"}, + {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bd87f48924f360e5d1c5f770d6155ce0e7d83f7b4e10c2f9ec001c73cf475c99"}, + {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0df446663464884297c793874573549229f9eca73b59360878f382a0fc085979"}, + {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4df8a199d9f6afc5ae9a65f8f95ee52cae389a8c6b20163762bde0426275b7db"}, + {file = "pydantic_core-2.16.3-cp310-none-win32.whl", hash = "sha256:456855f57b413f077dff513a5a28ed838dbbb15082ba00f80750377eed23d132"}, + {file = "pydantic_core-2.16.3-cp310-none-win_amd64.whl", hash = "sha256:732da3243e1b8d3eab8c6ae23ae6a58548849d2e4a4e03a1924c8ddf71a387cb"}, + {file = "pydantic_core-2.16.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:519ae0312616026bf4cedc0fe459e982734f3ca82ee8c7246c19b650b60a5ee4"}, + {file = "pydantic_core-2.16.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b3992a322a5617ded0a9f23fd06dbc1e4bd7cf39bc4ccf344b10f80af58beacd"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d62da299c6ecb04df729e4b5c52dc0d53f4f8430b4492b93aa8de1f541c4aac"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2acca2be4bb2f2147ada8cac612f8a98fc09f41c89f87add7256ad27332c2fda"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1b662180108c55dfbf1280d865b2d116633d436cfc0bba82323554873967b340"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e7c6ed0dc9d8e65f24f5824291550139fe6f37fac03788d4580da0d33bc00c97"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1bb0827f56654b4437955555dc3aeeebeddc47c2d7ed575477f082622c49e"}, + {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e56f8186d6210ac7ece503193ec84104da7ceb98f68ce18c07282fcc2452e76f"}, + {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:936e5db01dd49476fa8f4383c259b8b1303d5dd5fb34c97de194560698cc2c5e"}, + {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:33809aebac276089b78db106ee692bdc9044710e26f24a9a2eaa35a0f9fa70ba"}, + {file = "pydantic_core-2.16.3-cp311-none-win32.whl", hash = "sha256:ded1c35f15c9dea16ead9bffcde9bb5c7c031bff076355dc58dcb1cb436c4721"}, + {file = "pydantic_core-2.16.3-cp311-none-win_amd64.whl", hash = "sha256:d89ca19cdd0dd5f31606a9329e309d4fcbb3df860960acec32630297d61820df"}, + {file = "pydantic_core-2.16.3-cp311-none-win_arm64.whl", hash = "sha256:6162f8d2dc27ba21027f261e4fa26f8bcb3cf9784b7f9499466a311ac284b5b9"}, + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0f56ae86b60ea987ae8bcd6654a887238fd53d1384f9b222ac457070b7ac4cff"}, + {file = "pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9bd22a2a639e26171068f8ebb5400ce2c1bc7d17959f60a3b753ae13c632975"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4204e773b4b408062960e65468d5346bdfe139247ee5f1ca2a378983e11388a2"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f651dd19363c632f4abe3480a7c87a9773be27cfe1341aef06e8759599454120"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf09e615a0bf98d406657e0008e4a8701b11481840be7d31755dc9f97c44053"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e47755d8152c1ab5b55928ab422a76e2e7b22b5ed8e90a7d584268dd49e9c6b"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500960cb3a0543a724a81ba859da816e8cf01b0e6aaeedf2c3775d12ee49cade"}, + {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf6204fe865da605285c34cf1172879d0314ff267b1c35ff59de7154f35fdc2e"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d33dd21f572545649f90c38c227cc8631268ba25c460b5569abebdd0ec5974ca"}, + {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:49d5d58abd4b83fb8ce763be7794d09b2f50f10aa65c0f0c1696c677edeb7cbf"}, + {file = "pydantic_core-2.16.3-cp312-none-win32.whl", hash = "sha256:f53aace168a2a10582e570b7736cc5bef12cae9cf21775e3eafac597e8551fbe"}, + {file = "pydantic_core-2.16.3-cp312-none-win_amd64.whl", hash = "sha256:0d32576b1de5a30d9a97f300cc6a3f4694c428d956adbc7e6e2f9cad279e45ed"}, + {file = "pydantic_core-2.16.3-cp312-none-win_arm64.whl", hash = "sha256:ec08be75bb268473677edb83ba71e7e74b43c008e4a7b1907c6d57e940bf34b6"}, + {file = "pydantic_core-2.16.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:b1f6f5938d63c6139860f044e2538baeee6f0b251a1816e7adb6cbce106a1f01"}, + {file = "pydantic_core-2.16.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2a1ef6a36fdbf71538142ed604ad19b82f67b05749512e47f247a6ddd06afdc7"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:704d35ecc7e9c31d48926150afada60401c55efa3b46cd1ded5a01bdffaf1d48"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d937653a696465677ed583124b94a4b2d79f5e30b2c46115a68e482c6a591c8a"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9803edf8e29bd825f43481f19c37f50d2b01899448273b3a7758441b512acf8"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:72282ad4892a9fb2da25defeac8c2e84352c108705c972db82ab121d15f14e6d"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f752826b5b8361193df55afcdf8ca6a57d0232653494ba473630a83ba50d8c9"}, + {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4384a8f68ddb31a0b0c3deae88765f5868a1b9148939c3f4121233314ad5532c"}, + {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a4b2bf78342c40b3dc830880106f54328928ff03e357935ad26c7128bbd66ce8"}, + {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:13dcc4802961b5f843a9385fc821a0b0135e8c07fc3d9949fd49627c1a5e6ae5"}, + {file = "pydantic_core-2.16.3-cp38-none-win32.whl", hash = "sha256:e3e70c94a0c3841e6aa831edab1619ad5c511199be94d0c11ba75fe06efe107a"}, + {file = "pydantic_core-2.16.3-cp38-none-win_amd64.whl", hash = "sha256:ecdf6bf5f578615f2e985a5e1f6572e23aa632c4bd1dc67f8f406d445ac115ed"}, + {file = "pydantic_core-2.16.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bda1ee3e08252b8d41fa5537413ffdddd58fa73107171a126d3b9ff001b9b820"}, + {file = "pydantic_core-2.16.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:21b888c973e4f26b7a96491c0965a8a312e13be108022ee510248fe379a5fa23"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be0ec334369316fa73448cc8c982c01e5d2a81c95969d58b8f6e272884df0074"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5b6079cc452a7c53dd378c6f881ac528246b3ac9aae0f8eef98498a75657805"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ee8d5f878dccb6d499ba4d30d757111847b6849ae07acdd1205fffa1fc1253c"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7233d65d9d651242a68801159763d09e9ec96e8a158dbf118dc090cd77a104c9"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6119dc90483a5cb50a1306adb8d52c66e447da88ea44f323e0ae1a5fcb14256"}, + {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:578114bc803a4c1ff9946d977c221e4376620a46cf78da267d946397dc9514a8"}, + {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d8f99b147ff3fcf6b3cc60cb0c39ea443884d5559a30b1481e92495f2310ff2b"}, + {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4ac6b4ce1e7283d715c4b729d8f9dab9627586dafce81d9eaa009dd7f25dd972"}, + {file = "pydantic_core-2.16.3-cp39-none-win32.whl", hash = "sha256:e7774b570e61cb998490c5235740d475413a1f6de823169b4cf94e2fe9e9f6b2"}, + {file = "pydantic_core-2.16.3-cp39-none-win_amd64.whl", hash = "sha256:9091632a25b8b87b9a605ec0e61f241c456e9248bfdcf7abdf344fdb169c81cf"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:36fa178aacbc277bc6b62a2c3da95226520da4f4e9e206fdf076484363895d2c"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcca5d2bf65c6fb591fff92da03f94cd4f315972f97c21975398bd4bd046854a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a72fb9963cba4cd5793854fd12f4cfee731e86df140f59ff52a49b3552db241"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60cc1a081f80a2105a59385b92d82278b15d80ebb3adb200542ae165cd7d183"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cbcc558401de90a746d02ef330c528f2e668c83350f045833543cd57ecead1ad"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fee427241c2d9fb7192b658190f9f5fd6dfe41e02f3c1489d2ec1e6a5ab1e04a"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f4cb85f693044e0f71f394ff76c98ddc1bc0953e48c061725e540396d5c8a2e1"}, + {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b29eeb887aa931c2fcef5aa515d9d176d25006794610c264ddc114c053bf96fe"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a425479ee40ff021f8216c9d07a6a3b54b31c8267c6e17aa88b70d7ebd0e5e5b"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5c5cbc703168d1b7a838668998308018a2718c2130595e8e190220238addc96f"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b6add4c0b39a513d323d3b93bc173dac663c27b99860dd5bf491b240d26137"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f76ee558751746d6a38f89d60b6228fa174e5172d143886af0f85aa306fd89"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:00ee1c97b5364b84cb0bd82e9bbf645d5e2871fb8c58059d158412fee2d33d8a"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:287073c66748f624be4cef893ef9174e3eb88fe0b8a78dc22e88eca4bc357ca6"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed25e1835c00a332cb10c683cd39da96a719ab1dfc08427d476bce41b92531fc"}, + {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:86b3d0033580bd6bbe07590152007275bd7af95f98eaa5bd36f3da219dcd93da"}, + {file = "pydantic_core-2.16.3.tar.gz", hash = "sha256:1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad"}, ] [package.dependencies] diff --git a/seed/python-sdk/enum/snippet.json b/seed/python-sdk/enum/snippet.json index 362afd1407a..9e0c15a73d2 100644 --- a/seed/python-sdk/enum/snippet.json +++ b/seed/python-sdk/enum/snippet.json @@ -16,7 +16,7 @@ }, { "id": { - "path": "/path/{operand}", + "path": "/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", "method": "POST" }, "snippet": { diff --git a/seed/python-sdk/enum/src/seed/__init__.py b/seed/python-sdk/enum/src/seed/__init__.py index 8e002ebe4c3..ef033731d74 100644 --- a/seed/python-sdk/enum/src/seed/__init__.py +++ b/seed/python-sdk/enum/src/seed/__init__.py @@ -1,6 +1,15 @@ # This file was auto-generated by Fern from our API Definition. -from .types import Operand +from .types import Color, ColorOrOperand, ColorOrOperand_Color, ColorOrOperand_Operand, Operand from .resources import inlined_request, path_param, query_param -__all__ = ["Operand", "inlined_request", "path_param", "query_param"] +__all__ = [ + "Color", + "ColorOrOperand", + "ColorOrOperand_Color", + "ColorOrOperand_Operand", + "Operand", + "inlined_request", + "path_param", + "query_param", +] diff --git a/seed/python-sdk/enum/src/seed/resources/inlined_request/client.py b/seed/python-sdk/enum/src/seed/resources/inlined_request/client.py index 6c5aa570da7..b28ef556f51 100644 --- a/seed/python-sdk/enum/src/seed/resources/inlined_request/client.py +++ b/seed/python-sdk/enum/src/seed/resources/inlined_request/client.py @@ -9,6 +9,7 @@ from ...core.jsonable_encoder import jsonable_encoder from ...core.remove_none_from_dict import remove_none_from_dict from ...core.request_options import RequestOptions +from ...types.color_or_operand import ColorOrOperand from ...types.operand import Operand # this is used as the default value for optional parameters @@ -20,11 +21,23 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def send( - self, *, operand: typing.Optional[Operand] = OMIT, request_options: typing.Optional[RequestOptions] = None + self, + *, + operand: Operand, + maybe_operand: typing.Optional[Operand] = OMIT, + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[Operand]. + - operand: Operand. + + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -34,9 +47,11 @@ def send( client = SeedEnum(base_url="https://yourhost.com/path/to/api", ) client.inlined_request.send(operand=Operand., ) """ - _request: typing.Dict[str, typing.Any] = {} - if operand is not OMIT: - _request["operand"] = operand.value if operand is not None else None + _request: typing.Dict[str, typing.Any] = {"operand": operand, "operandOrColor": operand_or_color} + if maybe_operand is not OMIT: + _request["maybeOperand"] = maybe_operand.value if maybe_operand is not None else None + if maybe_operand_or_color is not OMIT: + _request["maybeOperandOrColor"] = maybe_operand_or_color _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "inlined"), @@ -75,11 +90,23 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def send( - self, *, operand: typing.Optional[Operand] = OMIT, request_options: typing.Optional[RequestOptions] = None + self, + *, + operand: Operand, + maybe_operand: typing.Optional[Operand] = OMIT, + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand] = OMIT, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[Operand]. + - operand: Operand. + + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -89,9 +116,11 @@ async def send( client = AsyncSeedEnum(base_url="https://yourhost.com/path/to/api", ) await client.inlined_request.send(operand=Operand., ) """ - _request: typing.Dict[str, typing.Any] = {} - if operand is not OMIT: - _request["operand"] = operand.value if operand is not None else None + _request: typing.Dict[str, typing.Any] = {"operand": operand, "operandOrColor": operand_or_color} + if maybe_operand is not OMIT: + _request["maybeOperand"] = maybe_operand.value if maybe_operand is not None else None + if maybe_operand_or_color is not OMIT: + _request["maybeOperandOrColor"] = maybe_operand_or_color _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "inlined"), diff --git a/seed/python-sdk/enum/src/seed/resources/path_param/client.py b/seed/python-sdk/enum/src/seed/resources/path_param/client.py index 7f173cd8532..4f5e21433d3 100644 --- a/seed/python-sdk/enum/src/seed/resources/path_param/client.py +++ b/seed/python-sdk/enum/src/seed/resources/path_param/client.py @@ -9,6 +9,7 @@ from ...core.jsonable_encoder import jsonable_encoder from ...core.remove_none_from_dict import remove_none_from_dict from ...core.request_options import RequestOptions +from ...types.color_or_operand import ColorOrOperand from ...types.operand import Operand @@ -16,11 +17,25 @@ class PathParamClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def send(self, operand: Operand, *, request_options: typing.Optional[RequestOptions] = None) -> None: + def send( + self, + operand: Operand, + maybe_operand: typing.Optional[Operand], + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand], + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ Parameters: - operand: Operand. + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from seed import Operand @@ -31,7 +46,10 @@ def send(self, operand: Operand, *, request_options: typing.Optional[RequestOpti """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"path/{operand.value}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", + f"path/{jsonable_encoder(operand)}/{jsonable_encoder(maybe_operand)}/{jsonable_encoder(operand_or_color)}/{jsonable_encoder(maybe_operand_or_color)}", + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -63,11 +81,25 @@ class AsyncPathParamClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def send(self, operand: Operand, *, request_options: typing.Optional[RequestOptions] = None) -> None: + async def send( + self, + operand: Operand, + maybe_operand: typing.Optional[Operand], + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand], + *, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: """ Parameters: - operand: Operand. + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from seed import Operand @@ -78,7 +110,10 @@ async def send(self, operand: Operand, *, request_options: typing.Optional[Reque """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"path/{operand.value}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", + f"path/{jsonable_encoder(operand)}/{jsonable_encoder(maybe_operand)}/{jsonable_encoder(operand_or_color)}/{jsonable_encoder(maybe_operand_or_color)}", + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/enum/src/seed/resources/query_param/client.py b/seed/python-sdk/enum/src/seed/resources/query_param/client.py index c897e1e5196..373a5b2b6d0 100644 --- a/seed/python-sdk/enum/src/seed/resources/query_param/client.py +++ b/seed/python-sdk/enum/src/seed/resources/query_param/client.py @@ -9,6 +9,7 @@ from ...core.jsonable_encoder import jsonable_encoder from ...core.remove_none_from_dict import remove_none_from_dict from ...core.request_options import RequestOptions +from ...types.color_or_operand import ColorOrOperand from ...types.operand import Operand @@ -17,11 +18,23 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def send( - self, *, operand: typing.Optional[Operand] = None, request_options: typing.Optional[RequestOptions] = None + self, + *, + operand: Operand, + maybe_operand: typing.Optional[Operand] = None, + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[Operand]. + - operand: Operand. + + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -37,7 +50,10 @@ def send( params=jsonable_encoder( remove_none_from_dict( { - "operand": operand.value if operand is not None else None, + "operand": operand, + "maybeOperand": maybe_operand, + "operandOrColor": jsonable_encoder(operand_or_color), + "maybeOperandOrColor": jsonable_encoder(maybe_operand_or_color), **( request_options.get("additional_query_parameters", {}) if request_options is not None @@ -72,12 +88,21 @@ def send( def send_list( self, *, - operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]] = None, + operand: typing.Union[Operand, typing.Sequence[Operand]], + maybe_operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]] = None, + operand_or_color: typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]], + maybe_operand_or_color: typing.Optional[typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]]. + - operand: typing.Union[Operand, typing.Sequence[Operand]]. + + - maybe_operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]]. + + - operand_or_color: typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]. + + - maybe_operand_or_color: typing.Optional[typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ @@ -87,7 +112,10 @@ def send_list( params=jsonable_encoder( remove_none_from_dict( { - "operand": operand.value if operand is not None else None, + "operand": operand, + "maybeOperand": maybe_operand, + "operandOrColor": jsonable_encoder(operand_or_color), + "maybeOperandOrColor": jsonable_encoder(maybe_operand_or_color), **( request_options.get("additional_query_parameters", {}) if request_options is not None @@ -125,11 +153,23 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def send( - self, *, operand: typing.Optional[Operand] = None, request_options: typing.Optional[RequestOptions] = None + self, + *, + operand: Operand, + maybe_operand: typing.Optional[Operand] = None, + operand_or_color: ColorOrOperand, + maybe_operand_or_color: typing.Optional[ColorOrOperand] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[Operand]. + - operand: Operand. + + - maybe_operand: typing.Optional[Operand]. + + - operand_or_color: ColorOrOperand. + + - maybe_operand_or_color: typing.Optional[ColorOrOperand]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -145,7 +185,10 @@ async def send( params=jsonable_encoder( remove_none_from_dict( { - "operand": operand.value if operand is not None else None, + "operand": operand, + "maybeOperand": maybe_operand, + "operandOrColor": jsonable_encoder(operand_or_color), + "maybeOperandOrColor": jsonable_encoder(maybe_operand_or_color), **( request_options.get("additional_query_parameters", {}) if request_options is not None @@ -180,12 +223,21 @@ async def send( async def send_list( self, *, - operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]] = None, + operand: typing.Union[Operand, typing.Sequence[Operand]], + maybe_operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]] = None, + operand_or_color: typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]], + maybe_operand_or_color: typing.Optional[typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]] = None, request_options: typing.Optional[RequestOptions] = None, ) -> None: """ Parameters: - - operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]]. + - operand: typing.Union[Operand, typing.Sequence[Operand]]. + + - maybe_operand: typing.Optional[typing.Union[Operand, typing.Sequence[Operand]]]. + + - operand_or_color: typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]. + + - maybe_operand_or_color: typing.Optional[typing.Union[ColorOrOperand, typing.Sequence[ColorOrOperand]]]. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ @@ -195,7 +247,10 @@ async def send_list( params=jsonable_encoder( remove_none_from_dict( { - "operand": operand.value if operand is not None else None, + "operand": operand, + "maybeOperand": maybe_operand, + "operandOrColor": jsonable_encoder(operand_or_color), + "maybeOperandOrColor": jsonable_encoder(maybe_operand_or_color), **( request_options.get("additional_query_parameters", {}) if request_options is not None diff --git a/seed/python-sdk/enum/src/seed/types/__init__.py b/seed/python-sdk/enum/src/seed/types/__init__.py index a4d342f0272..386934fa924 100644 --- a/seed/python-sdk/enum/src/seed/types/__init__.py +++ b/seed/python-sdk/enum/src/seed/types/__init__.py @@ -1,5 +1,7 @@ # This file was auto-generated by Fern from our API Definition. +from .color import Color +from .color_or_operand import ColorOrOperand, ColorOrOperand_Color, ColorOrOperand_Operand from .operand import Operand -__all__ = ["Operand"] +__all__ = ["Color", "ColorOrOperand", "ColorOrOperand_Color", "ColorOrOperand_Operand", "Operand"] diff --git a/seed/python-sdk/enum/src/seed/types/color.py b/seed/python-sdk/enum/src/seed/types/color.py new file mode 100644 index 00000000000..60d5b8562f6 --- /dev/null +++ b/seed/python-sdk/enum/src/seed/types/color.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class Color(str, enum.Enum): + RED = "red" + BLUE = "blue" + + def visit(self, red: typing.Callable[[], T_Result], blue: typing.Callable[[], T_Result]) -> T_Result: + if self is Color.RED: + return red() + if self is Color.BLUE: + return blue() diff --git a/seed/python-sdk/enum/src/seed/types/color_or_operand.py b/seed/python-sdk/enum/src/seed/types/color_or_operand.py new file mode 100644 index 00000000000..7de6ed32124 --- /dev/null +++ b/seed/python-sdk/enum/src/seed/types/color_or_operand.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +from .color import Color +from .operand import Operand + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class ColorOrOperand_Color(pydantic.BaseModel): + type: typing.Literal["color"] + value: Color + + class Config: + frozen = True + smart_union = True + + +class ColorOrOperand_Operand(pydantic.BaseModel): + type: typing.Literal["operand"] + value: Operand + + class Config: + frozen = True + smart_union = True + + +ColorOrOperand = typing.Union[ColorOrOperand_Color, ColorOrOperand_Operand] diff --git a/seed/python-sdk/enum/tests/test_json.py b/seed/python-sdk/enum/tests/test_json.py new file mode 100644 index 00000000000..5c88bda29a1 --- /dev/null +++ b/seed/python-sdk/enum/tests/test_json.py @@ -0,0 +1,38 @@ +from seed.types.operand import Operand +from src.seed.client import SeedEnum + +def test_json() -> None: + client = SeedEnum(base_url="https://yourhost.com/path/to/api") + + try: + print("---- parameters ----") + client.path_param.send( + operand=Operand.EQUAL_TO, + maybe_operand=Operand.EQUAL_TO, + operand_or_color=Operand.EQUAL_TO, + maybe_operand_or_color=None + ) + except: + pass + + try: + print("---- request ----") + client.inlined_request.send( + operand=Operand.EQUAL_TO, + maybe_operand=Operand.EQUAL_TO, + operand_or_color=Operand.EQUAL_TO, + maybe_operand_or_color=None + ) + except: + pass + + try: + print("---- query ----") + client.query_param.send( + operand=Operand.EQUAL_TO, + maybe_operand=Operand.EQUAL_TO, + operand_or_color=Operand.EQUAL_TO, + maybe_operand_or_color=None + ) + except: + pass \ No newline at end of file diff --git a/seed/python-sdk/examples/src/seed/resources/file/resources/notification/resources/service/client.py b/seed/python-sdk/examples/src/seed/resources/file/resources/notification/resources/service/client.py index 1599b0adfa8..9a5c7215537 100644 --- a/seed/python-sdk/examples/src/seed/resources/file/resources/notification/resources/service/client.py +++ b/seed/python-sdk/examples/src/seed/resources/file/resources/notification/resources/service/client.py @@ -43,7 +43,9 @@ def get_exception( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/notification/{notification_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"file/notification/{jsonable_encoder(notification_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -94,7 +96,9 @@ async def get_exception( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/notification/{notification_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"file/notification/{jsonable_encoder(notification_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/examples/src/seed/resources/file/resources/service/client.py b/seed/python-sdk/examples/src/seed/resources/file/resources/service/client.py index 70ae144ac53..d2f8e2928b1 100644 --- a/seed/python-sdk/examples/src/seed/resources/file/resources/service/client.py +++ b/seed/python-sdk/examples/src/seed/resources/file/resources/service/client.py @@ -49,7 +49,7 @@ def get_file( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/{filename}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/{jsonable_encoder(filename)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -108,7 +108,7 @@ async def get_file( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/{filename}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"file/{jsonable_encoder(filename)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/examples/src/seed/resources/health/resources/service/client.py b/seed/python-sdk/examples/src/seed/resources/health/resources/service/client.py index d19e7244717..0b67bc64997 100644 --- a/seed/python-sdk/examples/src/seed/resources/health/resources/service/client.py +++ b/seed/python-sdk/examples/src/seed/resources/health/resources/service/client.py @@ -42,7 +42,7 @@ def check(self, id: str, *, request_options: typing.Optional[RequestOptions] = N """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"check/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"check/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -135,7 +135,7 @@ async def check(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"check/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"check/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/examples/src/seed/resources/service/client.py b/seed/python-sdk/examples/src/seed/resources/service/client.py index 6b59313b731..96ead812492 100644 --- a/seed/python-sdk/examples/src/seed/resources/service/client.py +++ b/seed/python-sdk/examples/src/seed/resources/service/client.py @@ -46,7 +46,7 @@ def get_movie(self, movie_id: MovieId, *, request_options: typing.Optional[Reque """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movie/{movie_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movie/{jsonable_encoder(movie_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -221,7 +221,7 @@ async def get_movie(self, movie_id: MovieId, *, request_options: typing.Optional """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movie/{movie_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movie/{jsonable_encoder(movie_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/http_methods/client.py index 7217f3024d6..84c2f7e965c 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/params/client.py index 4d527ca9e02..35138ee6efd 100644 --- a/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/extra_dependencies/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/http_methods/client.py index 8fcd7bda435..7507abe99a1 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/params/client.py index 9de9a4358d0..651b19f71c9 100644 --- a/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/five-second-timeout/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/http_methods/client.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/http_methods/client.py index 93639b57f05..f3846279c1a 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/http_methods/client.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/params/client.py b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/params/client.py index e08160f05a9..aaaf9d4aaef 100644 --- a/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/params/client.py +++ b/seed/python-sdk/exhaustive/improved_imports/src/seed/endpoints/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/http_methods/client.py index 125a5176fb8..26792db329b 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/params/client.py index 107a32d8552..341eb36b9ce 100644 --- a/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/infinite-timeout/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/http_methods/client.py index 7217f3024d6..84c2f7e965c 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/params/client.py index 4d527ca9e02..35138ee6efd 100644 --- a/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/no-custom-config/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/http_methods/client.py index 7217f3024d6..84c2f7e965c 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/params/client.py index 4d527ca9e02..35138ee6efd 100644 --- a/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/pydantic-v1/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/http_methods/client.py b/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/http_methods/client.py index 7217f3024d6..84c2f7e965c 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/http_methods/client.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/http_methods/client.py @@ -34,7 +34,7 @@ def test_get(self, id: str, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -112,7 +112,7 @@ def test_put( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +155,7 @@ def test_patch( """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -194,7 +194,7 @@ def test_delete(self, id: str, *, request_options: typing.Optional[RequestOption """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -232,7 +232,7 @@ async def test_get(self, id: str, *, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -310,7 +310,7 @@ async def test_put( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -353,7 +353,7 @@ async def test_patch( """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -392,7 +392,7 @@ async def test_delete(self, id: str, *, request_options: typing.Optional[Request """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"http-methods/{jsonable_encoder(id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/params/client.py b/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/params/client.py index 4d527ca9e02..35138ee6efd 100644 --- a/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/params/client.py +++ b/seed/python-sdk/exhaustive/union-utils/src/seed/resources/endpoints/resources/params/client.py @@ -34,7 +34,7 @@ def get_with_path(self, param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -175,7 +175,7 @@ def get_with_path_and_query( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -223,7 +223,7 @@ def modify_with_path( """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -264,7 +264,7 @@ async def get_with_path(self, param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,7 +405,7 @@ async def get_with_path_and_query( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( remove_none_from_dict( { @@ -453,7 +453,7 @@ async def modify_with_path( """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"params/path/{jsonable_encoder(param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/idempotency-headers/src/seed/resources/payment/client.py b/seed/python-sdk/idempotency-headers/src/seed/resources/payment/client.py index e44f357d851..ec3320be3cd 100644 --- a/seed/python-sdk/idempotency-headers/src/seed/resources/payment/client.py +++ b/seed/python-sdk/idempotency-headers/src/seed/resources/payment/client.py @@ -89,7 +89,7 @@ def delete(self, payment_id: str, *, request_options: typing.Optional[RequestOpt """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"payment/{payment_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"payment/{jsonable_encoder(payment_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,7 +182,7 @@ async def delete(self, payment_id: str, *, request_options: typing.Optional[Requ """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"payment/{payment_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"payment/{jsonable_encoder(payment_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/imdb/src/seed/resources/imdb/client.py b/seed/python-sdk/imdb/src/seed/resources/imdb/client.py index 37e57bde8e1..da06781d3bc 100644 --- a/seed/python-sdk/imdb/src/seed/resources/imdb/client.py +++ b/seed/python-sdk/imdb/src/seed/resources/imdb/client.py @@ -79,7 +79,7 @@ def get_movie(self, movie_id: MovieId, *, request_options: typing.Optional[Reque """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movies/{movie_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movies/{jsonable_encoder(movie_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -162,7 +162,7 @@ async def get_movie(self, movie_id: MovieId, *, request_options: typing.Optional """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movies/{movie_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"movies/{jsonable_encoder(movie_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/package-yml/src/seed/client.py b/seed/python-sdk/package-yml/src/seed/client.py index 5e16ef932ae..a2e11416ca9 100644 --- a/seed/python-sdk/package-yml/src/seed/client.py +++ b/seed/python-sdk/package-yml/src/seed/client.py @@ -69,7 +69,7 @@ def echo(self, id: str, *, request: str, request_options: typing.Optional[Reques """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{id}/"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(id)}/"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -146,7 +146,7 @@ async def echo(self, id: str, *, request: str, request_options: typing.Optional[ """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{id}/"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(id)}/"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/package-yml/src/seed/resources/service/client.py b/seed/python-sdk/package-yml/src/seed/resources/service/client.py index 368488a4af8..ab28b1a3353 100644 --- a/seed/python-sdk/package-yml/src/seed/resources/service/client.py +++ b/seed/python-sdk/package-yml/src/seed/resources/service/client.py @@ -36,7 +36,9 @@ def nop(self, id: str, nested_id: str, *, request_options: typing.Optional[Reque """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{id}//{nested_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(id)}//{jsonable_encoder(nested_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -86,7 +88,9 @@ async def nop(self, id: str, nested_id: str, *, request_options: typing.Optional """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{id}//{nested_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(id)}//{jsonable_encoder(nested_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/trace/src/seed/resources/admin/client.py b/seed/python-sdk/trace/src/seed/resources/admin/client.py index f327b42ec70..a4da9f753c0 100644 --- a/seed/python-sdk/trace/src/seed/resources/admin/client.py +++ b/seed/python-sdk/trace/src/seed/resources/admin/client.py @@ -46,7 +46,8 @@ def update_test_submission_status( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-test-submission-status/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-test-submission-status/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -95,7 +96,8 @@ def send_test_submission_update( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-test-submission-status-v2/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-test-submission-status-v2/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -144,7 +146,8 @@ def update_workspace_submission_status( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-submission-status/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-submission-status/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -193,7 +196,8 @@ def send_workspace_submission_update( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-submission-status-v2/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-submission-status-v2/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -249,7 +253,7 @@ def store_traced_test_case( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"admin/store-test-trace/submission/{submission_id}/testCase/{test_case_id}", + f"admin/store-test-trace/submission/{jsonable_encoder(submission_id)}/testCase/{jsonable_encoder(test_case_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -302,7 +306,7 @@ def store_traced_test_case_v_2( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"admin/store-test-trace-v2/submission/{submission_id}/testCase/{test_case_id}", + f"admin/store-test-trace-v2/submission/{jsonable_encoder(submission_id)}/testCase/{jsonable_encoder(test_case_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -354,7 +358,8 @@ def store_traced_workspace( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-trace/submission/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-trace/submission/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -403,7 +408,8 @@ def store_traced_workspace_v_2( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-trace-v2/submission/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-trace-v2/submission/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -457,7 +463,8 @@ async def update_test_submission_status( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-test-submission-status/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-test-submission-status/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -506,7 +513,8 @@ async def send_test_submission_update( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-test-submission-status-v2/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-test-submission-status-v2/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -555,7 +563,8 @@ async def update_workspace_submission_status( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-submission-status/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-submission-status/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -604,7 +613,8 @@ async def send_workspace_submission_update( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-submission-status-v2/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-submission-status-v2/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -660,7 +670,7 @@ async def store_traced_test_case( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"admin/store-test-trace/submission/{submission_id}/testCase/{test_case_id}", + f"admin/store-test-trace/submission/{jsonable_encoder(submission_id)}/testCase/{jsonable_encoder(test_case_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -713,7 +723,7 @@ async def store_traced_test_case_v_2( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"admin/store-test-trace-v2/submission/{submission_id}/testCase/{test_case_id}", + f"admin/store-test-trace-v2/submission/{jsonable_encoder(submission_id)}/testCase/{jsonable_encoder(test_case_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -765,7 +775,8 @@ async def store_traced_workspace( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-trace/submission/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-trace/submission/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -814,7 +825,8 @@ async def store_traced_workspace_v_2( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"admin/store-workspace-trace-v2/submission/{submission_id}" + f"{self._client_wrapper.get_base_url()}/", + f"admin/store-workspace-trace-v2/submission/{jsonable_encoder(submission_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/trace/src/seed/resources/playlist/client.py b/seed/python-sdk/trace/src/seed/resources/playlist/client.py index e2e011b33c4..109dd20a05c 100644 --- a/seed/python-sdk/trace/src/seed/resources/playlist/client.py +++ b/seed/python-sdk/trace/src/seed/resources/playlist/client.py @@ -57,7 +57,9 @@ def create_playlist( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/create"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{jsonable_encoder(service_param)}/create" + ), params=jsonable_encoder( remove_none_from_dict( { @@ -130,7 +132,9 @@ def get_playlists( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/all"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{jsonable_encoder(service_param)}/all" + ), params=jsonable_encoder( remove_none_from_dict( { @@ -183,7 +187,8 @@ def get_playlist( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -238,7 +243,8 @@ def update_playlist( _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -290,7 +296,8 @@ def delete_playlist( _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -345,7 +352,9 @@ async def create_playlist( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/create"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{jsonable_encoder(service_param)}/create" + ), params=jsonable_encoder( remove_none_from_dict( { @@ -418,7 +427,9 @@ async def get_playlists( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/all"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{jsonable_encoder(service_param)}/all" + ), params=jsonable_encoder( remove_none_from_dict( { @@ -471,7 +482,8 @@ async def get_playlist( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -526,7 +538,8 @@ async def update_playlist( _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -578,7 +591,8 @@ async def delete_playlist( _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"v2/playlist/{service_param}/{playlist_id}" + f"{self._client_wrapper.get_base_url()}/", + f"v2/playlist/{jsonable_encoder(service_param)}/{jsonable_encoder(playlist_id)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/trace/src/seed/resources/problem/client.py b/seed/python-sdk/trace/src/seed/resources/problem/client.py index b73bdb5f16c..648ef12175d 100644 --- a/seed/python-sdk/trace/src/seed/resources/problem/client.py +++ b/seed/python-sdk/trace/src/seed/resources/problem/client.py @@ -92,7 +92,9 @@ def update_problem( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problem-crud/update/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problem-crud/update/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -133,7 +135,9 @@ def delete_problem(self, problem_id: ProblemId, *, request_options: typing.Optio """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problem-crud/delete/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problem-crud/delete/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -281,7 +285,9 @@ async def update_problem( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problem-crud/update/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problem-crud/update/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -324,7 +330,9 @@ async def delete_problem( """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problem-crud/delete/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problem-crud/delete/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/trace/src/seed/resources/submission/client.py b/seed/python-sdk/trace/src/seed/resources/submission/client.py index daa8fd3d396..8f6bfb4d911 100644 --- a/seed/python-sdk/trace/src/seed/resources/submission/client.py +++ b/seed/python-sdk/trace/src/seed/resources/submission/client.py @@ -37,7 +37,7 @@ def create_execution_session( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"sessions/create-session/{language.value}" + f"{self._client_wrapper.get_base_url()}/", f"sessions/create-session/{jsonable_encoder(language)}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -78,7 +78,7 @@ def get_execution_session( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/{session_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/{jsonable_encoder(session_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -115,7 +115,9 @@ def stop_execution_session( """ _response = self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/stop/{session_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"sessions/stop/{jsonable_encoder(session_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -191,7 +193,7 @@ async def create_execution_session( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"sessions/create-session/{language.value}" + f"{self._client_wrapper.get_base_url()}/", f"sessions/create-session/{jsonable_encoder(language)}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -232,7 +234,7 @@ async def get_execution_session( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/{session_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/{jsonable_encoder(session_id)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -269,7 +271,9 @@ async def stop_execution_session( """ _response = await self._client_wrapper.httpx_client.request( "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"sessions/stop/{session_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"sessions/stop/{jsonable_encoder(session_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/python-sdk/trace/src/seed/resources/sysprop/client.py b/seed/python-sdk/trace/src/seed/resources/sysprop/client.py index f7a4b7d7ab3..fb5c3a8d46c 100644 --- a/seed/python-sdk/trace/src/seed/resources/sysprop/client.py +++ b/seed/python-sdk/trace/src/seed/resources/sysprop/client.py @@ -36,7 +36,7 @@ def set_num_warm_instances( "PUT", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"sysprop/num-warm-instances/{language.value}/{num_warm_instances}", + f"sysprop/num-warm-instances/{jsonable_encoder(language)}/{jsonable_encoder(num_warm_instances)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -117,7 +117,7 @@ async def set_num_warm_instances( "PUT", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"sysprop/num-warm-instances/{language.value}/{num_warm_instances}", + f"sysprop/num-warm-instances/{jsonable_encoder(language)}/{jsonable_encoder(num_warm_instances)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/trace/src/seed/resources/v_2/resources/problem/client.py b/seed/python-sdk/trace/src/seed/resources/v_2/resources/problem/client.py index 80c84d50084..5abd4182633 100644 --- a/seed/python-sdk/trace/src/seed/resources/v_2/resources/problem/client.py +++ b/seed/python-sdk/trace/src/seed/resources/v_2/resources/problem/client.py @@ -104,7 +104,9 @@ def get_latest_problem( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -145,7 +147,7 @@ def get_problem_version( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"problems-v2/problem-info/{problem_id}/version/{problem_version}", + f"problems-v2/problem-info/{jsonable_encoder(problem_id)}/version/{jsonable_encoder(problem_version)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -258,7 +260,9 @@ async def get_latest_problem( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -299,7 +303,7 @@ async def get_problem_version( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"problems-v2/problem-info/{problem_id}/version/{problem_version}", + f"problems-v2/problem-info/{jsonable_encoder(problem_id)}/version/{jsonable_encoder(problem_version)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/trace/src/seed/resources/v_2/resources/v_3/resources/problem/client.py b/seed/python-sdk/trace/src/seed/resources/v_2/resources/v_3/resources/problem/client.py index 9c5cc976b70..473ef382bf1 100644 --- a/seed/python-sdk/trace/src/seed/resources/v_2/resources/v_3/resources/problem/client.py +++ b/seed/python-sdk/trace/src/seed/resources/v_2/resources/v_3/resources/problem/client.py @@ -104,7 +104,9 @@ def get_latest_problem( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -145,7 +147,7 @@ def get_problem_version( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"problems-v2/problem-info/{problem_id}/version/{problem_version}", + f"problems-v2/problem-info/{jsonable_encoder(problem_id)}/version/{jsonable_encoder(problem_version)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -258,7 +260,9 @@ async def get_latest_problem( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{problem_id}"), + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"problems-v2/problem-info/{jsonable_encoder(problem_id)}" + ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -299,7 +303,7 @@ async def get_problem_version( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"problems-v2/problem-info/{problem_id}/version/{problem_version}", + f"problems-v2/problem-info/{jsonable_encoder(problem_id)}/version/{jsonable_encoder(problem_version)}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/seed/python-sdk/variables/src/seed/resources/service/client.py b/seed/python-sdk/variables/src/seed/resources/service/client.py index b99ec838f42..0c584fbb9b3 100644 --- a/seed/python-sdk/variables/src/seed/resources/service/client.py +++ b/seed/python-sdk/variables/src/seed/resources/service/client.py @@ -24,7 +24,7 @@ def post(self, endpoint_param: str, *, request_options: typing.Optional[RequestO """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{endpoint_param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(endpoint_param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -65,7 +65,7 @@ async def post(self, endpoint_param: str, *, request_options: typing.Optional[Re """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{endpoint_param}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"{jsonable_encoder(endpoint_param)}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/seed/ruby-model/enum/lib/seed_enum_client.rb b/seed/ruby-model/enum/lib/seed_enum_client.rb index f257522c215..e55d447e905 100644 --- a/seed/ruby-model/enum/lib/seed_enum_client.rb +++ b/seed/ruby-model/enum/lib/seed_enum_client.rb @@ -1,3 +1,5 @@ # frozen_string_literal: true require_relative "seed_enum_client/types/operand" +require_relative "seed_enum_client/types/color" +require_relative "seed_enum_client/types/color_or_operand" diff --git a/seed/ruby-model/enum/lib/seed_enum_client/types/color.rb b/seed/ruby-model/enum/lib/seed_enum_client/types/color.rb new file mode 100644 index 00000000000..0251616ac40 --- /dev/null +++ b/seed/ruby-model/enum/lib/seed_enum_client/types/color.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +module SeedEnumClient + class Color + RED = "red" + BLUE = "blue" + end +end diff --git a/seed/ruby-model/enum/lib/seed_enum_client/types/color_or_operand.rb b/seed/ruby-model/enum/lib/seed_enum_client/types/color_or_operand.rb new file mode 100644 index 00000000000..1b5bb047524 --- /dev/null +++ b/seed/ruby-model/enum/lib/seed_enum_client/types/color_or_operand.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +require "json" +require_relative "color" +require_relative "operand" + +module SeedEnumClient + class ColorOrOperand + attr_reader :member, :discriminant + + private_class_method :new + alias kind_of? is_a? + # @param member [Object] + # @param discriminant [String] + # @return [ColorOrOperand] + def initialize(member:, discriminant:) + # @type [Object] + @member = member + # @type [String] + @discriminant = discriminant + end + + # Deserialize a JSON object to an instance of ColorOrOperand + # + # @param json_object [JSON] + # @return [ColorOrOperand] + def self.from_json(json_object:) + struct = JSON.parse(json_object, object_class: OpenStruct) + member = case struct.type + when "color" + json_object.value + when "operand" + json_object.value + else + json_object + end + new(member: member, discriminant: struct.type) + end + + # For Union Types, to_json functionality is delegated to the wrapped member. + # + # @return [JSON] + def to_json(*_args) + case @discriminant + when "color" + when "operand" + end + { "type": @discriminant, "value": @member }.to_json + @member.to_json + end + + # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions. + # + # @param obj [Object] + # @return [Void] + def self.validate_raw(obj:) + case obj.type + when "color" + obj.is_a?(Color) != false || raise("Passed value for field obj is not the expected type, validation failed.") + when "operand" + obj.is_a?(Operand) != false || raise("Passed value for field obj is not the expected type, validation failed.") + else + raise("Passed value matched no type within the union, validation failed.") + end + end + + # For Union Types, is_a? functionality is delegated to the wrapped member. + # + # @param obj [Object] + # @return [Boolean] + def is_a?(obj) + @member.is_a?(obj) + end + + # @param member [Color] + # @return [ColorOrOperand] + def self.color(member:) + new(member: member, discriminant: "color") + end + + # @param member [Operand] + # @return [ColorOrOperand] + def self.operand(member:) + new(member: member, discriminant: "operand") + end + end +end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb index 78d6834e2b1..81816cf66a5 100644 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/inlined_request/client.rb @@ -2,6 +2,7 @@ require_relative "../../requests" require_relative "../types/operand" +require_relative "../types/color_or_operand" require "async" module SeedEnumClient @@ -16,13 +17,22 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] + # @param operand_or_color [ColorOrOperand] + # @param maybe_operand_or_color [ColorOrOperand] # @param request_options [RequestOptions] # @return [Void] - def send(operand: nil, request_options: nil) + def send(operand:, operand_or_color:, maybe_operand: nil, maybe_operand_or_color: nil, request_options: nil) @request_client.conn.post("/inlined") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.body = { **(request_options&.additional_body_parameters || {}), operand: operand }.compact + req.body = { + **(request_options&.additional_body_parameters || {}), + operand: operand, + maybeOperand: maybe_operand, + operandOrColor: operand_or_color, + maybeOperandOrColor: maybe_operand_or_color + }.compact end end end @@ -38,14 +48,23 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] + # @param operand_or_color [ColorOrOperand] + # @param maybe_operand_or_color [ColorOrOperand] # @param request_options [RequestOptions] # @return [Void] - def send(operand: nil, request_options: nil) + def send(operand:, operand_or_color:, maybe_operand: nil, maybe_operand_or_color: nil, request_options: nil) Async do @request_client.conn.post("/inlined") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.body = { **(request_options&.additional_body_parameters || {}), operand: operand }.compact + req.body = { + **(request_options&.additional_body_parameters || {}), + operand: operand, + maybeOperand: maybe_operand, + operandOrColor: operand_or_color, + maybeOperandOrColor: maybe_operand_or_color + }.compact end end end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb index feccb4b9508..303df6a9648 100644 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/path_param/client.rb @@ -2,6 +2,7 @@ require_relative "../../requests" require_relative "../types/operand" +require_relative "../types/color_or_operand" require "async" module SeedEnumClient @@ -16,10 +17,13 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] + # @param operand_or_color [ColorOrOperand] + # @param maybe_operand_or_color [ColorOrOperand] # @param request_options [RequestOptions] # @return [Void] - def send(operand:, request_options: nil) - @request_client.conn.post("/path/#{operand}") do |req| + def send(operand:, operand_or_color:, maybe_operand: nil, maybe_operand_or_color: nil, request_options: nil) + @request_client.conn.post("/path/#{operand}/#{maybe_operand}/#{operand_or_color}/#{maybe_operand_or_color}") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact end @@ -37,11 +41,14 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] + # @param operand_or_color [ColorOrOperand] + # @param maybe_operand_or_color [ColorOrOperand] # @param request_options [RequestOptions] # @return [Void] - def send(operand:, request_options: nil) + def send(operand:, operand_or_color:, maybe_operand: nil, maybe_operand_or_color: nil, request_options: nil) Async do - @request_client.conn.post("/path/#{operand}") do |req| + @request_client.conn.post("/path/#{operand}/#{maybe_operand}/#{operand_or_color}/#{maybe_operand_or_color}") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb index 236d999b8e0..88ee955d901 100644 --- a/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/query_param/client.rb @@ -16,24 +16,34 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] # @param request_options [RequestOptions] # @return [Void] - def send(operand: nil, request_options: nil) + def send(operand:, maybe_operand: nil, request_options: nil) @request_client.conn.post("/query") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.params = { **(request_options&.additional_query_parameters || {}), "operand": operand }.compact + req.params = { + **(request_options&.additional_query_parameters || {}), + "operand": operand, + "maybeOperand": maybe_operand + }.compact end end # @param operand [Operand] + # @param maybe_operand [Operand] # @param request_options [RequestOptions] # @return [Void] - def send_list(operand: nil, request_options: nil) + def send_list(operand:, maybe_operand: nil, request_options: nil) @request_client.conn.post("/query-list") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.params = { **(request_options&.additional_query_parameters || {}), "operand": operand }.compact + req.params = { + **(request_options&.additional_query_parameters || {}), + "operand": operand, + "maybeOperand": maybe_operand + }.compact end end end @@ -49,27 +59,37 @@ def initialize(request_client:) end # @param operand [Operand] + # @param maybe_operand [Operand] # @param request_options [RequestOptions] # @return [Void] - def send(operand: nil, request_options: nil) + def send(operand:, maybe_operand: nil, request_options: nil) Async do @request_client.conn.post("/query") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.params = { **(request_options&.additional_query_parameters || {}), "operand": operand }.compact + req.params = { + **(request_options&.additional_query_parameters || {}), + "operand": operand, + "maybeOperand": maybe_operand + }.compact end end end # @param operand [Operand] + # @param maybe_operand [Operand] # @param request_options [RequestOptions] # @return [Void] - def send_list(operand: nil, request_options: nil) + def send_list(operand:, maybe_operand: nil, request_options: nil) Async do @request_client.conn.post("/query-list") do |req| req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil? req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact - req.params = { **(request_options&.additional_query_parameters || {}), "operand": operand }.compact + req.params = { + **(request_options&.additional_query_parameters || {}), + "operand": operand, + "maybeOperand": maybe_operand + }.compact end end end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/types/color.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/types/color.rb new file mode 100644 index 00000000000..0251616ac40 --- /dev/null +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/types/color.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true + +module SeedEnumClient + class Color + RED = "red" + BLUE = "blue" + end +end diff --git a/seed/ruby-sdk/enum/lib/seed_enum_client/types/color_or_operand.rb b/seed/ruby-sdk/enum/lib/seed_enum_client/types/color_or_operand.rb new file mode 100644 index 00000000000..1b5bb047524 --- /dev/null +++ b/seed/ruby-sdk/enum/lib/seed_enum_client/types/color_or_operand.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +require "json" +require_relative "color" +require_relative "operand" + +module SeedEnumClient + class ColorOrOperand + attr_reader :member, :discriminant + + private_class_method :new + alias kind_of? is_a? + # @param member [Object] + # @param discriminant [String] + # @return [ColorOrOperand] + def initialize(member:, discriminant:) + # @type [Object] + @member = member + # @type [String] + @discriminant = discriminant + end + + # Deserialize a JSON object to an instance of ColorOrOperand + # + # @param json_object [JSON] + # @return [ColorOrOperand] + def self.from_json(json_object:) + struct = JSON.parse(json_object, object_class: OpenStruct) + member = case struct.type + when "color" + json_object.value + when "operand" + json_object.value + else + json_object + end + new(member: member, discriminant: struct.type) + end + + # For Union Types, to_json functionality is delegated to the wrapped member. + # + # @return [JSON] + def to_json(*_args) + case @discriminant + when "color" + when "operand" + end + { "type": @discriminant, "value": @member }.to_json + @member.to_json + end + + # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions. + # + # @param obj [Object] + # @return [Void] + def self.validate_raw(obj:) + case obj.type + when "color" + obj.is_a?(Color) != false || raise("Passed value for field obj is not the expected type, validation failed.") + when "operand" + obj.is_a?(Operand) != false || raise("Passed value for field obj is not the expected type, validation failed.") + else + raise("Passed value matched no type within the union, validation failed.") + end + end + + # For Union Types, is_a? functionality is delegated to the wrapped member. + # + # @param obj [Object] + # @return [Boolean] + def is_a?(obj) + @member.is_a?(obj) + end + + # @param member [Color] + # @return [ColorOrOperand] + def self.color(member:) + new(member: member, discriminant: "color") + end + + # @param member [Operand] + # @return [ColorOrOperand] + def self.operand(member:) + new(member: member, discriminant: "operand") + end + end +end diff --git a/seed/ruby-sdk/enum/lib/types_export.rb b/seed/ruby-sdk/enum/lib/types_export.rb index f257522c215..e55d447e905 100644 --- a/seed/ruby-sdk/enum/lib/types_export.rb +++ b/seed/ruby-sdk/enum/lib/types_export.rb @@ -1,3 +1,5 @@ # frozen_string_literal: true require_relative "seed_enum_client/types/operand" +require_relative "seed_enum_client/types/color" +require_relative "seed_enum_client/types/color_or_operand" diff --git a/seed/ts-express/enum/api/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts b/seed/ts-express/enum/api/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts index e7b1aaa4b75..13538f2aa76 100644 --- a/seed/ts-express/enum/api/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts +++ b/seed/ts-express/enum/api/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts @@ -3,5 +3,8 @@ */ import * as SeedEnum from "../../../.."; export interface SendEnumInlinedRequest { - operand?: SeedEnum.Operand; + operand: SeedEnum.Operand; + maybeOperand?: SeedEnum.Operand; + operandOrColor: SeedEnum.ColorOrOperand; + maybeOperandOrColor?: SeedEnum.ColorOrOperand; } diff --git a/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.d.ts b/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.d.ts index d540c9ce135..011dbf83830 100644 --- a/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.d.ts +++ b/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.d.ts @@ -6,6 +6,9 @@ import express from "express"; export interface PathParamServiceMethods { send(req: express.Request<{ operand: serializers.Operand.Raw; + maybeOperand?: serializers.Operand.Raw | null; + operandOrColor: serializers.ColorOrOperand.Raw; + maybeOperandOrColor?: serializers.ColorOrOperand.Raw | null; }, never, never, never>, res: { send: () => Promise; cookie: (cookie: string, value: string, options?: express.CookieOptions) => void; diff --git a/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.js b/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.js index 54be2f6a380..9f5d86e823c 100644 --- a/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.js +++ b/seed/ts-express/enum/api/resources/pathParam/service/PathParamService.js @@ -53,7 +53,7 @@ class PathParamService { return this; } toRouter() { - this.router.post("/path/:operand", (req, res, next) => __awaiter(this, void 0, void 0, function* () { + this.router.post("/path/:operand/:maybeOperand/:operandOrColor/:maybeOperandOrColor", (req, res, next) => __awaiter(this, void 0, void 0, function* () { try { yield this.methods.send(req, { send: () => __awaiter(this, void 0, void 0, function* () { diff --git a/seed/ts-express/enum/api/resources/queryParam/service/QueryParamService.d.ts b/seed/ts-express/enum/api/resources/queryParam/service/QueryParamService.d.ts index 5dd970ce60d..def9646a012 100644 --- a/seed/ts-express/enum/api/resources/queryParam/service/QueryParamService.d.ts +++ b/seed/ts-express/enum/api/resources/queryParam/service/QueryParamService.d.ts @@ -5,14 +5,16 @@ import * as SeedEnum from "../../.."; import express from "express"; export interface QueryParamServiceMethods { send(req: express.Request, res: { send: () => Promise; cookie: (cookie: string, value: string, options?: express.CookieOptions) => void; locals: any; }): void | Promise; sendList(req: express.Request, res: { send: () => Promise; cookie: (cookie: string, value: string, options?: express.CookieOptions) => void; diff --git a/seed/ts-express/enum/api/types/Color.d.ts b/seed/ts-express/enum/api/types/Color.d.ts new file mode 100644 index 00000000000..0281d1e95d2 --- /dev/null +++ b/seed/ts-express/enum/api/types/Color.d.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +export declare type Color = "red" | "blue"; +export declare const Color: { + readonly Red: "red"; + readonly Blue: "blue"; +}; diff --git a/seed/ts-express/enum/api/types/Color.js b/seed/ts-express/enum/api/types/Color.js new file mode 100644 index 00000000000..19fdf2c3a58 --- /dev/null +++ b/seed/ts-express/enum/api/types/Color.js @@ -0,0 +1,10 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Color = void 0; +exports.Color = { + Red: "red", + Blue: "blue", +}; diff --git a/seed/ts-express/enum/api/types/ColorOrOperand.d.ts b/seed/ts-express/enum/api/types/ColorOrOperand.d.ts new file mode 100644 index 00000000000..0c48c821061 --- /dev/null +++ b/seed/ts-express/enum/api/types/ColorOrOperand.d.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as SeedEnum from ".."; +export declare type ColorOrOperand = SeedEnum.ColorOrOperand.Color | SeedEnum.ColorOrOperand.Operand; +export declare namespace ColorOrOperand { + interface Color { + type: "color"; + value: SeedEnum.Color; + } + interface Operand { + type: "operand"; + value: SeedEnum.Operand; + } +} diff --git a/seed/ts-express/enum/api/types/ColorOrOperand.js b/seed/ts-express/enum/api/types/ColorOrOperand.js new file mode 100644 index 00000000000..33e43da19c8 --- /dev/null +++ b/seed/ts-express/enum/api/types/ColorOrOperand.js @@ -0,0 +1,5 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/seed/ts-express/enum/api/types/index.d.ts b/seed/ts-express/enum/api/types/index.d.ts index 2e17a2c3e61..b379d544630 100644 --- a/seed/ts-express/enum/api/types/index.d.ts +++ b/seed/ts-express/enum/api/types/index.d.ts @@ -1 +1,3 @@ export * from "./Operand"; +export * from "./Color"; +export * from "./ColorOrOperand"; diff --git a/seed/ts-express/enum/api/types/index.js b/seed/ts-express/enum/api/types/index.js index 7a0d8fa2aac..8236e312ccd 100644 --- a/seed/ts-express/enum/api/types/index.js +++ b/seed/ts-express/enum/api/types/index.js @@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./Operand"), exports); +__exportStar(require("./Color"), exports); +__exportStar(require("./ColorOrOperand"), exports); diff --git a/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts b/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts index e1843529faf..c32a8852729 100644 --- a/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts +++ b/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.d.ts @@ -7,6 +7,9 @@ import * as core from "../../../../../core"; export declare const SendEnumInlinedRequest: core.serialization.Schema; export declare namespace SendEnumInlinedRequest { interface Raw { - operand?: serializers.Operand.Raw | null; + operand: serializers.Operand.Raw; + maybeOperand?: serializers.Operand.Raw | null; + operandOrColor: serializers.ColorOrOperand.Raw; + maybeOperandOrColor?: serializers.ColorOrOperand.Raw | null; } } diff --git a/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.js b/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.js index 27f4242a426..292e55c6430 100644 --- a/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.js +++ b/seed/ts-express/enum/serialization/resources/inlinedRequest/service/requests/SendEnumInlinedRequest.js @@ -38,5 +38,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SendEnumInlinedRequest = void 0; const core = __importStar(require("../../../../../core")); exports.SendEnumInlinedRequest = core.serialization.object({ - operand: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).Operand; })).optional(), + operand: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).Operand; })), + maybeOperand: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).Operand; })).optional(), + operandOrColor: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).ColorOrOperand; })), + maybeOperandOrColor: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("../../../..")))).ColorOrOperand; })).optional(), }); diff --git a/seed/ts-express/enum/serialization/types/Color.d.ts b/seed/ts-express/enum/serialization/types/Color.d.ts new file mode 100644 index 00000000000..1b65042a3e0 --- /dev/null +++ b/seed/ts-express/enum/serialization/types/Color.d.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from ".."; +import * as SeedEnum from "../../api"; +import * as core from "../../core"; +export declare const Color: core.serialization.Schema; +export declare namespace Color { + type Raw = "red" | "blue"; +} diff --git a/seed/ts-express/enum/serialization/types/Color.js b/seed/ts-express/enum/serialization/types/Color.js new file mode 100644 index 00000000000..f9686593362 --- /dev/null +++ b/seed/ts-express/enum/serialization/types/Color.js @@ -0,0 +1,34 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Color = void 0; +const core = __importStar(require("../../core")); +exports.Color = core.serialization.enum_([ + "red", + "blue", +]); diff --git a/seed/ts-express/enum/serialization/types/ColorOrOperand.d.ts b/seed/ts-express/enum/serialization/types/ColorOrOperand.d.ts new file mode 100644 index 00000000000..01a88c8de78 --- /dev/null +++ b/seed/ts-express/enum/serialization/types/ColorOrOperand.d.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +import * as serializers from ".."; +import * as SeedEnum from "../../api"; +import * as core from "../../core"; +export declare const ColorOrOperand: core.serialization.Schema; +export declare namespace ColorOrOperand { + type Raw = ColorOrOperand.Color | ColorOrOperand.Operand; + interface Color { + type: "color"; + value: serializers.Color.Raw; + } + interface Operand { + type: "operand"; + value: serializers.Operand.Raw; + } +} diff --git a/seed/ts-express/enum/serialization/types/ColorOrOperand.js b/seed/ts-express/enum/serialization/types/ColorOrOperand.js new file mode 100644 index 00000000000..ba68fe1ca3d --- /dev/null +++ b/seed/ts-express/enum/serialization/types/ColorOrOperand.js @@ -0,0 +1,52 @@ +"use strict"; +/** + * This file was auto-generated by Fern from our API Definition. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ColorOrOperand = void 0; +const core = __importStar(require("../../core")); +exports.ColorOrOperand = core.serialization + .union("type", { + color: core.serialization.object({ + value: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).Color; })), + }), + operand: core.serialization.object({ + value: core.serialization.lazy(() => __awaiter(void 0, void 0, void 0, function* () { return (yield Promise.resolve().then(() => __importStar(require("..")))).Operand; })), + }), +}) + .transform({ + transform: (value) => value, + untransform: (value) => value, +}); diff --git a/seed/ts-express/enum/serialization/types/index.d.ts b/seed/ts-express/enum/serialization/types/index.d.ts index 2e17a2c3e61..b379d544630 100644 --- a/seed/ts-express/enum/serialization/types/index.d.ts +++ b/seed/ts-express/enum/serialization/types/index.d.ts @@ -1 +1,3 @@ export * from "./Operand"; +export * from "./Color"; +export * from "./ColorOrOperand"; diff --git a/seed/ts-express/enum/serialization/types/index.js b/seed/ts-express/enum/serialization/types/index.js index 7a0d8fa2aac..8236e312ccd 100644 --- a/seed/ts-express/enum/serialization/types/index.js +++ b/seed/ts-express/enum/serialization/types/index.js @@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./Operand"), exports); +__exportStar(require("./Color"), exports); +__exportStar(require("./ColorOrOperand"), exports); diff --git a/seed/ts-sdk/enum/snippet.json b/seed/ts-sdk/enum/snippet.json index 0a38ffce176..49695b26036 100644 --- a/seed/ts-sdk/enum/snippet.json +++ b/seed/ts-sdk/enum/snippet.json @@ -12,12 +12,12 @@ }, { "id": { - "path": "/path/{operand}", + "path": "/path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor}", "method": "POST" }, "snippet": { "type": "typescript", - "client": "import { SeedEnumClient, SeedEnum } from \"\";\n\nconst seedEnum = new SeedEnumClient;\nawait seedEnum.pathParam.send(SeedEnum.Operand.GreaterThan);\n" + "client": "import { SeedEnumClient, SeedEnum } from \"\";\n\nconst seedEnum = new SeedEnumClient;\nawait seedEnum.pathParam.send(SeedEnum.Operand.GreaterThan, undefined, undefined, undefined);\n" } }, { diff --git a/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/Client.ts b/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/Client.ts index 029a4d9fa9c..bacc73a218a 100644 --- a/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/Client.ts +++ b/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/Client.ts @@ -23,7 +23,7 @@ export class InlinedRequest { constructor(protected readonly _options: InlinedRequest.Options) {} public async send( - request: SeedEnum.SendEnumInlinedRequest = {}, + request: SeedEnum.SendEnumInlinedRequest, requestOptions?: InlinedRequest.RequestOptions ): Promise { const _response = await core.fetcher({ diff --git a/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts b/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts index 4c9b93da065..f6259ee5ecc 100644 --- a/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts +++ b/seed/ts-sdk/enum/src/api/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts @@ -11,5 +11,8 @@ import * as SeedEnum from "../../../.."; * } */ export interface SendEnumInlinedRequest { - operand?: SeedEnum.Operand; + operand: SeedEnum.Operand; + maybeOperand?: SeedEnum.Operand; + operandOrColor: SeedEnum.ColorOrOperand; + maybeOperandOrColor?: SeedEnum.ColorOrOperand; } diff --git a/seed/ts-sdk/enum/src/api/resources/pathParam/client/Client.ts b/seed/ts-sdk/enum/src/api/resources/pathParam/client/Client.ts index 4190a191cbc..abaeb7e331f 100644 --- a/seed/ts-sdk/enum/src/api/resources/pathParam/client/Client.ts +++ b/seed/ts-sdk/enum/src/api/resources/pathParam/client/Client.ts @@ -22,11 +22,21 @@ export declare namespace PathParam { export class PathParam { constructor(protected readonly _options: PathParam.Options) {} - public async send(operand: SeedEnum.Operand, requestOptions?: PathParam.RequestOptions): Promise { + public async send( + operand: SeedEnum.Operand, + maybeOperand: SeedEnum.Operand | undefined, + operandOrColor: SeedEnum.ColorOrOperand, + maybeOperandOrColor: SeedEnum.ColorOrOperand | undefined, + requestOptions?: PathParam.RequestOptions + ): Promise { const _response = await core.fetcher({ url: urlJoin( await core.Supplier.get(this._options.environment), - `path/${await serializers.Operand.jsonOrThrow(operand)}` + `path/${await serializers.Operand.jsonOrThrow( + operand + )}/${maybeOperand}/${await serializers.ColorOrOperand.jsonOrThrow( + operandOrColor + )}/${maybeOperandOrColor}` ), method: "POST", headers: { diff --git a/seed/ts-sdk/enum/src/api/resources/queryParam/client/Client.ts b/seed/ts-sdk/enum/src/api/resources/queryParam/client/Client.ts index 45eb424948c..88e8c783182 100644 --- a/seed/ts-sdk/enum/src/api/resources/queryParam/client/Client.ts +++ b/seed/ts-sdk/enum/src/api/resources/queryParam/client/Client.ts @@ -22,13 +22,14 @@ export class QueryParam { constructor(protected readonly _options: QueryParam.Options) {} public async send( - request: SeedEnum.SendEnumAsQueryParamRequest = {}, + request: SeedEnum.SendEnumAsQueryParamRequest, requestOptions?: QueryParam.RequestOptions ): Promise { - const { operand } = request; + const { operand, maybeOperand } = request; const _queryParams: Record = {}; - if (operand != null) { - _queryParams["operand"] = operand; + _queryParams["operand"] = operand; + if (maybeOperand != null) { + _queryParams["maybeOperand"] = maybeOperand; } const _response = await core.fetcher({ @@ -73,16 +74,22 @@ export class QueryParam { } public async sendList( - request: SeedEnum.SendEnumListAsQueryParamRequest = {}, + request: SeedEnum.SendEnumListAsQueryParamRequest, requestOptions?: QueryParam.RequestOptions ): Promise { - const { operand } = request; + const { operand, maybeOperand } = request; const _queryParams: Record = {}; - if (operand != null) { - if (Array.isArray(operand)) { - _queryParams["operand"] = operand.map((item) => item); + if (Array.isArray(operand)) { + _queryParams["operand"] = operand.map((item) => item); + } else { + _queryParams["operand"] = operand; + } + + if (maybeOperand != null) { + if (Array.isArray(maybeOperand)) { + _queryParams["maybeOperand"] = maybeOperand.map((item) => item); } else { - _queryParams["operand"] = operand; + _queryParams["maybeOperand"] = maybeOperand; } } diff --git a/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumAsQueryParamRequest.ts b/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumAsQueryParamRequest.ts index 175c9c7aa18..4499415585f 100644 --- a/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumAsQueryParamRequest.ts +++ b/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumAsQueryParamRequest.ts @@ -11,5 +11,6 @@ import * as SeedEnum from "../../../.."; * } */ export interface SendEnumAsQueryParamRequest { - operand?: SeedEnum.Operand; + operand: SeedEnum.Operand; + maybeOperand?: SeedEnum.Operand; } diff --git a/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumListAsQueryParamRequest.ts b/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumListAsQueryParamRequest.ts index 364b7b91a5c..740edfa37c5 100644 --- a/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumListAsQueryParamRequest.ts +++ b/seed/ts-sdk/enum/src/api/resources/queryParam/client/requests/SendEnumListAsQueryParamRequest.ts @@ -5,5 +5,6 @@ import * as SeedEnum from "../../../.."; export interface SendEnumListAsQueryParamRequest { - operand?: SeedEnum.Operand | SeedEnum.Operand[]; + operand: SeedEnum.Operand | SeedEnum.Operand[]; + maybeOperand?: SeedEnum.Operand | SeedEnum.Operand[]; } diff --git a/seed/ts-sdk/enum/src/api/types/Color.ts b/seed/ts-sdk/enum/src/api/types/Color.ts new file mode 100644 index 00000000000..e70edb8f267 --- /dev/null +++ b/seed/ts-sdk/enum/src/api/types/Color.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Color = "red" | "blue"; + +export const Color = { + Red: "red", + Blue: "blue", +} as const; diff --git a/seed/ts-sdk/enum/src/api/types/ColorOrOperand.ts b/seed/ts-sdk/enum/src/api/types/ColorOrOperand.ts new file mode 100644 index 00000000000..b8ec666e796 --- /dev/null +++ b/seed/ts-sdk/enum/src/api/types/ColorOrOperand.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as SeedEnum from ".."; + +export type ColorOrOperand = SeedEnum.ColorOrOperand.Color | SeedEnum.ColorOrOperand.Operand; + +export declare namespace ColorOrOperand { + interface Color { + type: "color"; + value: SeedEnum.Color; + } + + interface Operand { + type: "operand"; + value: SeedEnum.Operand; + } +} diff --git a/seed/ts-sdk/enum/src/api/types/index.ts b/seed/ts-sdk/enum/src/api/types/index.ts index 2e17a2c3e61..b379d544630 100644 --- a/seed/ts-sdk/enum/src/api/types/index.ts +++ b/seed/ts-sdk/enum/src/api/types/index.ts @@ -1 +1,3 @@ export * from "./Operand"; +export * from "./Color"; +export * from "./ColorOrOperand"; diff --git a/seed/ts-sdk/enum/src/serialization/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts b/seed/ts-sdk/enum/src/serialization/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts index dc92aa49130..8483d1ed6c4 100644 --- a/seed/ts-sdk/enum/src/serialization/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts +++ b/seed/ts-sdk/enum/src/serialization/resources/inlinedRequest/client/requests/SendEnumInlinedRequest.ts @@ -10,11 +10,17 @@ export const SendEnumInlinedRequest: core.serialization.Schema< serializers.SendEnumInlinedRequest.Raw, SeedEnum.SendEnumInlinedRequest > = core.serialization.object({ - operand: core.serialization.lazy(async () => (await import("../../../..")).Operand).optional(), + operand: core.serialization.lazy(async () => (await import("../../../..")).Operand), + maybeOperand: core.serialization.lazy(async () => (await import("../../../..")).Operand).optional(), + operandOrColor: core.serialization.lazy(async () => (await import("../../../..")).ColorOrOperand), + maybeOperandOrColor: core.serialization.lazy(async () => (await import("../../../..")).ColorOrOperand).optional(), }); export declare namespace SendEnumInlinedRequest { interface Raw { - operand?: serializers.Operand.Raw | null; + operand: serializers.Operand.Raw; + maybeOperand?: serializers.Operand.Raw | null; + operandOrColor: serializers.ColorOrOperand.Raw; + maybeOperandOrColor?: serializers.ColorOrOperand.Raw | null; } } diff --git a/seed/ts-sdk/enum/src/serialization/types/Color.ts b/seed/ts-sdk/enum/src/serialization/types/Color.ts new file mode 100644 index 00000000000..709c1504ab8 --- /dev/null +++ b/seed/ts-sdk/enum/src/serialization/types/Color.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as SeedEnum from "../../api"; +import * as core from "../../core"; + +export const Color: core.serialization.Schema = core.serialization.enum_([ + "red", + "blue", +]); + +export declare namespace Color { + type Raw = "red" | "blue"; +} diff --git a/seed/ts-sdk/enum/src/serialization/types/ColorOrOperand.ts b/seed/ts-sdk/enum/src/serialization/types/ColorOrOperand.ts new file mode 100644 index 00000000000..29b5d783dfa --- /dev/null +++ b/seed/ts-sdk/enum/src/serialization/types/ColorOrOperand.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as SeedEnum from "../../api"; +import * as core from "../../core"; + +export const ColorOrOperand: core.serialization.Schema = + core.serialization + .union("type", { + color: core.serialization.object({ + value: core.serialization.lazy(async () => (await import("..")).Color), + }), + operand: core.serialization.object({ + value: core.serialization.lazy(async () => (await import("..")).Operand), + }), + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace ColorOrOperand { + type Raw = ColorOrOperand.Color | ColorOrOperand.Operand; + + interface Color { + type: "color"; + value: serializers.Color.Raw; + } + + interface Operand { + type: "operand"; + value: serializers.Operand.Raw; + } +} diff --git a/seed/ts-sdk/enum/src/serialization/types/index.ts b/seed/ts-sdk/enum/src/serialization/types/index.ts index 2e17a2c3e61..b379d544630 100644 --- a/seed/ts-sdk/enum/src/serialization/types/index.ts +++ b/seed/ts-sdk/enum/src/serialization/types/index.ts @@ -1 +1,3 @@ export * from "./Operand"; +export * from "./Color"; +export * from "./ColorOrOperand"; diff --git a/test-definitions/fern/apis/enum/definition/__package__.yml b/test-definitions/fern/apis/enum/definition/__package__.yml index a129642a1f0..ebd816902ff 100644 --- a/test-definitions/fern/apis/enum/definition/__package__.yml +++ b/test-definitions/fern/apis/enum/definition/__package__.yml @@ -16,4 +16,16 @@ types: - name: GreaterThan value: ">" - name: LessThan - value: less_than \ No newline at end of file + value: less_than + + Color: + enum: + - value: "red" + name: RED + - value: "blue" + name: BLUE + + ColorOrOperand: + union: + color: Color + operand: Operand \ No newline at end of file diff --git a/test-definitions/fern/apis/enum/definition/inlined-request.yml b/test-definitions/fern/apis/enum/definition/inlined-request.yml index 7087ca48590..9325de09ac1 100644 --- a/test-definitions/fern/apis/enum/definition/inlined-request.yml +++ b/test-definitions/fern/apis/enum/definition/inlined-request.yml @@ -13,7 +13,10 @@ service: body: properties: operand: - type: optional + type: root.Operand + maybeOperand: optional + operandOrColor: root.ColorOrOperand + maybeOperandOrColor: optional examples: - request: operand: $root.Operand.GreaterThan diff --git a/test-definitions/fern/apis/enum/definition/path-param.yml b/test-definitions/fern/apis/enum/definition/path-param.yml index d5744ebce2c..bd4913d8319 100644 --- a/test-definitions/fern/apis/enum/definition/path-param.yml +++ b/test-definitions/fern/apis/enum/definition/path-param.yml @@ -6,10 +6,13 @@ service: base-path: "" endpoints: send: - path: /path/{operand} + path: /path/{operand}/{maybeOperand}/{operandOrColor}/{maybeOperandOrColor} method: POST path-parameters: operand: root.Operand + maybeOperand: optional + operandOrColor: root.ColorOrOperand + maybeOperandOrColor: optional examples: - path-parameters: operand: $root.Operand.GreaterThan \ No newline at end of file diff --git a/test-definitions/fern/apis/enum/definition/query-param.yml b/test-definitions/fern/apis/enum/definition/query-param.yml index dbb858c2038..61f6b14fefb 100644 --- a/test-definitions/fern/apis/enum/definition/query-param.yml +++ b/test-definitions/fern/apis/enum/definition/query-param.yml @@ -11,8 +11,10 @@ service: request: name: SendEnumAsQueryParamRequest query-parameters: - operand: - type: optional + operand: root.Operand + maybeOperand: optional + operandOrColor: root.ColorOrOperand + maybeOperandOrColor: optional examples: - query-parameters: operand: $root.Operand.GreaterThan @@ -24,5 +26,14 @@ service: name: SendEnumListAsQueryParamRequest query-parameters: operand: + type: root.Operand + allow-multiple: true + maybeOperand: type: optional allow-multiple: true + operandOrColor: + type: root.ColorOrOperand + allow-multiple: true + maybeOperandOrColor: + type: optional + allow-multiple: true