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
When generating dart files the generator does not account for the provided $ref type in the allOf when using an array type (swagger snippet below):
Notice final List<Object>? data; should in fact be final List<Organization>? data;
My assumption is that something goes wrong because of the type: "array". Because if we look at the swagger snippet below:
As you can see, because the type is not array but object, it generates the correct type: final Organization data;.
So I presume something goes wrong when the type is array.
Describe the bug
When generating dart files the generator does not account for the provided $ref type in the allOf when using an array type (swagger snippet below):
this results into the following dart code:
Notice
final List<Object>? data;
should in fact befinal List<Organization>? data;
My assumption is that something goes wrong because of the type: "array". Because if we look at the swagger snippet below:
it reproduces a an expected (& correct) dart file:
As you can see, because the type is not array but object, it generates the correct type:
final Organization data;
.So I presume something goes wrong when the type is array.
To Reproduce
using the folowing build.yaml:
it will reproduce the issue explained above.
Expected behavior
final List<Object>? data;
should in fact befinal List<Organization>? data;
Swagger specification link
link to swagger:
https://api-dev.guestway.io/swagger/swagger-platform.json
link to OpenApi documentation:
https://api-dev.guestway.io/swagger/platform
Library version used:
Using:
2.15.0
Additional context
No additional context needed (I think). Happy to provide more if needed of course :)
Thanks in advance!
The text was updated successfully, but these errors were encountered: