Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #9553
Closed
Open
Issue created May 22, 2021 by Administrator@rootContributor3 of 6 checklist items completed3/6 checklist items

[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 .gitignore search 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 .gitignore file 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

https://github.com/OpenAPITools/openapi-generator/blob/696bcb3e856d5573902f2709b40113dd78ea7912/samples/openapi3/client/petstore/dart-dio/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.

Assignee
Assign to
Time tracking