vania-dart / framework

Fast, simple, and powerful backend framework for Dart built with ❤️
https://vdart.dev
MIT License
186 stars 16 forks source link

[BUG] - Nested Json Object With Integer are converting to String #128

Closed whatsevr closed 1 month ago

whatsevr commented 1 month ago

Describe the bug Nested Json Object With Integer are converting to String (duration_sec :1800 is passed int but it runtimeType in vania is String) in POST request Body

To Reproduce Code:

print(fileMetaData['duration_sec'].runtimeType);
      // Validate video duration, size, and aspect ratio
      if (fileMetaData['duration_sec'] > 3600) {
        throw ValidationException(
            message: ['Video duration must be 60 minutes or less']);
      }

Postman Request:

{
  "file_meta_data": {
    "duration_sec": 1800,  // 30 minutes
    "size_bytes": 1048576000,  // 1 GB
    "aspect_ratio": 1.5  // 3:2 aspect ratio
  },
  "post_data": {
    "post_creator_type": "account",  // "account", "portfolio", or "community"
    "user_uid": "{{user_uid}}",  // Replace with actual user UID
    "title": "Check out my new video post!"  // Title must be 100 characters or less
  }
}

Expected behavior Type should not get convert

Environment (please complete the following information):

javad-zobeidi commented 1 month ago

@whatsevr Please update to the last version and try

whatsevr commented 1 month ago

Thanks for the update