├── test ├── mocha.opts ├── .jshintrc ├── e2e │ ├── driver.js │ ├── servers.js │ ├── v1.js │ └── v2.js └── specs │ └── v1.2 │ └── petstore │ ├── api-docs.json │ └── store.json ├── src └── main │ ├── template │ ├── sidebar_item.handlebars │ ├── resource.handlebars │ ├── sidebar_header.handlebars │ ├── content_type.handlebars │ ├── status_code.handlebars │ ├── bearer_button_view.handlebars │ ├── apikeys.handlebars │ ├── apikey_button_view.handlebars │ ├── response_content_type.handlebars │ ├── parameter_content_type.handlebars │ ├── basic_auth_button_view.handlebars │ ├── signature.handlebars │ ├── param.handlebars │ ├── main.handlebars │ └── operation.handlebars │ ├── scss │ ├── include │ │ ├── _common.scss │ │ ├── _header.scss │ │ ├── _scrolling_sidebar.scss │ │ ├── _explorer.scss │ │ ├── _sidebar.scss │ │ └── _highlighter.scss │ └── style.scss │ ├── vendor │ └── bootstrap │ │ └── scss │ │ ├── utilities │ │ ├── _clearfix.scss │ │ ├── _screenreaders.scss │ │ ├── _visibility.scss │ │ ├── _sizing.scss │ │ ├── _float.scss │ │ ├── _align.scss │ │ ├── _background.scss │ │ ├── _position.scss │ │ ├── _embed.scss │ │ ├── _borders.scss │ │ ├── _display.scss │ │ ├── _text.scss │ │ ├── _spacing.scss │ │ └── _flex.scss │ │ ├── _media.scss │ │ ├── mixins │ │ ├── _box-shadow.scss │ │ ├── _clearfix.scss │ │ ├── _size.scss │ │ ├── _visibility.scss │ │ ├── _lists.scss │ │ ├── _text-truncate.scss │ │ ├── _resize.scss │ │ ├── _transition.scss │ │ ├── _float.scss │ │ ├── _nav-divider.scss │ │ ├── _text-hide.scss │ │ ├── _badge.scss │ │ ├── _alert.scss │ │ ├── _text-emphasis.scss │ │ ├── _navbar-align.scss │ │ ├── _pagination.scss │ │ ├── _background-variant.scss │ │ ├── _list-group.scss │ │ ├── _reset-text.scss │ │ ├── _table-row.scss │ │ ├── _border-radius.scss │ │ ├── _screen-reader.scss │ │ ├── _hover.scss │ │ ├── _image.scss │ │ ├── _caret.scss │ │ ├── _grid.scss │ │ ├── _grid-framework.scss │ │ ├── _gradients.scss │ │ ├── _buttons.scss │ │ ├── _forms.scss │ │ └── _breakpoints.scss │ │ ├── _jumbotron.scss │ │ ├── _utilities.scss │ │ ├── bootstrap-reboot.scss │ │ ├── _transitions.scss │ │ ├── _root.scss │ │ ├── bootstrap-grid.scss │ │ ├── _progress.scss │ │ ├── _close.scss │ │ ├── bootstrap.scss │ │ ├── _badge.scss │ │ ├── _mixins.scss │ │ ├── _grid.scss │ │ ├── _code.scss │ │ ├── _alert.scss │ │ ├── _images.scss │ │ ├── _breadcrumb.scss │ │ ├── _pagination.scss │ │ ├── _nav.scss │ │ ├── _type.scss │ │ ├── _print.scss │ │ ├── _functions.scss │ │ ├── _tooltip.scss │ │ ├── _list-group.scss │ │ ├── _buttons.scss │ │ ├── _dropdown.scss │ │ ├── _tables.scss │ │ ├── _button-group.scss │ │ ├── _carousel.scss │ │ ├── _popover.scss │ │ ├── _modal.scss │ │ └── _input-group.scss │ ├── javascript │ ├── view │ │ ├── ResponseContentTypeView.js │ │ ├── ContentTypeView.js │ │ ├── SidebarItemView.js │ │ ├── ParameterContentTypeView.js │ │ ├── SignatureView.js │ │ ├── BasicAuthButton.js │ │ ├── StatusCodeView.js │ │ ├── BearerButton.js │ │ ├── ApiKeyButton.js │ │ ├── ApiKeys.js │ │ ├── SidebarHeaderView.js │ │ ├── ResourceView.js │ │ ├── ParameterView.js │ │ └── MainView.js │ ├── doc.js │ └── helpers │ │ └── handlebars.js │ └── html │ ├── assets │ └── o2c.html │ └── index.html ├── .dockerignore ├── .jshintignore ├── bootstrap-swagger-ui.jpg ├── bootstrap-swagger-ui-mobile.jpg ├── .npmignore ├── index.js ├── .gitignore ├── .travis.yml ├── .gitattributes ├── dist ├── assets │ ├── o2c.html │ └── lib │ │ ├── jquery.wiggle.min.js │ │ └── scrollPosStyler.min.js └── index.html ├── bower.json ├── CONTRIBUTING.md ├── Dockerfile ├── lib ├── jquery.wiggle.min.js └── scrollPosStyler.min.js ├── .jshintrc ├── LICENSE ├── package.json ├── README.md └── gulpfile.js /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive --timeout 5000 -------------------------------------------------------------------------------- /src/main/template/sidebar_item.handlebars: -------------------------------------------------------------------------------- 1 | {{summary}} 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | node_modules 3 | bower_components 4 | *.swp 5 | -------------------------------------------------------------------------------- /src/main/scss/include/_common.scss: -------------------------------------------------------------------------------- 1 | .modal-title{ 2 | width: 100%; 3 | } -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | src/main/javascript/doc.js 3 | dist 4 | lib 5 | .log -------------------------------------------------------------------------------- /src/main/template/resource.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
-------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | .clearfix { 2 | @include clearfix(); 3 | } 4 | -------------------------------------------------------------------------------- /src/main/scss/include/_header.scss: -------------------------------------------------------------------------------- 1 | #main-nav{ 2 | .form-inline{ 3 | min-width: 340px; 4 | } 5 | } -------------------------------------------------------------------------------- /bootstrap-swagger-ui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgarcia86/bootstrap-swagger-ui/master/bootstrap-swagger-ui.jpg -------------------------------------------------------------------------------- /bootstrap-swagger-ui-mobile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgarcia86/bootstrap-swagger-ui/master/bootstrap-swagger-ui-mobile.jpg -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | display: flex; 3 | align-items: flex-start; 4 | } 5 | 6 | .media-body { 7 | flex: 1; 8 | } 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | *.sublime-* 2 | example.html 3 | *.tgz 4 | .classpath 5 | .project 6 | .npmignore 7 | dist/sample.html 8 | dist/spec.js 9 | node_modules 10 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | @if $enable-shadows { 3 | box-shadow: $shadow; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix() { 2 | &::after { 3 | display: block; 4 | clear: both; 5 | content: ""; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height: $width) { 4 | width: $width; 5 | height: $height; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/template/sidebar_header.handlebars: -------------------------------------------------------------------------------- 1 | {{this.name}} 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var pack = require('./package'); 2 | var path = require('path'); 3 | 4 | module.exports = { 5 | version: pack.version, 6 | dist: path.resolve(__dirname, 'dist') 7 | }; -------------------------------------------------------------------------------- /test/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.jshintrc", 3 | "expr": true, 4 | "jasmine": true, 5 | "globals": { 6 | "before": false, 7 | "after": false, 8 | "expect": true 9 | } 10 | } -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_visibility.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Visibility 4 | 5 | @mixin invisible($visibility) { 6 | visibility: $visibility !important; 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | *.ipr 3 | *.iml 4 | *.iws 5 | web/ 6 | lib/*.zip 7 | version.properties 8 | .sass-cache 9 | swagger-ui.sublime-workspace 10 | .idea 11 | .project 12 | node_modules 13 | /nbproject/private/ -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - '0.10' 5 | - '0.12' 6 | install: 7 | - export DISPLAY=:99.0 8 | - sh -e /etc/init.d/xvfb start 9 | - npm i -g jshint 10 | - npm install 11 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_screenreaders.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Screenreaders 3 | // 4 | 5 | .sr-only { 6 | @include sr-only(); 7 | } 8 | 9 | .sr-only-focusable { 10 | @include sr-only-focusable(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_visibility.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Visibility utilities 3 | // 4 | 5 | .visible { 6 | @include invisible(visible); 7 | } 8 | 9 | .invisible { 10 | @include invisible(hidden); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_lists.scss: -------------------------------------------------------------------------------- 1 | // Lists 2 | 3 | // Unstyled keeps list items block level, just removes default browser padding and list-style 4 | @mixin list-unstyled { 5 | padding-left: 0; 6 | list-style: none; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_text-truncate.scss: -------------------------------------------------------------------------------- 1 | // Text truncate 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-truncate() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 5 | resize: $direction; // Options: horizontal, vertical, both 6 | } 7 | -------------------------------------------------------------------------------- /test/e2e/driver.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Web driver manager 3 | */ 4 | 'use strict'; 5 | 6 | var webdriver = require('selenium-webdriver'); 7 | 8 | var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.firefox()).build(); 9 | 10 | module.exports = driver; -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_transition.scss: -------------------------------------------------------------------------------- 1 | @mixin transition($transition...) { 2 | @if $enable-transitions { 3 | @if length($transition) == 0 { 4 | transition: $transition-base; 5 | } @else { 6 | transition: $transition; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_float.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @mixin float-left { 4 | float: left !important; 5 | } 6 | @mixin float-right { 7 | float: right !important; 8 | } 9 | @mixin float-none { 10 | float: none !important; 11 | } 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | 3 | dist/**/*.js binary 4 | dist/**/*.map binary 5 | dist/**/*.eot binary 6 | dist/**/*.svg binary 7 | dist/**/*.ttf binary 8 | dist/**/*.woff binary 9 | dist/**/*.woff2 binary 10 | dist/**/*.png binary 11 | dist/*.html text 12 | 13 | src/main/html/images/*.png binary 14 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: #e5e5e5) { 6 | height: 0; 7 | margin: ($spacer / 2) 0; 8 | overflow: hidden; 9 | border-top: 1px solid $color; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/javascript/view/ResponseContentTypeView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.ResponseContentTypeView = Backbone.View.extend({ 4 | initialize: function(){}, 5 | 6 | render: function(){ 7 | $(this.el).html(Handlebars.templates.response_content_type(this.model)); 8 | return this; 9 | } 10 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_text-hide.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | @mixin text-hide() { 3 | // stylelint-disable-next-line font-family-no-missing-generic-family-keyword 4 | font: 0/0 a; 5 | color: transparent; 6 | text-shadow: none; 7 | background-color: transparent; 8 | border: 0; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/template/content_type.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_badge.scss: -------------------------------------------------------------------------------- 1 | @mixin badge-variant($bg) { 2 | color: color-yiq($bg); 3 | background-color: $bg; 4 | 5 | &[href] { 6 | @include hover-focus { 7 | color: color-yiq($bg); 8 | text-decoration: none; 9 | background-color: darken($bg, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_alert.scss: -------------------------------------------------------------------------------- 1 | @mixin alert-variant($background, $border, $color) { 2 | color: $color; 3 | @include gradient-bg($background); 4 | border-color: $border; 5 | 6 | hr { 7 | border-top-color: darken($border, 5%); 8 | } 9 | 10 | .alert-link { 11 | color: darken($color, 10%); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/template/status_code.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
{{code}}
3 |
{{{message}}}
4 | {{#if examples}} 5 |
6 |
{{examples}}
7 |
8 | {{/if}} 9 |
10 | -------------------------------------------------------------------------------- /src/main/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "../vendor/bootstrap/scss/functions"; 2 | @import "./include/variables"; 3 | @import "../vendor/bootstrap/scss/bootstrap"; 4 | 5 | @import "./include/common"; 6 | @import "./include/highlighter"; 7 | @import "./include/sidebar"; 8 | @import "./include/explorer"; 9 | @import "./include/header"; 10 | @import "./include/scrolling_sidebar"; -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Typography 4 | 5 | @mixin text-emphasis-variant($parent, $color) { 6 | #{$parent} { 7 | color: $color !important; 8 | } 9 | a#{$parent} { 10 | @include hover-focus { 11 | color: darken($color, 10%) !important; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/javascript/view/ContentTypeView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.ContentTypeView = Backbone.View.extend({ 4 | initialize: function() {}, 5 | 6 | render: function(){ 7 | $(this.el).html(Handlebars.templates.content_type(this.model)); 8 | 9 | $('label[for=contentType]', $(this.el)).text('Response Content Type'); 10 | 11 | return this; 12 | } 13 | }); -------------------------------------------------------------------------------- /src/main/javascript/view/SidebarItemView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.SidebarItemView = Backbone.View.extend({ 4 | 5 | initialize: function (opts) { 6 | this.options = opts || {}; 7 | this.router = this.options.router; 8 | }, 9 | 10 | render: function () { 11 | $(this.el).html(Handlebars.templates.sidebar_item(this.model)); 12 | return this; 13 | } 14 | 15 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_sizing.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Width and height 4 | 5 | @each $prop, $abbrev in (width: w, height: h) { 6 | @each $size, $length in $sizes { 7 | .#{$abbrev}-#{$size} { #{$prop}: $length !important; } 8 | } 9 | } 10 | 11 | .mw-100 { max-width: 100% !important; } 12 | .mh-100 { max-height: 100% !important; } 13 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_float.scss: -------------------------------------------------------------------------------- 1 | @each $breakpoint in map-keys($grid-breakpoints) { 2 | @include media-breakpoint-up($breakpoint) { 3 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); 4 | 5 | .float#{$infix}-left { @include float-left; } 6 | .float#{$infix}-right { @include float-right; } 7 | .float#{$infix}-none { @include float-none; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/javascript/view/ParameterContentTypeView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({ 4 | initialize: function () {}, 5 | 6 | render: function(){ 7 | $(this.el).html(Handlebars.templates.parameter_content_type(this.model)); 8 | 9 | //$('label[for=parameterContentType]', $(this.el)).text('Parameter content type:'); 10 | 11 | return this; 12 | } 13 | 14 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_navbar-align.scss: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` 5 | // to calculate the appropriate top margin. 6 | 7 | // @mixin navbar-vertical-align($element-height) { 8 | // margin-top: (($navbar-height - $element-height) / 2); 9 | // margin-bottom: (($navbar-height - $element-height) / 2); 10 | // } 11 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | padding: $jumbotron-padding ($jumbotron-padding / 2); 3 | margin-bottom: $jumbotron-padding; 4 | background-color: $jumbotron-bg; 5 | @include border-radius($border-radius-lg); 6 | 7 | @include media-breakpoint-up(sm) { 8 | padding: ($jumbotron-padding * 2) $jumbotron-padding; 9 | } 10 | } 11 | 12 | .jumbotron-fluid { 13 | padding-right: 0; 14 | padding-left: 0; 15 | @include border-radius(0); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_align.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | .align-baseline { vertical-align: baseline !important; } // Browser default 4 | .align-top { vertical-align: top !important; } 5 | .align-middle { vertical-align: middle !important; } 6 | .align-bottom { vertical-align: bottom !important; } 7 | .align-text-bottom { vertical-align: text-bottom !important; } 8 | .align-text-top { vertical-align: text-top !important; } 9 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_utilities.scss: -------------------------------------------------------------------------------- 1 | @import "utilities/align"; 2 | @import "utilities/background"; 3 | @import "utilities/borders"; 4 | @import "utilities/clearfix"; 5 | @import "utilities/display"; 6 | @import "utilities/embed"; 7 | @import "utilities/flex"; 8 | @import "utilities/float"; 9 | @import "utilities/position"; 10 | @import "utilities/screenreaders"; 11 | @import "utilities/sizing"; 12 | @import "utilities/spacing"; 13 | @import "utilities/text"; 14 | @import "utilities/visibility"; 15 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/bootstrap-reboot.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.0.0-beta.3 (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors 4 | * Copyright 2011-2017 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | 9 | @import "functions"; 10 | @import "variables"; 11 | @import "mixins"; 12 | @import "reboot"; 13 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_background.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | @each $color, $value in $theme-colors { 4 | @include bg-variant(".bg-#{$color}", $value); 5 | } 6 | 7 | @if $enable-gradients { 8 | @each $color, $value in $theme-colors { 9 | @include bg-gradient-variant(".bg-gradient-#{$color}", $value); 10 | } 11 | } 12 | 13 | .bg-white { 14 | background-color: $white !important; 15 | } 16 | 17 | .bg-transparent { 18 | background-color: transparent !important; 19 | } 20 | -------------------------------------------------------------------------------- /dist/assets/o2c.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/html/assets/o2c.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/template/bearer_button_view.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 |
9 |
-------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "swagger-ui", 3 | "main": "dist/index.html", 4 | "version": "2.1.8-M1", 5 | "authors": [ 6 | "Mohsen Azimi " 7 | ], 8 | "description": "Swagger UI", 9 | "moduleType": [ 10 | "globals" 11 | ], 12 | "keywords": [ 13 | "Swagger", 14 | "API" 15 | ], 16 | "license": "Copyright 2015 Reverb Technologies, Inc.", 17 | "homepage": "http://swagger.io", 18 | "private": true, 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "tests" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /src/main/template/apikeys.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{#each this}} 4 |
5 | 6 |
7 | {{/each}} 8 | 9 |
-------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 4 | .page-link { 5 | padding: $padding-y $padding-x; 6 | font-size: $font-size; 7 | line-height: $line-height; 8 | } 9 | 10 | .page-item { 11 | &:first-child { 12 | .page-link { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | .page-link { 18 | @include border-right-radius($border-radius); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/template/apikey_button_view.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 |
9 |
-------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Pull Requests 2 | Plase make your pull requests are made to the [**`develop_2.0`**](https://github.com/swagger-api/swagger-ui/tree/develop_2.0) branch at this time. 3 | 4 | ## Issues 5 | SwaggerUI uses [SwaggerJS](https://github.com/swagger-api/swagger-js) library for many internal operations. If you see errors in 6 | [`swagger-client.js`](lib/swagger-client.js) file, you should probably open the issue in [SwaggerJS](https://github.com/swagger-api/swagger-js) repository. 7 | 8 | Please open issues related to Swagger specifications in [Swagger Specs](https://github.com/swagger-api/swagger-spec) repository. 9 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Contextual backgrounds 4 | 5 | @mixin bg-variant($parent, $color) { 6 | #{$parent} { 7 | background-color: $color !important; 8 | } 9 | a#{$parent}, 10 | button#{$parent} { 11 | @include hover-focus { 12 | background-color: darken($color, 10%) !important; 13 | } 14 | } 15 | } 16 | 17 | @mixin bg-gradient-variant($parent, $color) { 18 | #{$parent} { 19 | background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | } 8 | 9 | a.list-group-item-#{$state}, 10 | button.list-group-item-#{$state} { 11 | color: $color; 12 | 13 | @include hover-focus { 14 | color: $color; 15 | background-color: darken($background, 5%); 16 | } 17 | 18 | &.active { 19 | color: #fff; 20 | background-color: $color; 21 | border-color: $color; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/template/response_content_type.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 13 |
14 |
-------------------------------------------------------------------------------- /src/main/template/parameter_content_type.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 13 |
14 |
-------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_transitions.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable selector-no-qualifying-type 2 | 3 | .fade { 4 | opacity: 0; 5 | @include transition($transition-fade); 6 | 7 | &.show { 8 | opacity: 1; 9 | } 10 | } 11 | 12 | .collapse { 13 | display: none; 14 | &.show { 15 | display: block; 16 | } 17 | } 18 | 19 | tr { 20 | &.collapse.show { 21 | display: table-row; 22 | } 23 | } 24 | 25 | tbody { 26 | &.collapse.show { 27 | display: table-row-group; 28 | } 29 | } 30 | 31 | .collapsing { 32 | position: relative; 33 | height: 0; 34 | overflow: hidden; 35 | @include transition($transition-collapse); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_reset-text.scss: -------------------------------------------------------------------------------- 1 | @mixin reset-text { 2 | font-family: $font-family-base; 3 | // We deliberately do NOT reset font-size or word-wrap. 4 | font-style: normal; 5 | font-weight: $font-weight-normal; 6 | line-height: $line-height-base; 7 | text-align: left; // Fallback for where `start` is not supported 8 | text-align: start; // stylelint-disable-line declaration-block-no-duplicate-properties 9 | text-decoration: none; 10 | text-shadow: none; 11 | text-transform: none; 12 | letter-spacing: normal; 13 | word-break: normal; 14 | word-spacing: normal; 15 | white-space: normal; 16 | line-break: auto; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_root.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | // Custom variable values only support SassScript inside `#{}`. 3 | @each $color, $value in $colors { 4 | --#{$color}: #{$value}; 5 | } 6 | 7 | @each $color, $value in $theme-colors { 8 | --#{$color}: #{$value}; 9 | } 10 | 11 | @each $bp, $value in $grid-breakpoints { 12 | --breakpoint-#{$bp}: #{$value}; 13 | } 14 | 15 | // Use `inspect` for lists so that quoted items keep the quotes. 16 | // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 17 | --font-family-sans-serif: #{inspect($font-family-sans-serif)}; 18 | --font-family-monospace: #{inspect($font-family-monospace)}; 19 | } 20 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ### 2 | # swagger-ui-builder - https://github.com/wordnik/swagger-ui/ 3 | # Container for building the swagger-ui static site 4 | # 5 | # Build: docker build -t swagger-ui-builder . 6 | # Run: docker run -v $PWD/dist:/build/dist swagger-ui-builder 7 | # 8 | ### 9 | 10 | FROM ubuntu:14.04 11 | MAINTAINER dnephin@gmail.com 12 | 13 | ENV DEBIAN_FRONTEND noninteractive 14 | 15 | RUN apt-get update && apt-get install -y git npm nodejs openjdk-7-jre 16 | RUN ln -s /usr/bin/nodejs /usr/local/bin/node 17 | 18 | WORKDIR /build 19 | ADD package.json /build/package.json 20 | RUN npm install 21 | ADD . /build 22 | CMD ./node_modules/gulp/bin/gulp.js serve 23 | -------------------------------------------------------------------------------- /src/main/template/basic_auth_button_view.handlebars: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 |
7 | 8 |
9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery Wiggle 3 | Author: WonderGroup, Jordan Thomas 4 | URL: http://labs.wondergroup.com/demos/mini-ui/index.html 5 | License: MIT (http://en.wikipedia.org/wiki/MIT_License) 6 | */ 7 | jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} 8 | if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; -------------------------------------------------------------------------------- /dist/assets/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | jQuery Wiggle 3 | Author: WonderGroup, Jordan Thomas 4 | URL: http://labs.wondergroup.com/demos/mini-ui/index.html 5 | License: MIT (http://en.wikipedia.org/wiki/MIT_License) 6 | */ 7 | jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('
').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} 8 | if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; -------------------------------------------------------------------------------- /src/main/javascript/view/SignatureView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.SignatureView = Backbone.View.extend({ 4 | events: { 5 | 'mousedown .sample-snippet': 'snippetToTextArea' 6 | }, 7 | 8 | initialize: function () { 9 | }, 10 | 11 | render: function () { 12 | $(this.el).html(Handlebars.templates.signature(this.model)); 13 | this.isParam = this.model.isParam; 14 | return this; 15 | }, 16 | 17 | // handler for snippet to text area 18 | snippetToTextArea: function (e) { 19 | if (this.isParam) { 20 | if (e) { 21 | e.preventDefault(); 22 | } 23 | 24 | var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode)); 25 | if ($.trim(textArea.val()) === '') { 26 | textArea.val(this.model.sampleJSON); 27 | } 28 | } 29 | } 30 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table-#{$state} { 7 | &, 8 | > th, 9 | > td { 10 | background-color: $background; 11 | } 12 | } 13 | 14 | // Hover states for `.table-hover` 15 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 16 | .table-hover { 17 | $hover-background: darken($background, 5%); 18 | 19 | .table-#{$state} { 20 | @include hover { 21 | background-color: $hover-background; 22 | 23 | > td, 24 | > th { 25 | background-color: $hover-background; 26 | } 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_position.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable declaration-no-important 2 | 3 | // Common values 4 | 5 | // Sass list not in variables since it's not intended for customization. 6 | $positions: static, relative, absolute, fixed, sticky; 7 | 8 | @each $position in $positions { 9 | .position-#{$position} { position: $position !important; } 10 | } 11 | 12 | // Shorthand 13 | 14 | .fixed-top { 15 | position: fixed; 16 | top: 0; 17 | right: 0; 18 | left: 0; 19 | z-index: $zindex-fixed; 20 | } 21 | 22 | .fixed-bottom { 23 | position: fixed; 24 | right: 0; 25 | bottom: 0; 26 | left: 0; 27 | z-index: $zindex-fixed; 28 | } 29 | 30 | .sticky-top { 31 | @supports (position: sticky) { 32 | position: sticky; 33 | top: 0; 34 | z-index: $zindex-sticky; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "curly": true, 7 | "eqeqeq": true, 8 | "immed": true, 9 | "indent": 2, 10 | "latedef": false, 11 | "newcap": true, 12 | "noarg": true, 13 | "quotmark": "single", 14 | "regexp": true, 15 | "undef": true, 16 | "unused": true, 17 | "strict": true, 18 | "trailing": true, 19 | "smarttabs": true, 20 | "validthis": true, 21 | "globals": { 22 | 23 | // Libraries 24 | "_": false, 25 | "$": false, 26 | "Backbone": false, 27 | "Handlebars": false, 28 | "jQuery": false, 29 | "marked": false, 30 | "SwaggerClient": false, 31 | "hljs": false, 32 | "SwaggerUi": false, 33 | "define": false, 34 | 35 | // Global object 36 | // TODO: remove these 37 | "Docs": false 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/bootstrap-grid.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grid v4.0.0-beta.3 (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors 4 | * Copyright 2011-2017 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | @at-root { 9 | @-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix 10 | } 11 | 12 | html { 13 | box-sizing: border-box; 14 | -ms-overflow-style: scrollbar; 15 | } 16 | 17 | *, 18 | *::before, 19 | *::after { 20 | box-sizing: inherit; 21 | } 22 | 23 | @import "functions"; 24 | @import "variables"; 25 | 26 | // 27 | // Grid mixins 28 | // 29 | 30 | @import "mixins/breakpoints"; 31 | @import "mixins/grid-framework"; 32 | @import "mixins/grid"; 33 | 34 | @import "grid"; 35 | @import "utilities/flex"; 36 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | @mixin border-radius($radius: $border-radius) { 4 | @if $enable-rounded { 5 | border-radius: $radius; 6 | } 7 | } 8 | 9 | @mixin border-top-radius($radius) { 10 | @if $enable-rounded { 11 | border-top-left-radius: $radius; 12 | border-top-right-radius: $radius; 13 | } 14 | } 15 | 16 | @mixin border-right-radius($radius) { 17 | @if $enable-rounded { 18 | border-top-right-radius: $radius; 19 | border-bottom-right-radius: $radius; 20 | } 21 | } 22 | 23 | @mixin border-bottom-radius($radius) { 24 | @if $enable-rounded { 25 | border-bottom-right-radius: $radius; 26 | border-bottom-left-radius: $radius; 27 | } 28 | } 29 | 30 | @mixin border-left-radius($radius) { 31 | @if $enable-rounded { 32 | border-top-left-radius: $radius; 33 | border-bottom-left-radius: $radius; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/javascript/view/BasicAuthButton.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.BasicAuthButton = Backbone.View.extend({ 4 | 5 | events:{ 6 | 'click #apply_basic_auth' : 'applyPassword' 7 | }, 8 | 9 | initialize: function(opts){ 10 | this.options = opts || {}; 11 | this.router = this.options.router; 12 | }, 13 | 14 | render: function(){ 15 | var template = this.template(); 16 | $(this.el).html(template(this.model)); 17 | 18 | return this; 19 | }, 20 | 21 | applyPassword: function(){ 22 | var username = $('#input_username').val(); 23 | var password = $('#input_password').val(); 24 | var basicAuth = new SwaggerClient.PasswordAuthorization('basic', username, password); 25 | window.swaggerUi.api.clientAuthorizations.add('basic', basicAuth); 26 | log("added passwordAuth"); 27 | }, 28 | 29 | template: function(){ 30 | return Handlebars.templates.basic_auth_button_view; 31 | } 32 | 33 | }); -------------------------------------------------------------------------------- /src/main/scss/include/_scrolling_sidebar.scss: -------------------------------------------------------------------------------- 1 | @include media-breakpoint-up(lg) { 2 | html { 3 | height: 100%; 4 | body{ 5 | height: 100%; 6 | position: relative; 7 | 8 | #main-nav{ 9 | z-index: $zindex-fixed; 10 | } 11 | 12 | main{ 13 | height: 100%; 14 | 15 | #swagger-ui-container{ 16 | height: 100%; 17 | 18 | #swagger_sidebar{ 19 | position: absolute; 20 | left: 0; 21 | top: 54px; 22 | height: 100%; 23 | overflow-y: scroll; 24 | 25 | &.sps--blw{ 26 | position: fixed; 27 | top: 0; 28 | } 29 | } 30 | 31 | #resources_container{ 32 | margin-left: 25%; 33 | 34 | @include media-breakpoint-up(xl) { 35 | margin-left: 16.66667%; 36 | } 37 | } 38 | } 39 | } 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Only display content to screen readers 2 | // 3 | // See: http://a11yproject.com/posts/how-to-hide-content/ 4 | // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ 5 | 6 | @mixin sr-only { 7 | position: absolute; 8 | width: 1px; 9 | height: 1px; 10 | padding: 0; 11 | overflow: hidden; 12 | clip: rect(0, 0, 0, 0); 13 | white-space: nowrap; 14 | clip-path: inset(50%); 15 | border: 0; 16 | } 17 | 18 | // Use in conjunction with .sr-only to only display content when it's focused. 19 | // 20 | // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 21 | // 22 | // Credit: HTML5 Boilerplate 23 | 24 | @mixin sr-only-focusable { 25 | &:active, 26 | &:focus { 27 | position: static; 28 | width: auto; 29 | height: auto; 30 | overflow: visible; 31 | clip: auto; 32 | white-space: normal; 33 | clip-path: none; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/utilities/_embed.scss: -------------------------------------------------------------------------------- 1 | // Credit: Nicolas Gallagher and SUIT CSS. 2 | 3 | .embed-responsive { 4 | position: relative; 5 | display: block; 6 | width: 100%; 7 | padding: 0; 8 | overflow: hidden; 9 | 10 | &::before { 11 | display: block; 12 | content: ""; 13 | } 14 | 15 | .embed-responsive-item, 16 | iframe, 17 | embed, 18 | object, 19 | video { 20 | position: absolute; 21 | top: 0; 22 | bottom: 0; 23 | left: 0; 24 | width: 100%; 25 | height: 100%; 26 | border: 0; 27 | } 28 | } 29 | 30 | .embed-responsive-21by9 { 31 | &::before { 32 | padding-top: percentage(9 / 21); 33 | } 34 | } 35 | 36 | .embed-responsive-16by9 { 37 | &::before { 38 | padding-top: percentage(9 / 16); 39 | } 40 | } 41 | 42 | .embed-responsive-4by3 { 43 | &::before { 44 | padding-top: percentage(3 / 4); 45 | } 46 | } 47 | 48 | .embed-responsive-1by1 { 49 | &::before { 50 | padding-top: percentage(1 / 1); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/javascript/view/StatusCodeView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.StatusCodeView = Backbone.View.extend({ 4 | initialize: function (opts) { 5 | this.options = opts || {}; 6 | this.router = this.options.router; 7 | }, 8 | 9 | render: function(){ 10 | $(this.el).html(Handlebars.templates.status_code(this.model)); 11 | 12 | if (this.router.api.models.hasOwnProperty(this.model.responseModel)) { 13 | var responseModel = { 14 | sampleJSON: JSON.stringify(this.router.api.models[this.model.responseModel].createJSONSample(), null, 2), 15 | isParam: false, 16 | signature: this.router.api.models[this.model.responseModel].getMockSignature(), 17 | }; 18 | 19 | var responseModelView = new SwaggerUi.Views.SignatureView({model: responseModel, tagName: 'div'}); 20 | $('.model-signature', this.$el).append(responseModelView.render().el); 21 | } else { 22 | $('.model-signature', this.$el).html(''); 23 | } 24 | return this; 25 | } 26 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | @keyframes progress-bar-stripes { 2 | from { background-position: $progress-height 0; } 3 | to { background-position: 0 0; } 4 | } 5 | 6 | .progress { 7 | display: flex; 8 | height: $progress-height; 9 | overflow: hidden; // force rounded corners by cropping it 10 | font-size: $progress-font-size; 11 | background-color: $progress-bg; 12 | @include border-radius($progress-border-radius); 13 | @include box-shadow($progress-box-shadow); 14 | } 15 | 16 | .progress-bar { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | color: $progress-bar-color; 21 | text-align: center; 22 | background-color: $progress-bar-bg; 23 | @include transition($progress-bar-transition); 24 | } 25 | 26 | .progress-bar-striped { 27 | @include gradient-striped(); 28 | background-size: $progress-height $progress-height; 29 | } 30 | 31 | .progress-bar-animated { 32 | animation: progress-bar-stripes $progress-bar-animation-timing; 33 | } 34 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_close.scss: -------------------------------------------------------------------------------- 1 | .close { 2 | float: right; 3 | font-size: $close-font-size; 4 | font-weight: $close-font-weight; 5 | line-height: 1; 6 | color: $close-color; 7 | text-shadow: $close-text-shadow; 8 | opacity: .5; 9 | 10 | @include hover-focus { 11 | color: $close-color; 12 | text-decoration: none; 13 | opacity: .75; 14 | } 15 | 16 | // Opinionated: add "hand" cursor to non-disabled .close elements 17 | &:not([disabled]):not(.disabled) { 18 | cursor: pointer; 19 | } 20 | } 21 | 22 | // Additional properties for button version 23 | // iOS requires the button element instead of an anchor tag. 24 | // If you want the anchor version, it requires `href="#"`. 25 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 26 | 27 | // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type 28 | button.close { 29 | padding: 0; 30 | background-color: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | // stylelint-enable 35 | -------------------------------------------------------------------------------- /src/main/javascript/view/BearerButton.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.BearerButton = Backbone.View.extend({ // TODO: append this to global SwaggerUi 4 | 5 | events:{ 6 | 'click #apply_bearer' : 'applyBearer' 7 | }, 8 | 9 | initialize: function(opts){ 10 | this.options = opts || {}; 11 | this.router = this.options.router; 12 | }, 13 | 14 | render: function(){ 15 | var template = this.template(); 16 | $(this.el).html(template(this.model)); 17 | 18 | return this; 19 | }, 20 | 21 | applyBearer: function(){ 22 | var key = encodeURIComponent($('#input_bearer_'+this.model.name)[0].value); 23 | if (key && key.trim() != "") { 24 | var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer " + key, "header"); 25 | window.swaggerUi.api.clientAuthorizations.add(this.model.name, apiKeyAuth); 26 | log("added Bearer :" + key + " in header"); 27 | } 28 | }, 29 | 30 | template: function(){ 31 | return Handlebars.templates.bearer_button_view; 32 | } 33 | 34 | }); -------------------------------------------------------------------------------- /src/main/template/signature.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{type}} Sample 4 |
5 |
6 |
{{sampleJSON}}
7 |
8 |
9 |
10 | 11 | {{#if signature}} 12 |
13 | {{type}} Schema 14 |
15 |
16 | {{{signature}}} 17 |
18 |
19 |
20 | {{/if}} 21 |
-------------------------------------------------------------------------------- /src/main/javascript/view/ApiKeyButton.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.ApiKeyButton = Backbone.View.extend({ // TODO: append this to global SwaggerUi 4 | 5 | events:{ 6 | 'click #apply_api_key' : 'applyApiKey' 7 | }, 8 | 9 | initialize: function(opts){ 10 | this.options = opts || {}; 11 | this.router = this.options.router; 12 | }, 13 | 14 | render: function(){ 15 | var template = this.template(); 16 | $(this.el).html(template(this.model)); 17 | 18 | return this; 19 | }, 20 | 21 | applyApiKey: function(){ 22 | var key = encodeURIComponent($('#input_apiKey_'+this.model.name)[0].value); 23 | if (key && key.trim() != "") { 24 | var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization(this.model.name, key, this.model.in); 25 | window.swaggerUi.api.clientAuthorizations.add(this.model.name, apiKeyAuth); 26 | log("added " + this.model.name + ":" + key + " in " + this.model.in); 27 | } 28 | }, 29 | 30 | template: function(){ 31 | return Handlebars.templates.apikey_button_view; 32 | } 33 | 34 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/bootstrap.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-beta.3 (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors 4 | * Copyright 2011-2017 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | @import "functions"; 9 | @import "variables"; 10 | @import "mixins"; 11 | @import "root"; 12 | @import "reboot"; 13 | @import "type"; 14 | @import "images"; 15 | @import "code"; 16 | @import "grid"; 17 | @import "tables"; 18 | @import "forms"; 19 | @import "buttons"; 20 | @import "transitions"; 21 | @import "dropdown"; 22 | @import "button-group"; 23 | @import "input-group"; 24 | @import "custom-forms"; 25 | @import "nav"; 26 | @import "navbar"; 27 | @import "card"; 28 | @import "breadcrumb"; 29 | @import "pagination"; 30 | @import "badge"; 31 | @import "jumbotron"; 32 | @import "alert"; 33 | @import "progress"; 34 | @import "media"; 35 | @import "list-group"; 36 | @import "close"; 37 | @import "modal"; 38 | @import "tooltip"; 39 | @import "popover"; 40 | @import "carousel"; 41 | @import "utilities"; 42 | @import "print"; 43 | -------------------------------------------------------------------------------- /src/main/scss/include/_explorer.scss: -------------------------------------------------------------------------------- 1 | #resources_container{ 2 | .operations{ 3 | .content{ 4 | border-bottom: 1px solid $table-border-color; 5 | @include transition($transition-base); 6 | 7 | code.code-signature{ 8 | padding: 0.5em 0.5em 0.3em; 9 | } 10 | } 11 | .samples{ 12 | background: lighten($hljs-bg, 10%); 13 | @include transition($transition-base); 14 | border-bottom: 1px solid lighten($hljs-bg, 5%); 15 | 16 | pre{ 17 | margin-bottom: 0; 18 | } 19 | 20 | .sample-item{ 21 | a.accordion-link{ 22 | color: $white; 23 | font-size: $font-size-sm; 24 | text-decoration: none; 25 | border-bottom: 1px solid lighten($hljs-bg, 5%); 26 | display: block; 27 | 28 | &:hover{ 29 | color: $text-muted; 30 | } 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/javascript/view/ApiKeys.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.ApiKeys = Backbone.View.extend({ // TODO: append this to global SwaggerUi 4 | 5 | events:{ 6 | 'click #apply_apikeys' : 'applyApiKeys' 7 | }, 8 | 9 | initialize: function(opts){ 10 | this.options = opts || {}; 11 | this.router = this.options.router; 12 | }, 13 | 14 | render: function(){ 15 | var template = this.template(); 16 | $(this.el).html(template(this.model)); 17 | 18 | return this; 19 | }, 20 | 21 | applyApiKeys: function(){ 22 | for (var i = 0; i < this.model.length; i++) { 23 | var key = encodeURIComponent($('#input_apiKey_'+this.model[i].name)[0].value); 24 | if (key && key.trim() != "") { 25 | var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization(this.model[i].name, key, this.model[i].in); 26 | window.swaggerUi.api.clientAuthorizations.add(this.model[i].name, apiKeyAuth); 27 | log("added " + this.model[i].name + ":" + key + " in " + this.model[i].in); 28 | } 29 | } 30 | }, 31 | 32 | template: function(){ 33 | return Handlebars.templates.apikeys; 34 | } 35 | 36 | }); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Andres The Giant LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /test/e2e/servers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Swagger UI and Specs Servers 3 | */ 4 | 'use strict'; 5 | 6 | var path = require('path'); 7 | var createServer = require('http-server').createServer; 8 | 9 | var dist = path.join(__dirname, '..', '..', 'dist'); 10 | var specs = path.join(__dirname, '..', '..', 'test', 'specs'); 11 | var DOCS_PORT = 8080; 12 | var SPEC_SERVER_PORT = 8081; 13 | 14 | var driver = require('./driver'); 15 | 16 | var swaggerUI; 17 | var specServer; 18 | 19 | module.exports.start = function (specsLocation, done) { 20 | swaggerUI = createServer({ root: dist, cors: true }); 21 | specServer = createServer({ root: specs, cors: true }); 22 | 23 | swaggerUI.listen(DOCS_PORT); 24 | specServer.listen(SPEC_SERVER_PORT); 25 | 26 | var swaggerSpecLocation = encodeURIComponent('http://localhost:' + SPEC_SERVER_PORT + specsLocation); 27 | var url = 'http://localhost:' + DOCS_PORT + '/index.html?url=' + swaggerSpecLocation; 28 | 29 | setTimeout(function(){ 30 | driver.get(url); 31 | done(); 32 | }, process.env.TRAVIS ? 20000 : 3000); 33 | }; 34 | 35 | module.exports.close = function() { 36 | swaggerUI.close(); 37 | specServer.close(); 38 | }; 39 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | // Base class 2 | // 3 | // Requires one of the contextual, color modifier classes for `color` and 4 | // `background-color`. 5 | 6 | .badge { 7 | display: inline-block; 8 | padding: $badge-padding-y $badge-padding-x; 9 | font-size: $badge-font-size; 10 | font-weight: $badge-font-weight; 11 | line-height: 1; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | @include border-radius($badge-border-radius); 16 | 17 | // Empty badges collapse automatically 18 | &:empty { 19 | display: none; 20 | } 21 | } 22 | 23 | // Quick fix for badges in buttons 24 | .btn .badge { 25 | position: relative; 26 | top: -1px; 27 | } 28 | 29 | // Pill badges 30 | // 31 | // Make them extra rounded with a modifier to replace v3's badges. 32 | 33 | .badge-pill { 34 | padding-right: $badge-pill-padding-x; 35 | padding-left: $badge-pill-padding-x; 36 | @include border-radius($badge-pill-border-radius); 37 | } 38 | 39 | // Colors 40 | // 41 | // Contextual variations (linked badges get darker on :hover). 42 | 43 | @each $color, $value in $theme-colors { 44 | .badge-#{$color} { 45 | @include badge-variant($value); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Toggles 2 | // 3 | // Used in conjunction with global variables to enable certain theme features. 4 | 5 | // Utilities 6 | @import "mixins/breakpoints"; 7 | @import "mixins/hover"; 8 | @import "mixins/image"; 9 | @import "mixins/badge"; 10 | @import "mixins/resize"; 11 | @import "mixins/screen-reader"; 12 | @import "mixins/size"; 13 | @import "mixins/reset-text"; 14 | @import "mixins/text-emphasis"; 15 | @import "mixins/text-hide"; 16 | @import "mixins/text-truncate"; 17 | @import "mixins/visibility"; 18 | 19 | // // Components 20 | @import "mixins/alert"; 21 | @import "mixins/buttons"; 22 | @import "mixins/caret"; 23 | @import "mixins/pagination"; 24 | @import "mixins/lists"; 25 | @import "mixins/list-group"; 26 | @import "mixins/nav-divider"; 27 | @import "mixins/forms"; 28 | @import "mixins/table-row"; 29 | 30 | // // Skins 31 | @import "mixins/background-variant"; 32 | @import "mixins/border-radius"; 33 | @import "mixins/box-shadow"; 34 | @import "mixins/gradients"; 35 | @import "mixins/transition"; 36 | 37 | // // Layout 38 | @import "mixins/clearfix"; 39 | // @import "mixins/navbar-align"; 40 | @import "mixins/grid-framework"; 41 | @import "mixins/grid"; 42 | @import "mixins/float"; 43 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | // Container widths 2 | // 3 | // Set the container width, and override it for fixed navbars in media queries. 4 | 5 | @if $enable-grid-classes { 6 | .container { 7 | @include make-container(); 8 | @include make-container-max-widths(); 9 | } 10 | } 11 | 12 | // Fluid container 13 | // 14 | // Utilizes the mixin meant for fixed width containers, but with 100% width for 15 | // fluid, full width layouts. 16 | 17 | @if $enable-grid-classes { 18 | .container-fluid { 19 | @include make-container(); 20 | } 21 | } 22 | 23 | // Row 24 | // 25 | // Rows contain and clear the floats of your columns. 26 | 27 | @if $enable-grid-classes { 28 | .row { 29 | @include make-row(); 30 | } 31 | 32 | // Remove the negative margin from default .row, then the horizontal padding 33 | // from all immediate children columns (to prevent runaway style inheritance). 34 | .no-gutters { 35 | margin-right: 0; 36 | margin-left: 0; 37 | 38 | > .col, 39 | > [class*="col-"] { 40 | padding-right: 0; 41 | padding-left: 0; 42 | } 43 | } 44 | } 45 | 46 | // Columns 47 | // 48 | // Common styles for small and large grid columns 49 | 50 | @if $enable-grid-classes { 51 | @include make-grid-columns(); 52 | } 53 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_code.scss: -------------------------------------------------------------------------------- 1 | // Inline and block code styles 2 | code, 3 | kbd, 4 | pre, 5 | samp { 6 | font-family: $font-family-monospace; 7 | } 8 | 9 | // Inline code 10 | code { 11 | font-size: $code-font-size; 12 | color: $code-color; 13 | word-break: break-word; 14 | 15 | // Streamline the style when inside anchors to avoid broken underline and more 16 | a > & { 17 | color: inherit; 18 | } 19 | } 20 | 21 | // User input typically entered via keyboard 22 | kbd { 23 | padding: $kbd-padding-y $kbd-padding-x; 24 | font-size: $kbd-font-size; 25 | color: $kbd-color; 26 | background-color: $kbd-bg; 27 | @include border-radius($border-radius-sm); 28 | @include box-shadow($kbd-box-shadow); 29 | 30 | kbd { 31 | padding: 0; 32 | font-size: 100%; 33 | font-weight: $nested-kbd-font-weight; 34 | @include box-shadow(none); 35 | } 36 | } 37 | 38 | // Blocks of code 39 | pre { 40 | display: block; 41 | font-size: $code-font-size; 42 | color: $pre-color; 43 | 44 | // Account for some code outputs that place code tags in pre tags 45 | code { 46 | font-size: inherit; 47 | color: inherit; 48 | word-break: normal; 49 | } 50 | } 51 | 52 | // Enable scrollable blocks of code 53 | .pre-scrollable { 54 | max-height: $pre-scrollable-max-height; 55 | overflow-y: scroll; 56 | } 57 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_hover.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable indentation 2 | @mixin hover { 3 | // TODO: re-enable along with mq4-hover-shim 4 | // @if $enable-hover-media-query { 5 | // // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover 6 | // // Currently shimmed by https://github.com/twbs/mq4-hover-shim 7 | // @media (hover: hover) { 8 | // &:hover { @content } 9 | // } 10 | // } 11 | // @else { 12 | &:hover { @content; } 13 | // } 14 | } 15 | 16 | 17 | @mixin hover-focus { 18 | @if $enable-hover-media-query { 19 | &:focus { 20 | @content; 21 | } 22 | @include hover { @content; } 23 | } @else { 24 | &:focus, 25 | &:hover { 26 | @content; 27 | } 28 | } 29 | } 30 | 31 | @mixin plain-hover-focus { 32 | @if $enable-hover-media-query { 33 | &, 34 | &:focus { 35 | @content; 36 | } 37 | @include hover { @content; } 38 | } @else { 39 | &, 40 | &:focus, 41 | &:hover { 42 | @content; 43 | } 44 | } 45 | } 46 | 47 | @mixin hover-focus-active { 48 | @if $enable-hover-media-query { 49 | &:focus, 50 | &:active { 51 | @content; 52 | } 53 | @include hover { @content; } 54 | } @else { 55 | &:focus, 56 | &:active, 57 | &:hover { 58 | @content; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/javascript/view/SidebarHeaderView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | SwaggerUi.Views.SidebarHeaderView = Backbone.View.extend({ 4 | initialize: function (opts) { 5 | this.options = opts || {}; 6 | this.router = this.options.router; 7 | }, 8 | 9 | events: { 10 | }, 11 | 12 | render: function () { 13 | 14 | this.model.nickname = this.model.operationsArray[0].nickname; 15 | this.model.parentId = this.model.operation.parentId; 16 | 17 | $(this.el).html(Handlebars.templates.sidebar_header(this.model)); 18 | 19 | for (var i = 0; i < this.model.operationsArray.length; i++) { 20 | var item = this.model.operationsArray[i].operation; 21 | item.nickname = this.model.operationsArray[i].nickname; 22 | item.parentId = this.model.operation.parentId; 23 | this.addSidebarItem(item, i); 24 | } 25 | 26 | return this; 27 | }, 28 | 29 | addSidebarItem: function (item, i) { 30 | var sidebarItemView = new SwaggerUi.Views.SidebarItemView({ 31 | model: item, 32 | tagName: 'a', 33 | className : 'nav-link item', 34 | attributes: { 35 | "href": '#'+item.parentId + '_' + item.nickname 36 | }, 37 | router: this.router, 38 | swaggerOptions: this.options.swaggerOptions 39 | }); 40 | $('.sub_menu', $(this.el)).append(sidebarItemView.render().el); 41 | } 42 | }); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_alert.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Base styles 3 | // 4 | 5 | .alert { 6 | position: relative; 7 | padding: $alert-padding-y $alert-padding-x; 8 | margin-bottom: $alert-margin-bottom; 9 | border: $alert-border-width solid transparent; 10 | @include border-radius($alert-border-radius); 11 | } 12 | 13 | // Headings for larger alerts 14 | .alert-heading { 15 | // Specified to prevent conflicts of changing $headings-color 16 | color: inherit; 17 | } 18 | 19 | // Provide class for links that match alerts 20 | .alert-link { 21 | font-weight: $alert-link-font-weight; 22 | } 23 | 24 | 25 | // Dismissible alerts 26 | // 27 | // Expand the right padding and account for the close button's positioning. 28 | 29 | .alert-dismissible { 30 | padding-right: ($close-font-size + $alert-padding-x * 2); 31 | 32 | // Adjust close link position 33 | .close { 34 | position: absolute; 35 | top: 0; 36 | right: 0; 37 | padding: $alert-padding-y $alert-padding-x; 38 | color: inherit; 39 | } 40 | } 41 | 42 | 43 | // Alternate styles 44 | // 45 | // Generate contextual modifier classes for colorizing the alert. 46 | 47 | @each $color, $value in $theme-colors { 48 | .alert-#{$color} { 49 | @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_images.scss: -------------------------------------------------------------------------------- 1 | // Responsive images (ensure images don't scale beyond their parents) 2 | // 3 | // This is purposefully opt-in via an explicit class rather than being the default for all ``s. 4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2, 5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps) 6 | // which weren't expecting the images within themselves to be involuntarily resized. 7 | // See also https://github.com/twbs/bootstrap/issues/18178 8 | .img-fluid { 9 | @include img-fluid; 10 | } 11 | 12 | 13 | // Image thumbnails 14 | .img-thumbnail { 15 | padding: $thumbnail-padding; 16 | background-color: $thumbnail-bg; 17 | border: $thumbnail-border-width solid $thumbnail-border-color; 18 | @include border-radius($thumbnail-border-radius); 19 | @include box-shadow($thumbnail-box-shadow); 20 | 21 | // Keep them at most 100% wide 22 | @include img-fluid; 23 | } 24 | 25 | // 26 | // Figures 27 | // 28 | 29 | .figure { 30 | // Ensures the caption's text aligns with the image. 31 | display: inline-block; 32 | } 33 | 34 | .figure-img { 35 | margin-bottom: ($spacer / 2); 36 | line-height: 1; 37 | } 38 | 39 | .figure-caption { 40 | font-size: $figure-caption-font-size; 41 | color: $figure-caption-color; 42 | } 43 | -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | 10 | @mixin img-fluid { 11 | // Part 1: Set a maximum relative to the parent 12 | max-width: 100%; 13 | // Part 2: Override the height to auto, otherwise images will be stretched 14 | // when setting a width and height attribute on the img element. 15 | height: auto; 16 | } 17 | 18 | 19 | // Retina image 20 | // 21 | // Short retina mixin for setting background-image and -size. 22 | 23 | // stylelint-disable indentation, media-query-list-comma-newline-after 24 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 25 | background-image: url($file-1x); 26 | 27 | // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, 28 | // but doesn't convert dppx=>dpi. 29 | // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. 30 | // Compatibility info: https://caniuse.com/#feat=css-media-resolution 31 | @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx 32 | only screen and (min-resolution: 2dppx) { // Standardized 33 | background-image: url($file-2x); 34 | background-size: $width-1x $height-1x; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/javascript/doc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | $(function () { 5 | // When a sandbox form is submitted.. 6 | $("form.sandbox").submit(function () { 7 | var error_free = true; 8 | // Cycle through the forms required inputs 9 | $(this).find("input.required").each(function () { 10 | // Remove any existing error styles from the input 11 | $(this).removeClass('is-invalid'); 12 | 13 | // Tack the error style on if the input is empty.. 14 | if ($(this).val() === '') { 15 | $(this).addClass('is-invalid'); 16 | $(this).wiggle(); 17 | error_free = false; 18 | } 19 | 20 | }); 21 | return error_free; 22 | }); 23 | 24 | }); 25 | 26 | // Logging function that accounts for browsers that don't have window.console 27 | function log() { 28 | log.history = log.history || []; 29 | log.history.push(arguments); 30 | if (this.console) { 31 | console.log(Array.prototype.slice.call(arguments)[0]); 32 | } 33 | } 34 | 35 | // Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913) 36 | if (Function.prototype.bind && console && typeof console.log === "object") { 37 | [ 38 | "log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd" 39 | ].forEach(function (method) { 40 | console[method] = this.bind(console[method], console); 41 | }, Function.prototype.call); 42 | } 43 | -------------------------------------------------------------------------------- /lib/scrollPosStyler.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * ======================================================================== 4 | * ScrollPos-Styler v0.7.0 5 | * https://github.com/acch/scrollpos-styler 6 | * ======================================================================== 7 | * Copyright 2015 Achim Christ 8 | * Licensed under MIT (https://github.com/acch/scrollpos-styler/blob/master/LICENSE) 9 | * ======================================================================== */ 10 | var ScrollPosStyler=function(s,e){"use strict";function t(){n=e.pageYOffset;for(var s=[],t=0;i[t];++t){var a=i[t],l=a.getAttribute(m)||o,r=a.classList.contains(c);r&&n>l?s.push({element:a,addClass:f,removeClass:c}):!r&&n<=l&&s.push({element:a,addClass:c,removeClass:f})}return s}function a(s){for(var e=0;s[e];++e){var t=s[e];t.element.classList.add(t.addClass),t.element.classList.remove(t.removeClass)}l=!1}var n=0,l=!1,o=1,r="sps",i=s.getElementsByClassName(r),c="sps--abv",f="sps--blw",m="data-sps-offset",u={init:function(n){l=!0,n&&(n.spsClass&&(r=n.spsClass,i=s.getElementsByClassName(r)),o=n.scrollOffsetY||o,c=n.classAbove||c,f=n.classBelow||f,m=n.offsetTag||m);var u=t();u.length>0?e.requestAnimationFrame(function(){a(u)}):l=!1}};return s.addEventListener("DOMContentLoaded",function(){e.setTimeout(u.init,1)}),e.addEventListener("scroll",function(){if(!l){var s=t();s.length>0&&(l=!0,e.requestAnimationFrame(function(){a(s)}))}}),u}(document,window); -------------------------------------------------------------------------------- /dist/assets/lib/scrollPosStyler.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * ======================================================================== 4 | * ScrollPos-Styler v0.7.0 5 | * https://github.com/acch/scrollpos-styler 6 | * ======================================================================== 7 | * Copyright 2015 Achim Christ 8 | * Licensed under MIT (https://github.com/acch/scrollpos-styler/blob/master/LICENSE) 9 | * ======================================================================== */ 10 | var ScrollPosStyler=function(s,e){"use strict";function t(){n=e.pageYOffset;for(var s=[],t=0;i[t];++t){var a=i[t],l=a.getAttribute(m)||o,r=a.classList.contains(c);r&&n>l?s.push({element:a,addClass:f,removeClass:c}):!r&&n<=l&&s.push({element:a,addClass:c,removeClass:f})}return s}function a(s){for(var e=0;s[e];++e){var t=s[e];t.element.classList.add(t.addClass),t.element.classList.remove(t.removeClass)}l=!1}var n=0,l=!1,o=1,r="sps",i=s.getElementsByClassName(r),c="sps--abv",f="sps--blw",m="data-sps-offset",u={init:function(n){l=!0,n&&(n.spsClass&&(r=n.spsClass,i=s.getElementsByClassName(r)),o=n.scrollOffsetY||o,c=n.classAbove||c,f=n.classBelow||f,m=n.offsetTag||m);var u=t();u.length>0?e.requestAnimationFrame(function(){a(u)}):l=!1}};return s.addEventListener("DOMContentLoaded",function(){e.setTimeout(u.init,1)}),e.addEventListener("scroll",function(){if(!l){var s=t();s.length>0&&(l=!0,e.requestAnimationFrame(function(){a(s)}))}}),u}(document,window); -------------------------------------------------------------------------------- /src/main/vendor/bootstrap/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | flex-wrap: wrap; 4 | padding: $breadcrumb-padding-y $breadcrumb-padding-x; 5 | margin-bottom: $breadcrumb-margin-bottom; 6 | list-style: none; 7 | background-color: $breadcrumb-bg; 8 | @include border-radius($border-radius); 9 | } 10 | 11 | .breadcrumb-item { 12 | // The separator between breadcrumbs (by default, a forward-slash: "/") 13 | + .breadcrumb-item::before { 14 | display: inline-block; // Suppress underlining of the separator in modern browsers 15 | padding-right: $breadcrumb-item-padding; 16 | padding-left: $breadcrumb-item-padding; 17 | color: $breadcrumb-divider-color; 18 | content: "#{$breadcrumb-divider}"; 19 | } 20 | 21 | // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built 22 | // without `