Skip to content

[BUG][dart-dio][client] new analysis_options.yaml triggers error on response which is bytes #8878

@adg-mh

Description

@adg-mh

The analysis_options.yaml additions from #8231 now cause an error on code generated for an endpoint which returns bytes.

After generating the dart-dio client for this spec, dart will now throw an error when building:

A value of type 'dynamic' can't be assigned to a variable of type 'Uint8List'.
Try changing the type of the variable, or casting the right-hand type to 'Uint8List'.

Seems like it could be remedied with an as {{{returnType}}} added to the template.

.
@swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions