Skip to content

[GO][Server] Add mime/multipart missing import in go server#8790

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
ys:ys-fix-mime
Feb 27, 2021
Merged

[GO][Server] Add mime/multipart missing import in go server#8790
wing328 merged 1 commit intoOpenAPITools:masterfrom
ys:ys-fix-mime

Conversation

@ys
Copy link
Copy Markdown
Contributor

@ys ys commented Feb 22, 2021

Fork of #8683 with the samples regenerated

This is a similar fix to the other PR but I was able to regenerate the samples.

This adds a missing import into the routers from go server

@wing328 wing328 added this to the 5.1.0 milestone Feb 27, 2021
@wing328 wing328 merged commit 85b2b3c into OpenAPITools:master Feb 27, 2021
@wing328 wing328 changed the title [Fix GO Server] Add mime/multipart missing import in go server [GO][Server] Add mime/multipart missing import in go server Feb 27, 2021
@wing328
Copy link
Copy Markdown
Member

wing328 commented Feb 27, 2021

@ys thanks for the PR.

@jirikuncar thanks for reviewing the change.

I've filed #8790 to better catch similar issue moving forward. Without this fix, I was able to get the following error when running the tests:

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Expected root element 'settings' but found 'profiles' (position: START_TAG seen <profiles>... @1:10)  @ /Users/williamcheng/.m2/settings.xml, line 1, column 10
[WARNING] 
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< org.openapitools:GoApiServer >--------------------
[INFO] Building Go Api Server 1.0-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ GoApiServer ---
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (go-test) @ GoApiServer ---
# github.com/GIT_USER_ID/GIT_REPO_ID/go
go/routers.go:100:43: undefined: multipart
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.217 s
[INFO] Finished at: 2021-02-27T15:07:34+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (go-test) on project GoApiServer: Command execution failed.: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
williamcheng ~/Code/openapi-generator/samples/server/petstore/go-api-server (go-server-test) $ 

@wing328 wing328 mentioned this pull request Feb 27, 2021
2 tasks
@wing328
Copy link
Copy Markdown
Member

wing328 commented Mar 22, 2021

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants