Dart models must include toMap&fromMap besides toJson&fromJson #337
Labels
Dart
Target language: Dart
feature-request
New feature or request
model-gen
Issues on datastore model generation
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.15.3
Amplify CLI Version
7.6.4
What operating system are you using?
Ubuntu
Amplify Codegen Command
codegen, codegen models
Describe the bug
The generated models code should include toJson&fromJson for normal json(String) instead of using them for (Map).
Also the (Map) class should have toMap&fromMap instead of using toJson&fromJson.
like this:
Expected behavior
Have model like this:
Reproduction steps
GraphQL schema(s)
# Put schemas below this line
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: