[BUG][dart-dio] Generated gitignore file uses invalid comment style
Created by: CaptainIRS
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The generators for dart-dio and dart-dio-next generate invalid .gitignore files as the comment style used is not valid.
According to the official git documentation for gitignore,
- A line starting with
#serves as a comment. - The slash
/is used as the directory separator. Separators may occur at the beginning, middle or end of the.gitignoresearch pattern. - If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular
.gitignorefile itself.
But the generators for dart-dio and dart-dio-next generate a gitignore that contains:
*.iml // IntelliJ
*.ipr // IntelliJ
*.iws // IntelliJ
.idea/ // IntelliJ
.DS_Store // Mac
which is not a valid comment syntax as it is interpreted as ignoring '/ IntelliJ' or '/ Mac' relative to the directory of the generated package according to the gitignore documentation.
openapi-generator version
Latest master. This is not a regression.
OpenAPI declaration file content or url
N/A
Generation Details
Language: dart Generators: dart-dio and dart-dio-next
Steps to reproduce
The issue can be seen in the generated samples https://github.com/OpenAPITools/openapi-generator/blob/696bcb3e856d5573902f2709b40113dd78ea7912/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.gitignore#L33-L37
Related issues/PRs
N/A
Suggest a fix
The correct comment style for gitignore files should be used.