Re: Swagger.read(json) always failing

20 views
Skip to first unread message

Ron Ratovsky

unread,
Jul 8, 2016, 1:30:50 PM7/8/16
to swagger-sw...@googlegroups.com

http://169.44.118.61:8080/TomcatWebAppForChefNode/swagger.json returns a malformed JSON - just open it in your browser.

http://watsondop05.rch.stglabs.ibm.com:9106/services/concept_detection/api/swagger/swagger.json is inaccessible, at least to me, so can’t test it.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Shreejit Nair <shreeji...@gmail.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Friday, 8 July 2016 at 08:51
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Swagger.read(json) always failing

 

Hi,

 

My Swagger.read(some json path) always returns some error or returns null.

However, the petstore.json works correctly and returns the swagger object correctly

 

Swagger swagger = new SwaggerParser().read(url); // Does not seem to be working for me

 

Tried with:

1. http://169.44.118.61:8080/TomcatWebAppForChefNode/swagger.json

returns null

 

2. http://watsondop05.rch.stglabs.ibm.com:9106/services/concept_detection/api/swagger/swagger.json

Throws errors like:

java.io.IOException: Invalid Http response

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1343)

at io.swagger.parser.util.RemoteUrl.urlToString(RemoteUrl.java:130)

at io.swagger.parser.Swagger20Parser.read(Swagger20Parser.java:81)

at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:64)

at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:52)

 

3. Works fine with: 

http://petstore.swagger.io/v2/swagger.json returns a swagger object of the entire stuff correctly

 

Please let me know if there is a spec i should be referring to as a template.

 

Regards,

Shreejit

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages