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
Describe the bug
The following yaml file is just a very condenced part of my very big swagger code. The file renders well except of this little part below. The isue seems that the response type has an array of objects.
to get it to render the file. If I replace the first ### ISSUE with the second, it will also work. seems like the code generator expects the same signature in both parts. I expect it to extend the model.
Could not generate `fromJson` code for`condition`.
To support the type`InvalidType` you can:
* Use `JsonConverter`
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonConverter-class.html
* Use `JsonKey` fields `fromJson` and `toJson`
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/fromJson.html
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html
package:test/api/error.swagger.dart:119:43
╷
119 │ final TestPost$Response$Item$Condition? condition;
│ ^^^^^^^^^
╵
Expected behavior
Should generate code without the error
Swagger specification link
Link to swagger/OpenApi documentation
Describe the bug
The following yaml file is just a very condenced part of my very big swagger code. The file renders well except of this little part below. The isue seems that the response type has an array of objects.
I can either remove this
or this:
to get it to render the file. If I replace the first
### ISSUE
with the second, it will also work. seems like the code generator expects the same signature in both parts. I expect it to extend the model.To Reproduce
results in
Expected behavior
Should generate code without the error
Swagger specification link
Link to swagger/OpenApi documentation
Library version used:
The text was updated successfully, but these errors were encountered: