Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
adg-mh opened this issue Jul 16, 2020 · 0 comments · Fixed by #8193
Closed

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

adg-mh opened this issue Jul 16, 2020 · 0 comments · Fixed by #8193

Comments

@adg-mh
Copy link
Contributor

adg-mh commented Jul 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant