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

Fix x-go-type-import code generation #682

Merged
merged 2 commits into from Jul 25, 2022
Merged

Fix x-go-type-import code generation #682

merged 2 commits into from Jul 25, 2022

Conversation

WesleyMiller1998
Copy link
Contributor

While trying to use x-go-type-import for my own project, I ran into an issue where it wasn't generating the types. I dug into the code gen and realized that for each schema, request, or response it actually overwrites the import map. The intended behavior, from my understanding, would be to add the imports rather than overwrite. Overall, the change is pretty small, but it is evident that the test case and example missed this. If desired, I can update the test spec and example.

@VladimirStepanov
Copy link
Contributor

VladimirStepanov commented Jul 25, 2022

Thank you for your changes, I've missed it :(

@VladimirStepanov
Copy link
Contributor

@deepmap-marcinr could you approve and merge it?

@VladimirStepanov
Copy link
Contributor

@jamietanna hello! it's very important fix, could you approve and merge it?

@jamietanna
Copy link
Collaborator

Sorry, I'm not a committer on the repo! I believe the primary maintainer is on vacation at the moment. If you need this, it's worth pinning to your fork (https://www.jvt.me/posts/2022/07/07/go-mod-fork/)

@deepmap-marcinr deepmap-marcinr merged commit 5776016 into deepmap:master Jul 25, 2022
@deepmap-marcinr
Copy link
Contributor

Thank you.

adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
* Fix x-go-type-import statements

* Add better test coverage for x-go-type-import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants