-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Can Object
properties should mapped into Map<>
?
#296
Comments
But why you cannot transform Also I think it's related to the #295 |
Yes! And this is exactly what I did! |
@fncap anyway we will try to fix it(check related issue) to provide the best experience with the library. Thanks and have a good weekend! |
Hi @fncap We investigated this issue. We can't map Object properties to The only one way is to map it to Map<String, dynamic>. Is it fine? |
Yes you are right, generating a 'Map<string,dynamic>' should be fine! |
Hi @fncap Added generation of Map<String, dynamic>? for such fields |
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog * Fixed responses returns Stream<Something> Fixed cases when we have List<List<...<List<SomeClass> in model parameter * Updated changelog and pubspec Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
* Fixed some issues * Added fix for Field annotations. Updatec changelog and pubspec * Fixed lot of issues with AllOf support * Updated changelog and pubspec * Added requestbodies generation from requests * Add windows support (#273) * Run CI on windows too * chore: Fix a number of path joins * fix: Revert change to getFileNameWithoutExtension * fix: Normalize paths used for extensions * Fixed errors with requestBodies generation * Added possibility to use operationId for request name * Format code * Updated pubspec and changelog * Fix tests * Fix analyser issues * Updated example readme * Removed converter generator * Fix cases when refs are overriden * Fixed enum generation Changed int64 parsing to double * Released 2.2.8 * Added support int64 * Updated changelog and pubspec * Fix for models int64 * Updated changelog and pubspec * Removed not needed file * Fixed responses array of int * Reverted analysis options * Updated changelog * Updated version * Fixed tests * Fixed analyser issues * Fixed issue #291 * updated changelog and pubcpec * Added parsing of security for requests * Fixed num parsing as Num * Implemented security keys definition * Removed not needed prints * Updated changelog and pubspec * Removed use_inheritance field * Removed outdated tests * Implemented integer enums support * Updated changelog and pubspec * Fixed fromJson for integer enum fields * Updated changelog and pubspec * Formatted code * Updated changelog * Fixed issue 263 * Fixed test * Fixed issue #311 * Updated pubspec and changelog * Fixed list enums generation in requests * Updated pubspec and changelog * Fixed issue #296 * Updated pubspec and changelog * Fixed conflicts * [BUB] Array in spec is not being generated as expected * Updated pubspec and changelog * Fixed responses returns Stream<Something> Fixed cases when we have List<List<...<List<SomeClass> in model parameter * Updated changelog and pubspec * Fixed issue 328: Error when swagger has models with name "Type" * Updated changelog and pubspec * Fixed enums naming Co-authored-by: uladzimir_paliukhovich <> Co-authored-by: Elliana May <me@mause.me>
Please describe a problem.
Cannot retrieve values from Dictionary like properties, as per generated
Object?
type insteadDescribe the solution you'd like
Some times, data returned from WebApi, has form of Dictionary like structures.
Swagger recognise them as a generic
object
type, and your tool do the same, generatingObject?
typed properties.Instead of that, should be better if tool treats those properties as a
Map<string,string>
or something like that, in that way programmer should free to read values from Map as he want!--- Detailed explanation ---
Look at following DTO
which is translated into following swagger spec file:
and then is generated into following Dart class:
metadata
property should be of typeMap<string,string>?
instead ofObject?
!The text was updated successfully, but these errors were encountered: