Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ihor Kaharlichenko
swagger-ui-oms
Commits
8158e9b2
Commit
8158e9b2
authored
Sep 14, 2013
by
Tony Tam
Browse files
fix for #310
parent
1b662db2
Changes
2
Hide whitespace changes
Inline
Side-by-side
dist/lib/swagger.js
View file @
8158e9b2
...
...
@@ -55,12 +55,12 @@
error
:
function
(
response
)
{
if
(
_this
.
url
.
substring
(
0
,
4
)
!==
'
http
'
)
{
return
_this
.
fail
(
'
Please specify the protocol for
'
+
_this
.
url
);
}
else
if
(
error
.
status
===
0
)
{
}
else
if
(
response
.
status
===
0
)
{
return
_this
.
fail
(
'
Can
\'
t read from server. It may not have the appropriate access-control-origin settings.
'
);
}
else
if
(
error
.
status
===
404
)
{
}
else
if
(
response
.
status
===
404
)
{
return
_this
.
fail
(
'
Can
\'
t read swagger JSON from
'
+
_this
.
url
);
}
else
{
return
_this
.
fail
(
error
.
status
+
'
:
'
+
error
.
statusText
+
'
'
+
_this
.
url
);
return
_this
.
fail
(
response
.
status
+
'
:
'
+
response
.
statusText
+
'
'
+
_this
.
url
);
}
},
response
:
function
(
rawResponse
)
{
...
...
lib/swagger.js
View file @
8158e9b2
...
...
@@ -55,12 +55,12 @@
error
:
function
(
response
)
{
if
(
_this
.
url
.
substring
(
0
,
4
)
!==
'
http
'
)
{
return
_this
.
fail
(
'
Please specify the protocol for
'
+
_this
.
url
);
}
else
if
(
error
.
status
===
0
)
{
}
else
if
(
response
.
status
===
0
)
{
return
_this
.
fail
(
'
Can
\'
t read from server. It may not have the appropriate access-control-origin settings.
'
);
}
else
if
(
error
.
status
===
404
)
{
}
else
if
(
response
.
status
===
404
)
{
return
_this
.
fail
(
'
Can
\'
t read swagger JSON from
'
+
_this
.
url
);
}
else
{
return
_this
.
fail
(
error
.
status
+
'
:
'
+
error
.
statusText
+
'
'
+
_this
.
url
);
return
_this
.
fail
(
response
.
status
+
'
:
'
+
response
.
statusText
+
'
'
+
_this
.
url
);
}
},
response
:
function
(
rawResponse
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment