mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-05 23:20:52 +00:00
rollback swagger-static template
This commit is contained in:
parent
f2ee63da3b
commit
d8060f47a8
File diff suppressed because it is too large
Load Diff
@ -67,7 +67,7 @@ sub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: auto \9;
|
width: auto\9;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@ -144,56 +144,45 @@ textarea {
|
|||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
a,
|
a,
|
||||||
a:visited {
|
a:visited {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
a[href]:after {
|
a[href]:after {
|
||||||
content: " (" attr(href) ")";
|
content: " (" attr(href) ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr[title]:after {
|
abbr[title]:after {
|
||||||
content: " (" attr(title) ")";
|
content: " (" attr(title) ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
.ir a:after,
|
.ir a:after,
|
||||||
a[href^="javascript:"]:after,
|
a[href^="javascript:"]:after,
|
||||||
a[href^="#"]:after {
|
a[href^="#"]:after {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
pre,
|
pre,
|
||||||
blockquote {
|
blockquote {
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
display: table-header-group;
|
display: table-header-group;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr,
|
tr,
|
||||||
img {
|
img {
|
||||||
page-break-inside: avoid;
|
page-break-inside: avoid;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
margin: 0.5cm;
|
margin: 0.5cm;
|
||||||
}
|
}
|
||||||
|
|
||||||
p,
|
p,
|
||||||
h2,
|
h2,
|
||||||
h3 {
|
h3 {
|
||||||
orphans: 3;
|
orphans: 3;
|
||||||
widows: 3;
|
widows: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3 {
|
h3 {
|
||||||
page-break-after: avoid;
|
page-break-after: avoid;
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
color: rgb(57, 57, 57);
|
color: rgb(57,57,57);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@ -157,7 +157,7 @@ li.parameter {
|
|||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.param {
|
.param{
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,6 @@ li.parameter {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.param-type {
|
.param-type {
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
@ -34,14 +34,14 @@
|
|||||||
|
|
||||||
var el = document.createElement('bootstrap')
|
var el = document.createElement('bootstrap')
|
||||||
, transEndEventNames = {
|
, transEndEventNames = {
|
||||||
'WebkitTransition': 'webkitTransitionEnd'
|
'WebkitTransition' : 'webkitTransitionEnd'
|
||||||
, 'MozTransition': 'transitionend'
|
, 'MozTransition' : 'transitionend'
|
||||||
, 'OTransition': 'oTransitionEnd otransitionend'
|
, 'OTransition' : 'oTransitionEnd otransitionend'
|
||||||
, 'transition': 'transitionend'
|
, 'transition' : 'transitionend'
|
||||||
}
|
}
|
||||||
, name
|
, name
|
||||||
|
|
||||||
for (name in transEndEventNames) {
|
for (name in transEndEventNames){
|
||||||
if (el.style[name] !== undefined) {
|
if (el.style[name] !== undefined) {
|
||||||
return transEndEventNames[name]
|
return transEndEventNames[name]
|
||||||
}
|
}
|
||||||
@ -57,8 +57,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ==========================================================
|
||||||
/* ==========================================================
|
|
||||||
* bootstrap-alert.js v2.2.2
|
* bootstrap-alert.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||||
* ==========================================================
|
* ==========================================================
|
||||||
@ -156,8 +155,7 @@
|
|||||||
|
|
||||||
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ============================================================
|
||||||
/* ============================================================
|
|
||||||
* bootstrap-button.js v2.2.2
|
* bootstrap-button.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||||
* ============================================================
|
* ============================================================
|
||||||
@ -261,8 +259,7 @@
|
|||||||
$btn.button('toggle')
|
$btn.button('toggle')
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ==========================================================
|
||||||
/* ==========================================================
|
|
||||||
* bootstrap-carousel.js v2.2.2
|
* bootstrap-carousel.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||||
* ==========================================================
|
* ==========================================================
|
||||||
@ -382,9 +379,7 @@
|
|||||||
$next.removeClass([type, direction].join(' ')).addClass('active')
|
$next.removeClass([type, direction].join(' ')).addClass('active')
|
||||||
$active.removeClass(['active', direction].join(' '))
|
$active.removeClass(['active', direction].join(' '))
|
||||||
that.sliding = false
|
that.sliding = false
|
||||||
setTimeout(function () {
|
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
||||||
that.$element.trigger('slid')
|
|
||||||
}, 0)
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$element.trigger(e)
|
this.$element.trigger(e)
|
||||||
@ -448,8 +443,7 @@
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* =============================================================
|
||||||
/* =============================================================
|
|
||||||
* bootstrap-collapse.js v2.2.2
|
* bootstrap-collapse.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||||
* =============================================================
|
* =============================================================
|
||||||
@ -615,8 +609,7 @@
|
|||||||
$(target).collapse(option)
|
$(target).collapse(option)
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ============================================================
|
||||||
/* ============================================================
|
|
||||||
* bootstrap-dropdown.js v2.2.2
|
* bootstrap-dropdown.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||||||
* ============================================================
|
* ============================================================
|
||||||
@ -771,17 +764,12 @@
|
|||||||
|
|
||||||
$(document)
|
$(document)
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
||||||
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) {
|
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
e.stopPropagation()
|
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
|
||||||
})
|
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||||
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) {
|
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||||
e.stopPropagation()
|
|
||||||
})
|
|
||||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
|
||||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown)
|
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* =========================================================
|
||||||
/* =========================================================
|
|
||||||
* bootstrap-modal.js v2.2.2
|
* bootstrap-modal.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||||
* =========================================================
|
* =========================================================
|
||||||
@ -857,9 +845,7 @@
|
|||||||
that.enforceFocus()
|
that.enforceFocus()
|
||||||
|
|
||||||
transition ?
|
transition ?
|
||||||
that.$element.one($.support.transition.end, function () {
|
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||||
that.$element.focus().trigger('shown')
|
|
||||||
}) :
|
|
||||||
that.$element.focus().trigger('shown')
|
that.$element.focus().trigger('shown')
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -903,7 +889,7 @@
|
|||||||
, escape: function () {
|
, escape: function () {
|
||||||
var that = this
|
var that = this
|
||||||
if (this.isShown && this.options.keyboard) {
|
if (this.isShown && this.options.keyboard) {
|
||||||
this.$element.on('keyup.dismiss.modal', function (e) {
|
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
||||||
e.which == 27 && that.hide()
|
e.which == 27 && that.hide()
|
||||||
})
|
})
|
||||||
} else if (!this.isShown) {
|
} else if (!this.isShown) {
|
||||||
@ -964,7 +950,7 @@
|
|||||||
} else if (!this.isShown && this.$backdrop) {
|
} else if (!this.isShown && this.$backdrop) {
|
||||||
this.$backdrop.removeClass('in')
|
this.$backdrop.removeClass('in')
|
||||||
|
|
||||||
$.support.transition && this.$element.hasClass('fade') ?
|
$.support.transition && this.$element.hasClass('fade')?
|
||||||
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
||||||
this.removeBackdrop()
|
this.removeBackdrop()
|
||||||
|
|
||||||
@ -1016,7 +1002,7 @@
|
|||||||
var $this = $(this)
|
var $this = $(this)
|
||||||
, href = $this.attr('href')
|
, href = $this.attr('href')
|
||||||
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||||
, option = $target.data('modal') ? 'toggle' : $.extend({remote: !/#/.test(href) && href}, $target.data(), $this.data())
|
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
||||||
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
@ -1084,7 +1070,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.options.selector ?
|
this.options.selector ?
|
||||||
(this._options = $.extend({}, this.options, {trigger: 'manual', selector: ''})) :
|
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
||||||
this.fixTitle()
|
this.fixTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,7 +1094,7 @@
|
|||||||
|
|
||||||
clearTimeout(this.timeout)
|
clearTimeout(this.timeout)
|
||||||
self.hoverState = 'in'
|
self.hoverState = 'in'
|
||||||
this.timeout = setTimeout(function () {
|
this.timeout = setTimeout(function() {
|
||||||
if (self.hoverState == 'in') self.show()
|
if (self.hoverState == 'in') self.show()
|
||||||
}, self.options.delay.show)
|
}, self.options.delay.show)
|
||||||
}
|
}
|
||||||
@ -1120,7 +1106,7 @@
|
|||||||
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
||||||
|
|
||||||
self.hoverState = 'out'
|
self.hoverState = 'out'
|
||||||
this.timeout = setTimeout(function () {
|
this.timeout = setTimeout(function() {
|
||||||
if (self.hoverState == 'out') self.hide()
|
if (self.hoverState == 'out') self.hide()
|
||||||
}, self.options.delay.hide)
|
}, self.options.delay.hide)
|
||||||
}
|
}
|
||||||
@ -1150,7 +1136,7 @@
|
|||||||
|
|
||||||
$tip
|
$tip
|
||||||
.detach()
|
.detach()
|
||||||
.css({top: 0, left: 0, display: 'block'})
|
.css({ top: 0, left: 0, display: 'block' })
|
||||||
.insertAfter(this.$element)
|
.insertAfter(this.$element)
|
||||||
|
|
||||||
pos = this.getPosition(inside)
|
pos = this.getPosition(inside)
|
||||||
@ -1282,7 +1268,7 @@
|
|||||||
|
|
||||||
var old = $.fn.tooltip
|
var old = $.fn.tooltip
|
||||||
|
|
||||||
$.fn.tooltip = function (option) {
|
$.fn.tooltip = function ( option ) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var $this = $(this)
|
var $this = $(this)
|
||||||
, data = $this.data('tooltip')
|
, data = $this.data('tooltip')
|
||||||
@ -1314,8 +1300,7 @@
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ===========================================================
|
||||||
/* ===========================================================
|
|
||||||
* bootstrap-popover.js v2.2.2
|
* bootstrap-popover.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||||
* ===========================================================
|
* ===========================================================
|
||||||
@ -1412,14 +1397,11 @@
|
|||||||
|
|
||||||
$.fn.popover.Constructor = Popover
|
$.fn.popover.Constructor = Popover
|
||||||
|
|
||||||
$.fn.popover.defaults = $.extend({}, $.fn.tooltip.defaults, {
|
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
||||||
placement: 'right'
|
placement: 'right'
|
||||||
,
|
, trigger: 'click'
|
||||||
trigger: 'click'
|
, content: ''
|
||||||
,
|
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
||||||
content: ''
|
|
||||||
,
|
|
||||||
template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -1431,8 +1413,7 @@
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* =============================================================
|
||||||
/* =============================================================
|
|
||||||
* bootstrap-scrollspy.js v2.2.2
|
* bootstrap-scrollspy.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||||
* =============================================================
|
* =============================================================
|
||||||
@ -1493,11 +1474,9 @@
|
|||||||
, $href = /^#\w/.test(href) && $(href)
|
, $href = /^#\w/.test(href) && $(href)
|
||||||
return ( $href
|
return ( $href
|
||||||
&& $href.length
|
&& $href.length
|
||||||
&& [[$href.position().top + self.$scrollElement.scrollTop(), href]] ) || null
|
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
||||||
})
|
|
||||||
.sort(function (a, b) {
|
|
||||||
return a[0] - b[0]
|
|
||||||
})
|
})
|
||||||
|
.sort(function (a, b) { return a[0] - b[0] })
|
||||||
.each(function () {
|
.each(function () {
|
||||||
self.offsets.push(this[0])
|
self.offsets.push(this[0])
|
||||||
self.targets.push(this[1])
|
self.targets.push(this[1])
|
||||||
@ -1515,14 +1494,14 @@
|
|||||||
|
|
||||||
if (scrollTop >= maxScroll) {
|
if (scrollTop >= maxScroll) {
|
||||||
return activeTarget != (i = targets.last()[0])
|
return activeTarget != (i = targets.last()[0])
|
||||||
&& this.activate(i)
|
&& this.activate ( i )
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = offsets.length; i--;) {
|
for (i = offsets.length; i--;) {
|
||||||
activeTarget != targets[i]
|
activeTarget != targets[i]
|
||||||
&& scrollTop >= offsets[i]
|
&& scrollTop >= offsets[i]
|
||||||
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
||||||
&& this.activate(targets[i])
|
&& this.activate( targets[i] )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1595,8 +1574,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* ========================================================
|
||||||
/* ========================================================
|
|
||||||
* bootstrap-tab.js v2.2.2
|
* bootstrap-tab.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||||
* ========================================================
|
* ========================================================
|
||||||
@ -1645,7 +1623,7 @@
|
|||||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this.parent('li').hasClass('active')) return
|
if ( $this.parent('li').hasClass('active') ) return
|
||||||
|
|
||||||
previous = $ul.find('.active:last a')[0]
|
previous = $ul.find('.active:last a')[0]
|
||||||
|
|
||||||
@ -1668,7 +1646,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
, activate: function (element, container, callback) {
|
, activate: function ( element, container, callback) {
|
||||||
var $active = container.find('> .active')
|
var $active = container.find('> .active')
|
||||||
, transition = callback
|
, transition = callback
|
||||||
&& $.support.transition
|
&& $.support.transition
|
||||||
@ -1689,7 +1667,7 @@
|
|||||||
element.removeClass('fade')
|
element.removeClass('fade')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.parent('.dropdown-menu')) {
|
if ( element.parent('.dropdown-menu') ) {
|
||||||
element.closest('li.dropdown').addClass('active')
|
element.closest('li.dropdown').addClass('active')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1710,7 +1688,7 @@
|
|||||||
|
|
||||||
var old = $.fn.tab
|
var old = $.fn.tab
|
||||||
|
|
||||||
$.fn.tab = function (option) {
|
$.fn.tab = function ( option ) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
var $this = $(this)
|
var $this = $(this)
|
||||||
, data = $this.data('tab')
|
, data = $this.data('tab')
|
||||||
@ -1739,8 +1717,7 @@
|
|||||||
$(this).tab('show')
|
$(this).tab('show')
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);
|
}(window.jQuery);/* =============================================================
|
||||||
/* =============================================================
|
|
||||||
* bootstrap-typeahead.js v2.2.2
|
* bootstrap-typeahead.js v2.2.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||||
* =============================================================
|
* =============================================================
|
||||||
@ -1760,7 +1737,7 @@
|
|||||||
* ============================================================ */
|
* ============================================================ */
|
||||||
|
|
||||||
|
|
||||||
!function ($) {
|
!function($){
|
||||||
|
|
||||||
"use strict"; // jshint ;_;
|
"use strict"; // jshint ;_;
|
||||||
|
|
||||||
@ -1927,7 +1904,7 @@
|
|||||||
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
||||||
}
|
}
|
||||||
|
|
||||||
, eventSupported: function (eventName) {
|
, eventSupported: function(eventName) {
|
||||||
var isSupported = eventName in this.$element
|
var isSupported = eventName in this.$element
|
||||||
if (!isSupported) {
|
if (!isSupported) {
|
||||||
this.$element.setAttribute(eventName, 'return;')
|
this.$element.setAttribute(eventName, 'return;')
|
||||||
@ -1939,7 +1916,7 @@
|
|||||||
, move: function (e) {
|
, move: function (e) {
|
||||||
if (!this.shown) return
|
if (!this.shown) return
|
||||||
|
|
||||||
switch (e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
case 27: // escape
|
case 27: // escape
|
||||||
@ -1961,7 +1938,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, keydown: function (e) {
|
, keydown: function (e) {
|
||||||
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40, 38, 9, 13, 27])
|
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||||
this.move(e)
|
this.move(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1971,7 +1948,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, keyup: function (e) {
|
, keyup: function (e) {
|
||||||
switch (e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 40: // down arrow
|
case 40: // down arrow
|
||||||
case 38: // up arrow
|
case 38: // up arrow
|
||||||
case 16: // shift
|
case 16: // shift
|
||||||
@ -2000,9 +1977,7 @@
|
|||||||
|
|
||||||
, blur: function (e) {
|
, blur: function (e) {
|
||||||
var that = this
|
var that = this
|
||||||
setTimeout(function () {
|
setTimeout(function () { that.hide() }, 150)
|
||||||
that.hide()
|
|
||||||
}, 150)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
, click: function (e) {
|
, click: function (e) {
|
||||||
@ -2097,9 +2072,7 @@
|
|||||||
this.options = $.extend({}, $.fn.affix.defaults, options)
|
this.options = $.extend({}, $.fn.affix.defaults, options)
|
||||||
this.$window = $(window)
|
this.$window = $(window)
|
||||||
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
||||||
.on('click.affix.data-api', $.proxy(function () {
|
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
|
||||||
setTimeout($.proxy(this.checkPosition, this), 1)
|
|
||||||
}, this))
|
|
||||||
this.$element = $(element)
|
this.$element = $(element)
|
||||||
this.checkPosition()
|
this.checkPosition()
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
window.onhashchange = function () {
|
window.onhashchange = function() {
|
||||||
choose(window.location.href.toString());
|
choose(window.location.href.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6,20 +6,20 @@ var selectionImage;
|
|||||||
|
|
||||||
function choose(url) {
|
function choose(url) {
|
||||||
var f = url.split("/").slice(-1)[0].split("?")[0];
|
var f = url.split("/").slice(-1)[0].split("?")[0];
|
||||||
if (f.match(/#/g) && f.match(/#/g).length > 0) {
|
if(f.match(/#/g) && f.match(/#/g).length > 0) {
|
||||||
f = f.split("#")[0];
|
f = f.split("#")[0];
|
||||||
}
|
}
|
||||||
$('div.non-sidebar').empty();
|
$('div.non-sidebar').empty();
|
||||||
$('div.non-sidebar').load("operations/" + f + ".html", function () {
|
$('div.non-sidebar').load("operations/" + f + ".html", function(){
|
||||||
goToAnchor();
|
goToAnchor();
|
||||||
// rebind the models
|
// rebind the models
|
||||||
$(".model a").on("click", function (e) {
|
$(".model a").on("click", function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var model = $(this).parent().attr("data-model")
|
var model = $(this).parent().attr("data-model")
|
||||||
var parentOffset = $(this).parent().offset();
|
var parentOffset = $(this).parent().offset();
|
||||||
var encodedWord = encodeURI(model);
|
var encodedWord = encodeURI(model);
|
||||||
|
|
||||||
if (!selectionImage) {
|
if(!selectionImage) {
|
||||||
selectionImage = $('<div>').attr({
|
selectionImage = $('<div>').attr({
|
||||||
title: 'Model detail',
|
title: 'Model detail',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
@ -29,7 +29,7 @@ function choose(url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectionImage.load("models/" + encodedWord + ".html")
|
selectionImage.load("models/" + encodedWord + ".html")
|
||||||
selectionImage.attr('href', url.replace('{term}', encodeURI(model))).css({
|
selectionImage.attr('href',url.replace('{term}',encodeURI(model))).css({
|
||||||
left: e.pageX + 20,
|
left: e.pageX + 20,
|
||||||
top: e.pageY - 10,
|
top: e.pageY - 10,
|
||||||
position: "absolute"
|
position: "absolute"
|
||||||
@ -37,10 +37,10 @@ function choose(url) {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on("click", function (e) {
|
$("body").on("click",function(e) {
|
||||||
var target = $(e.target);
|
var target = $(e.target);
|
||||||
if (target.parents(".model-detail-popup").length == 0 && target.parents('.model').length != 1) {
|
if (target.parents(".model-detail-popup").length == 0 && target.parents('.model').length != 1) {
|
||||||
if (document.querySelector('.model-detail-popup')) {
|
if(document.querySelector('.model-detail-popup')) {
|
||||||
document.querySelector('.model-detail-popup').style.display = 'none';
|
document.querySelector('.model-detail-popup').style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -50,20 +50,21 @@ function choose(url) {
|
|||||||
function goToAnchor() {
|
function goToAnchor() {
|
||||||
var doARead = $($('a')[0]).offset();
|
var doARead = $($('a')[0]).offset();
|
||||||
var anchorArr = window.location.href.toString().split("#");
|
var anchorArr = window.location.href.toString().split("#");
|
||||||
if (anchorArr.length > 2) {
|
if(anchorArr.length > 2) {
|
||||||
var anchor = anchorArr[anchorArr.length - 1];
|
var anchor = anchorArr[anchorArr.length-1];
|
||||||
window.scrollTo(0, $('a[name=' + anchor + ']').offset().top - 80);
|
window.scrollTo(0,$('a[name='+anchor+']').offset().top - 80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function resize() {
|
function resize()
|
||||||
$(".sidebar").css('height', $(window).height() - 60);
|
{
|
||||||
$("#content-window").css('height', $(window).height() - 60);
|
$(".sidebar").css('height', $(window).height() -60);
|
||||||
|
$("#content-window").css('height', $(window).height() -60);
|
||||||
|
|
||||||
}
|
}
|
||||||
$(function () {
|
$(function(){
|
||||||
window.onresize = resize;
|
window.onresize = resize;
|
||||||
resize();
|
resize();
|
||||||
$(window).bind('hashchange', function () {
|
$(window).bind('hashchange', function() {
|
||||||
choose(window.location.href.toString());
|
choose(window.location.href.toString());
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css" media="screen">
|
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css" media="screen">
|
||||||
@ -12,13 +12,13 @@
|
|||||||
<title>REST API Resources</title>
|
<title>REST API Resources</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="top-bar">
|
<div class="top-bar">
|
||||||
<h1 id="logo"><a class="logo" href="/"><span>Swagger</span><span class="light">API Docs</span></a></h1>
|
<h1 id="logo"><a class="logo" href="/"><span>Swagger</span><span class="light">API Docs</span></a></h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="model-container"></div>
|
<div class="model-container"></div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="box clearfix">
|
<div class="box clearfix">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="section-box">
|
<div class="section-box">
|
||||||
@ -49,9 +49,7 @@
|
|||||||
<div class="non-sidebar">
|
<div class="non-sidebar">
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<h2>Getting Started</h2>
|
<h2>Getting Started</h2>
|
||||||
|
|
||||||
<p>To begin using your fancy HTTP API, follow the steps below.</p>
|
<p>To begin using your fancy HTTP API, follow the steps below.</p>
|
||||||
|
|
||||||
<p>You can add some helpful tips, here</p>
|
<p>You can add some helpful tips, here</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}
|
{{#model}}
|
||||||
|
|
||||||
<h2>{{classname}}</h2>
|
<h2>{{classname}}</h2>
|
||||||
{{#vars}}
|
{{#vars}}
|
||||||
<ul class="parameter">
|
<ul class="parameter">
|
||||||
<li class="param-required-{{required}}">{{name}} : {{datatype}}
|
<li class="param-required-{{required}}">{{name}} : {{datatype}}
|
||||||
<br/>{{description}}
|
<br/>{{description}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<h2><a name="{{className}}"></a>{{className}}</h2>
|
<h2><a name="{{className}}"></a>{{className}}</h2>
|
||||||
|
|
||||||
<p>This is the {{className}} API</p>
|
<p>This is the {{className}} API</p>
|
||||||
|
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
@ -11,12 +10,9 @@
|
|||||||
{{#notes}}<p>{{notes}}</p>{{/notes}}
|
{{#notes}}<p>{{notes}}</p>{{/notes}}
|
||||||
<h3 class="section">URL</h3>
|
<h3 class="section">URL</h3>
|
||||||
<code>{{basePath}}{{path}}</code>
|
<code>{{basePath}}{{path}}</code>
|
||||||
|
|
||||||
<h3 class="section">HTTP Method</h3>
|
<h3 class="section">HTTP Method</h3>
|
||||||
<code>{{httpMethod}}</code>
|
<code>{{httpMethod}}</code>
|
||||||
|
|
||||||
<h3 class="section">Response Type</h3>
|
<h3 class="section">Response Type</h3>
|
||||||
|
|
||||||
<div class="model" data-model="{{returnBaseType}}"><a href="">{{returnType}}</a></div>
|
<div class="model" data-model="{{returnBaseType}}"><a href="">{{returnType}}</a></div>
|
||||||
<h3 class="section">Parameters</h3>
|
<h3 class="section">Parameters</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "swagger-docs",
|
"name": "swagger-docs",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.8.x"
|
"node": ">= 0.8.x"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "3.x"
|
"express": "3.x"
|
||||||
},
|
},
|
||||||
"license": "apache 2.0"
|
"license": "apache 2.0"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user