Skip to content

Conversation

@angryPodo
Copy link
Owner

Refactored RouteFactoryGenerator to handle parameter parsing using kotlinx.serialization.

Previously, missing parameters would cause crashes or pass nulls even if a default value was defined. Now, we construct a JsonObject from the parameter map and let Json.decodeFromJsonElement handle the object creation. This
ensures Kotlin default values work as expected.

Also updated wisp-runtime to expose kotlinx-serialization-json via api so consumer modules don't need to add the dependency manually to compile the generated code.

@angryPodo angryPodo self-assigned this Dec 31, 2025
@angryPodo angryPodo added the FEAT✨ Add a new feature or change the behavior/policy of an existing feature. label Dec 31, 2025
@angryPodo angryPodo linked an issue Dec 31, 2025 that may be closed by this pull request
@angryPodo angryPodo merged commit 604f731 into main Dec 31, 2025
2 checks passed
@angryPodo angryPodo deleted the feat/#23-support-default-values-in-route-data-classes branch December 31, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ Add a new feature or change the behavior/policy of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Support default values in Route data classes

2 participants