Closed billyandco closed 1 year ago
suggestion https://github.com/Carapacik/swagger_parser/blob/main/swagger_parser/lib/src/utils/type_utils.dart
replacing line from 15 to 20
case 'string':
switch (format) {
case 'binary':
// Single MultipartFile is not generated due an error
return 'File';
case 'date':
case 'date-time':
return 'DateTime';
default:
return 'String';
}
Look at the changes in version 0.8.1
Thank you for your reactivity !
Unfortunately, i don't think it is enough It still generate me the empty Date object
Maybe by replacing "$ref": "#/components/schemas/Date" to DateTime type for dart lang
Try to do it yourself and open a PR
"$ref": "#/components/schemas/Date" to DateTime type for dart lang
It will not be very correct, because other users may have a Date class with other fields.
Yes, then the reference will be an object, not a string
Perfect, i'm going to try to do it
Just a reminder of the subject this use case is not implemented
Fixed in 0.9.0
while using the generator on a swagger generated by Java,
Date
is not recognize as dartDateTime
swagger
generated
expected