Skip to content

[dart-dio] Not all generated .dart files are post processed #6963

Closed
@adg-mh

Description

@adg-mh

When generating a dart-dio client not all of the generated dart files are being post processed due to a change in fileType argument passed to postProcessFile() which indicates the category of file being processed. This change was made in the core refactoring in #6357. cc @jimschubert who worked on that.

An example of a file that would be skipped is lib\api.dart. You can reproduce the issue by setting DART_POST_PROCESS_FILE and then running the generator for any dart-dio client including the petstore sample.

postProcessFile() is called here with a fileType of api-doc. Based on the code that this replaced I believe the fileType should be supporting-mustache (previous code had supporting-common used as well).

You can see here there's a check that fails on the fileType api-doc, because it's not in the list of accepted fileTypes.

I think the passed fileType should probably be fixed but it's possible removing that extra check so that only the extension of the file is checked (process all .dart files) is a reasonable change too.

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