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
cd4fa99c
Commit
cd4fa99c
authored
Sep 09, 2013
by
Tony Tam
Browse files
added resource description
parent
bc932401
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
dist/swagger-ui.js
View file @
cd4fa99c
...
...
@@ -1033,8 +1033,13 @@ function program4(depth0,data) {
templates
[
'
resource
'
]
=
template
(
function
(
Handlebars
,
depth0
,
helpers
,
partials
,
data
)
{
this
.
compilerInfo
=
[
4
,
'
>= 1.0.0
'
];
helpers
=
this
.
merge
(
helpers
,
Handlebars
.
helpers
);
data
=
data
||
{};
var
buffer
=
""
,
stack1
,
functionType
=
"
function
"
,
escapeExpression
=
this
.
escapeExpression
;
var
buffer
=
""
,
stack1
,
options
,
functionType
=
"
function
"
,
escapeExpression
=
this
.
escapeExpression
,
self
=
this
,
blockHelperMissing
=
helpers
.
blockHelperMissing
;
function
program1
(
depth0
,
data
)
{
return
"
:
"
;
}
buffer
+=
"
<div class='heading'>
\n
<h2>
\n
<a href='#!/
"
;
if
(
stack1
=
helpers
.
name
)
{
stack1
=
stack1
.
call
(
depth0
,
{
hash
:{},
data
:
data
});
}
...
...
@@ -1048,7 +1053,16 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if
(
stack1
=
helpers
.
name
)
{
stack1
=
stack1
.
call
(
depth0
,
{
hash
:{},
data
:
data
});
}
else
{
stack1
=
depth0
.
name
;
stack1
=
typeof
stack1
===
functionType
?
stack1
.
apply
(
depth0
)
:
stack1
;
}
buffer
+=
escapeExpression
(
stack1
)
+
"
</a>
\n
</h2>
\n
<ul class='options'>
\n
<li>
\n
<a href='#!/
"
;
+
"
</a>
"
;
options
=
{
hash
:{},
inverse
:
self
.
noop
,
fn
:
self
.
program
(
1
,
program1
,
data
),
data
:
data
};
if
(
stack1
=
helpers
.
description
)
{
stack1
=
stack1
.
call
(
depth0
,
options
);
}
else
{
stack1
=
depth0
.
description
;
stack1
=
typeof
stack1
===
functionType
?
stack1
.
apply
(
depth0
)
:
stack1
;
}
if
(
!
helpers
.
description
)
{
stack1
=
blockHelperMissing
.
call
(
depth0
,
stack1
,
options
);
}
if
(
stack1
||
stack1
===
0
)
{
buffer
+=
stack1
;
}
if
(
stack1
=
helpers
.
description
)
{
stack1
=
stack1
.
call
(
depth0
,
{
hash
:{},
data
:
data
});
}
else
{
stack1
=
depth0
.
description
;
stack1
=
typeof
stack1
===
functionType
?
stack1
.
apply
(
depth0
)
:
stack1
;
}
if
(
stack1
||
stack1
===
0
)
{
buffer
+=
stack1
;
}
buffer
+=
"
\n
</h2>
\n
<ul class='options'>
\n
<li>
\n
<a href='#!/
"
;
if
(
stack1
=
helpers
.
name
)
{
stack1
=
stack1
.
call
(
depth0
,
{
hash
:{},
data
:
data
});
}
else
{
stack1
=
depth0
.
name
;
stack1
=
typeof
stack1
===
functionType
?
stack1
.
apply
(
depth0
)
:
stack1
;
}
buffer
+=
escapeExpression
(
stack1
)
...
...
@@ -1421,6 +1435,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
ResourceView
.
prototype
.
render
=
function
()
{
var
operation
,
_i
,
_len
,
_ref
;
console
.
log
(
this
.
model
.
description
);
$
(
this
.
el
).
html
(
Handlebars
.
templates
.
resource
(
this
.
model
));
this
.
number
=
0
;
_ref
=
this
.
model
.
operationsArray
;
...
...
dist/swagger-ui.min.js
View file @
cd4fa99c
This diff is collapsed.
Click to expand it.
src/main/coffeescript/view/ResourceView.coffee
View file @
cd4fa99c
...
...
@@ -2,6 +2,7 @@ class ResourceView extends Backbone.View
initialize
:
->
render
:
->
console
.
log
@
model
.
description
$
(
@
el
).
html
(
Handlebars
.
templates
.
resource
(
@
model
))
@
number
=
0
...
...
src/main/template/resource.handlebars
View file @
cd4fa99c
<div
class=
'heading'
>
<h2>
<a
href=
'#!/
{{
name
}}
'
onclick=
"Docs.toggleEndpointListForResource('
{{
name
}}
');"
>
{{
name
}}
</a>
<a
href=
'#!/
{{
name
}}
'
onclick=
"Docs.toggleEndpointListForResource('
{{
name
}}
');"
>
{{
name
}}
</a>
{{#
description
}}
:
{{/
description
}}{{{
description
}}}
</h2>
<ul
class=
'options'
>
<li>
...
...
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