why "Can't read from file" when swagger-ui otherwise works?

2,376 views
Skip to first unread message

Feorlen

unread,
Jan 9, 2017, 9:05:10 PM1/9/17
to Swagger
I did a test deployment of my project on a clean VM, with the dist directory in the same location as my other static content. On other machines it's fine, but for some reason Swagger Ui on this one tells me it can't read my YAML file, I get a red error button at the bottom of the page. 

{"schemaValidationMessages":[{"level":"error","message":"Can't read from file http://192.168.16.115:9991/static/swagger/zulip.yaml"}]}

It's certainly reading something, because otherwise everything works. I thought it was the path to the same file elsewhere in my index.html (which I forgot to remove) but I took that out and I still see it. 

Does it have something to do with the internal address? The other test machines are outside the firewall. Any ideas? 

Ron Ratovsky

unread,
Jan 10, 2017, 9:09:06 AM1/10/17
to swagger-sw...@googlegroups.com

It does, yes. The validation is done through a service running in ‘the cloud’ and it cannot access your file.

You can either run your own validator or disable it to avoid the error.

--
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.

frazierj...@yahoo.com

unread,
Jan 10, 2017, 10:08:37 AM1/10/17
to swagger-sw...@googlegroups.com

--------------------------------------------
On Tue, 1/10/17, Ron Ratovsky <r...@swagger.io> wrote:

Subject: Re: why "Can't read from file" when swagger-ui otherwise works?
To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Tuesday, January 10, 2017, 4:09 PM

#yiv9460498720
#yiv9460498720 --

_filtered #yiv9460498720 {font-family:Arial;panose-1:2 11 6
4 2 2 2 2 2 4;}
_filtered #yiv9460498720 {panose-1:2 7 3 9 2 2 5 2 4 4;}
_filtered #yiv9460498720 {panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered #yiv9460498720 {font-family:Calibri;panose-1:2 15
5 2 2 2 4 3 2 4;}
#yiv9460498720
#yiv9460498720 p.yiv9460498720MsoNormal, #yiv9460498720
li.yiv9460498720MsoNormal, #yiv9460498720
div.yiv9460498720MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
#yiv9460498720 a:link, #yiv9460498720
span.yiv9460498720MsoHyperlink
{color:blue;text-decoration:underline;}
#yiv9460498720 a:visited, #yiv9460498720
span.yiv9460498720MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#yiv9460498720 p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;}
#yiv9460498720 pre
{margin:0cm;margin-bottom:.0001pt;font-size:10.0pt;}
#yiv9460498720 span.yiv9460498720HTMLPreformattedChar
{font-family:Courier;}
#yiv9460498720 span.yiv9460498720EmailStyle20
{font-family:Calibri;color:windowtext;}
#yiv9460498720 span.yiv9460498720msoIns
{text-decoration:underline;color:teal;}
#yiv9460498720 .yiv9460498720MsoChpDefault
{font-size:10.0pt;}
_filtered #yiv9460498720 {margin:72.0pt 72.0pt 72.0pt
72.0pt;}
#yiv9460498720 div.yiv9460498720WordSection1
{}
#yiv9460498720 It does, yes.
The validation is done through a service running in ‘the
cloud’ and it cannot access your file.You can either
arda de Fier si a treia in care Armandvirgii Madgeam

Feorlen

unread,
Jan 10, 2017, 10:51:12 AM1/10/17
to Swagger

On Tuesday, January 10, 2017 at 6:09:06 AM UTC-8, Ron wrote:

It does, yes. The validation is done through a service running in ‘the cloud’ and it cannot access your file.

You can either run your own validator or disable it to avoid the error.


That makes sense if the validator isn't local. Although if the message said something like "validator at xyz.com can't read file" it would be clear what is going on.

Thanks.
Reply all
Reply to author
Forward
0 new messages