You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run fvm dart run build_runner build (fvm might not be needed depending on install of dart, I use it with fvm and flutter)
Expected behavior
The API is built WITH Build_value as JSON serializer (the default) instead of the chosen JSON Serializer.
Logs
~~~
[INFO] openapi_generator on lib/core/api_generator.dart:Loaded cached and current spec files.
[INFO] openapi_generator on lib/core/api_generator.dart:Dirty Spec found. Running generation.
[INFO] openapi_generator on lib/core/api_generator.dart:Running following command to generate openapi client - [ generate -o=heelo-api/ -i=lib/core/api.json -g=dart-dio --additional-properties=allowUnicodeIdentifiers=false,ensureUniqueParams=true,useEnumExtension=true,enumUnknownDefaultCase=false,prependFormOrBodyParameters=false,pubAuthor=Heelo BV,pubName=heelo_api,legacyDiscriminatorBehavior=true,sortModelPropertiesByRequiredFlag=true,sortParamsByRequiredFlag=true,wrapper=none ]
[INFO] openapi_generator on lib/core/api_generator.dart:Openapi generator completed successfully.
~~~
Note it does NOT include the json serializer code
When I change the openapi generator code (and point to it by path) with the following code it does work....
~~~
--- a/openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart
+++ b/openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart
@@ -664,8 +664,10 @@ class EnumTransformer {
static DioSerializationLibrary? dioSerializationLibrary(String? name) {
switch (name) {
case 'json_serializable':
+ case 'jsonSerializable':
return DioSerializationLibrary.jsonSerializable;
case 'built_value':
+ case 'builtValue':
return DioSerializationLibrary.builtValue;
}
return null;
~~~
Screenshots
No response
Platform
Linux
Library version
5.0.2
Flutter version
3.24.1
Flutter channel
stable
Additional context
[✓] Flutter (Channel stable, 3.24.1, on Fedora Linux 40 (Workstation Edition) 6.10.8-200.fc40.x86_64, locale
en_GB.UTF-8)
• Flutter version 3.24.1 on channel stable at /home/nathan/fvm/versions/3.24.1
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5874a72aa4 (4 weeks ago), 2024-08-20 16:46:00 -0500
• Engine revision c9b9d5780d
• Dart version 3.5.1
• DevTools version 2.37.2
The text was updated successfully, but these errors were encountered:
Description of the bug
The json Serializer is not working
Steps to reproduce
Use the following code
Run
fvm dart run build_runner build
(fvm might not be needed depending on install of dart, I use it with fvm and flutter)Expected behavior
The API is built WITH Build_value as JSON serializer (the default) instead of the chosen JSON Serializer.
Logs
Screenshots
No response
Platform
Linux
Library version
5.0.2
Flutter version
3.24.1
Flutter channel
stable
Additional context
The text was updated successfully, but these errors were encountered: