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

[BUG][Go] go-echo-server generator does not respect the --git-host argument #15636

Closed
5 of 6 tasks
osechet opened this issue May 25, 2023 · 4 comments
Closed
5 of 6 tasks

Comments

@osechet
Copy link
Contributor

osechet commented May 25, 2023

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 go-echo-server generator does not respect the --git-host argument. The generated code always defines the module's name as "github.com/user/repo".

openapi-generator version

6.6.0
7.0.0-20230525.031952-54 (latest nightly)

OpenAPI declaration file content or url

The problem is not related to the input file. It can be reproduced with the petstore example: https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

Generation Details
openapi-generator-cli generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml --git-host gitlab.com --git-user-id myuser --git-repo-id myrepo -g go-echo-server --additional-properties packageName=myproject -o myproject
Steps to reproduce
  • Call the command given in previous section
  • Open go.mod or any file in the handlers directory
  • The module is github.com/myuser/myrepo instead of gitlab.com/myuser/myrepo.
Related issues/PRs

N/A

Suggest a fix

Replacing github.com/{{{gitUserId}}}/{{{gitRepoId}}} by {{{gitHost}}}/{{{gitUserId}}}/{{{gitRepoId}}} in all the files of modules\openapi-generator\src\main\resources\go-echo-server should probably fix the issue.

@wing328
Copy link
Member

wing328 commented May 25, 2023

can you please file a PR with the suggested fix? let us know if you need any help.

@lwj5
Copy link
Contributor

lwj5 commented Aug 4, 2023

Please help to close this issue

@osechet
Copy link
Contributor Author

osechet commented Aug 4, 2023

@lwj5 the issue is normally fixed with PR #15720. It can be closed.

@lwj5
Copy link
Contributor

lwj5 commented Aug 4, 2023

Yes, please click close this issue

@osechet osechet closed this as completed Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants