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

Exit code 0 on error #9

Open
m17kea opened this issue Oct 30, 2020 · 0 comments
Open

Exit code 0 on error #9

m17kea opened this issue Oct 30, 2020 · 0 comments

Comments

@m17kea
Copy link

m17kea commented Oct 30, 2020

This command:

swagger-codegen-cli generate -i ${ApiUrl} -l java --artifact-version $SEMANTIC_VERSION --git-repo-id java-client -c config.json

Resulted in an successful 0 exit code:


[main]   INFO io.swagger.parser.Swagger20Parser - reading from   https://***/swagger/v1/swagger.json
--
[main] ERROR   io.swagger.parser.util.RemoteUrl - unable to read
java.io.IOException: Server   returned HTTP response code: 500 for URL: https://***/swagger/v1/swagger.json
at   sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at   sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at   sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at   java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at   sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1950)
at   sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1945)
at   java.security.AccessController.doPrivileged(Native Method)
at   sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1944)
at   sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1514)
at   sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at   sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at   io.swagger.parser.util.RemoteUrl.urlToString(RemoteUrl.java:138)
at   io.swagger.parser.Swagger20Parser.read(Swagger20Parser.java:93)
at   io.swagger.parser.SwaggerParser.read(SwaggerParser.java:69)
at   io.swagger.codegen.config.CodegenConfigurator.toClientOptInput(CodegenConfigurator.java:431)
at   io.swagger.codegen.cmd.Generate.run(Generate.java:283)
at   io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
Caused   by: java.io.IOException: Server returned HTTP response code: 500 for URL:   https://***/swagger/v1/swagger.json
at   sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
at   sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at   sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3061)
at   sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:305)
at   io.swagger.parser.util.RemoteUrl.urlToString(RemoteUrl.java:135)
... 5 more


The exit code should have been 1.

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

No branches or pull requests

1 participant