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
9fccf1c3
Commit
9fccf1c3
authored
Aug 14, 2013
by
Tony Tam
Browse files
updated swagger-client
parent
25805a4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
dist/lib/swagger.js
View file @
9fccf1c3
...
...
@@ -216,8 +216,6 @@
produces
=
[];
consumes
=
[];
this
.
path
=
this
.
api
.
resourcePath
!=
null
?
this
.
api
.
resourcePath
:
resourceObj
.
path
;
console
.
log
(
"
we produce
"
+
resourceObj
.
produces
);
console
.
log
(
'
using path
'
+
this
.
path
);
this
.
description
=
resourceObj
.
description
;
parts
=
this
.
path
.
split
(
"
/
"
);
this
.
name
=
parts
[
parts
.
length
-
1
].
replace
(
'
.{format}
'
,
''
);
...
...
@@ -309,7 +307,7 @@
};
SwaggerResource
.
prototype
.
addOperations
=
function
(
resource_path
,
ops
,
consumes
,
produces
)
{
var
method
,
o
,
op
,
responseMessages
,
type
,
_i
,
_len
,
_results
;
var
method
,
o
,
op
,
ref
,
responseMessages
,
type
,
_i
,
_len
,
_results
;
if
(
ops
)
{
_results
=
[];
for
(
_i
=
0
,
_len
=
ops
.
length
;
_i
<
_len
;
_i
++
)
{
...
...
@@ -327,6 +325,13 @@
produces
=
this
.
produces
;
}
type
=
o
.
type
||
o
.
responseClass
;
if
(
type
===
"
array
"
)
{
ref
=
null
;
if
(
o
.
items
)
{
ref
=
o
.
items
[
"
type
"
]
||
o
.
items
[
"
$ref
"
];
}
type
=
"
array[
"
+
ref
+
"
]
"
;
}
responseMessages
=
o
.
responseMessages
;
method
=
o
.
method
;
if
(
o
.
httpMethod
)
{
...
...
@@ -547,6 +552,7 @@
this
.
method
=
this
.
method
.
toLowerCase
();
this
.
isGetMethod
=
this
.
method
===
"
get
"
;
this
.
resourceName
=
this
.
resource
.
name
;
console
.
log
(
"
model type:
"
+
type
);
if
(((
_ref
=
this
.
type
)
!=
null
?
_ref
.
toLowerCase
()
:
void
0
)
===
'
void
'
)
{
this
.
type
=
void
0
;
}
...
...
lib/swagger.js
View file @
9fccf1c3
...
...
@@ -216,8 +216,6 @@
produces
=
[];
consumes
=
[];
this
.
path
=
this
.
api
.
resourcePath
!=
null
?
this
.
api
.
resourcePath
:
resourceObj
.
path
;
console
.
log
(
"
we produce
"
+
resourceObj
.
produces
);
console
.
log
(
'
using path
'
+
this
.
path
);
this
.
description
=
resourceObj
.
description
;
parts
=
this
.
path
.
split
(
"
/
"
);
this
.
name
=
parts
[
parts
.
length
-
1
].
replace
(
'
.{format}
'
,
''
);
...
...
@@ -309,7 +307,7 @@
};
SwaggerResource
.
prototype
.
addOperations
=
function
(
resource_path
,
ops
,
consumes
,
produces
)
{
var
method
,
o
,
op
,
responseMessages
,
type
,
_i
,
_len
,
_results
;
var
method
,
o
,
op
,
ref
,
responseMessages
,
type
,
_i
,
_len
,
_results
;
if
(
ops
)
{
_results
=
[];
for
(
_i
=
0
,
_len
=
ops
.
length
;
_i
<
_len
;
_i
++
)
{
...
...
@@ -327,6 +325,13 @@
produces
=
this
.
produces
;
}
type
=
o
.
type
||
o
.
responseClass
;
if
(
type
===
"
array
"
)
{
ref
=
null
;
if
(
o
.
items
)
{
ref
=
o
.
items
[
"
type
"
]
||
o
.
items
[
"
$ref
"
];
}
type
=
"
array[
"
+
ref
+
"
]
"
;
}
responseMessages
=
o
.
responseMessages
;
method
=
o
.
method
;
if
(
o
.
httpMethod
)
{
...
...
@@ -547,6 +552,7 @@
this
.
method
=
this
.
method
.
toLowerCase
();
this
.
isGetMethod
=
this
.
method
===
"
get
"
;
this
.
resourceName
=
this
.
resource
.
name
;
console
.
log
(
"
model type:
"
+
type
);
if
(((
_ref
=
this
.
type
)
!=
null
?
_ref
.
toLowerCase
()
:
void
0
)
===
'
void
'
)
{
this
.
type
=
void
0
;
}
...
...
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