elsa-core/src/modules/Elsa.Http
Sipke Schoorstra 952cbb4edc
Add strict type checking for variable parsing (#6536)
* Add strict type checking for variable parsing

Introduced a `StrictMode` flag for variables, enforcing stricter type validation during parsing and conversions. Updated related methods and tests to reflect the stricter parsing behavior, ensuring consistent type compatibility and error handling.

* Refactor StrictMode handling and improve ObjectConverter logic

Moved StrictMode flag from Variable to ObjectConverter for better cohesion and updated related references. Additionally, removed unused parameters and simplified ObjectConverterOptions to streamline configuration and maintain consistency across the codebase.

* Refactor type conversion logic and update logging defaults

Improve type conversion reliability by introducing `TryConvertValue` and refining exception handling. Update JSON scenarios to use "Inherit" as the default for log persistence modes, ensuring consistency across configurations.

* Refactor exception handling in ObjectConverter.

Introduce a helper method `ReturnOrThrow` to streamline and centralize exception handling logic. This change also adds support for non-strict mode, allowing value fallback instead of throwing exceptions when enabled.

* Add numeric type checks and improve type conversion handling

Introduce `IsNumericType` extension method to identify numeric types. Enhance type conversion logic in `ObjectConverter` to handle numeric, boolean, and string types more accurately. Update variable deserialization workflows to handle conversion failures gracefully.

* Set a default comment for ObjectConverter.StrictMode assignment

Added a comment clarifying that StrictMode is set to its default value. This improves code readability and helps maintainers understand the intent.

* Fix formatting inconsistencies and improve code clarity

Removed redundant whitespace and adjusted formatting to align with coding standards. These changes enhance the readability and maintainability of the code without altering functionality.

* Fix typo in Program.cs variable comment

Corrected a minor issue in the comment for `identityTokenSection` to remove the unnecessary "Modify" text. This change improves code readability and removes potential confusion for developers.

* Simplify imports in ModifyVariableHandler.cs

Removed unused `Microsoft.Extensions.Options` and `Elsa.Workflows.Options` imports to clean up dependencies and improve maintainability. This change reduces clutter without affecting the existing functionality.
2025-03-31 18:11:14 +02:00
..
Abstractions Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Activities Add strict type checking for variable parsing (#6536) 2025-03-31 18:11:14 +02:00
Bookmarks Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688) 2023-12-26 18:56:29 +01:00
Constants Add Fault Code, Category and Type (#5362) 2024-05-10 15:30:32 +02:00
ContentWriters Refactor FormUrlEncodedHttpContentFactory for better flexibility (#6074) 2024-10-30 19:35:16 +01:00
Contexts Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Contracts Add base path providers and standardize tenant accessor property 2024-10-17 19:47:55 +02:00
DownloadableContentHandlers Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Exceptions Bulk Import + Export of Workflow Definitions and Instances (#4643) 2023-11-22 14:31:48 +01:00
Extensions Refactor route normalization logic 2025-01-15 11:17:21 +01:00
Features Remove mediator-based workflow definition handling 2025-02-18 19:39:37 +01:00
FileCaches Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Handlers Refactor workflow management for improved modularization 2025-01-20 00:24:01 +01:00
Middleware Refactor route normalization logic 2025-01-15 11:17:21 +01:00
Models Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Options Update bulk delete endpoints and request model 2025-03-07 10:04:41 +01:00
Parsers Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
PortResolvers Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Scripting/JavaScript Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
Selectors Bulk Import + Export of Workflow Definitions and Instances (#4643) 2023-11-22 14:31:48 +01:00
Serialization Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
Services Refactor route normalization logic 2025-01-15 11:17:21 +01:00
Tasks Add multitenancy support for background tasks (#6059) 2024-10-28 19:38:24 +01:00
UIHints Refactor URL trimming logic in HTTP endpoint handlers (#6141) 2024-11-22 21:30:41 +01:00
BookmarkMetadata.cs Bulk Import + Export of Workflow Definitions and Instances (#4643) 2023-11-22 14:31:48 +01:00
Elsa.Http.csproj Merge branch 'refs/heads/main' into blueberry 2025-03-10 15:13:26 +02:00
Elsa.Http.csproj.DotSettings Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
FodyWeavers.xml Prepare projects for packaging 2022-11-03 21:40:23 +01:00