Selaa lähdekoodia

Merge branch 'master' of github.com:swagger-api/swagger-ui into bug/3405-default-scheme-change

bubble
Owen Conti 7 vuotta sitten
vanhempi
commit
c10702d24e
17 muutettua tiedostoa jossa 105 lisäystä ja 240 poistoa
  1. +5
    -0
      README.md
  2. +0
    -1
      make-webpack-config.js
  3. +0
    -1
      package.json
  4. +0
    -1
      src/core/plugins/split-pane-mode/components/split-pane-mode.jsx
  5. +0
    -5
      src/core/plugins/split-pane-mode/components/split-pane-mode.less
  6. +0
    -52
      src/plugins/topbar/topbar.less
  7. +0
    -2
      src/standalone/index.js
  8. +3
    -0
      src/style/_split-pane-mode.scss
  9. +1
    -0
      src/style/main.scss
  10. +12
    -44
      webpack-dist-bundle.config.js
  11. +11
    -44
      webpack-dist-standalone.config.js
  12. +9
    -50
      webpack-dist.config.js
  13. +24
    -33
      webpack-hot-dev-server.config.js
  14. +1
    -1
      webpack-watch.config.js
  15. +4
    -5
      webpack.check.js
  16. +1
    -1
      webpack.config.js
  17. +34
    -0
      webpack.dist-style.config.js

+ 5
- 0
README.md Näytä tiedosto

@@ -146,6 +146,7 @@ displayOperationId | Controls the display of operationId in operations list. The
displayRequestDuration | Controls the display of the request duration (in milliseconds) for `Try it out` requests. The default is `false`.
maxDisplayedTags | If set, limits the number of tagged operations displayed to at most this many. The default is to show all operations.
filter | If set, enables filtering. The top bar will show an edit box that you can use to filter the tagged operations that are shown. Can be true/false to enable or disable, or an explicit filter string in which case filtering will be enabled using that string as the filter expression. Filtering is case sensitive matching the filter expression anywhere inside the tag.
deepLinking | If set to `true`, enables dynamic deep linking for tags and operations. [Docs](https://github.com/swagger-api/swagger-ui/blob/master/docs/deep-linking.md)

### Plugins

@@ -235,6 +236,10 @@ Access-Control-Allow-Headers: Content-Type, api_key, Authorization

Only headers with these names will be allowed to be sent by Swagger-UI.

## Security contact

Please disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.

## License

Copyright 2017 SmartBear Software


+ 0
- 1
make-webpack-config.js Näytä tiedosto

@@ -61,7 +61,6 @@ module.exports = function(rules, options) {
}

if( specialOptions.minimize ) {

plugins.push(
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,


+ 0
- 1
package.json Näytä tiedosto

@@ -109,7 +109,6 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "2.0.3",
"less": "2.7.2",
"less-loader": "4.0.4",
"license-checker": "^11.0.0",
"mocha": "^3.4.2",
"node-sass": "^4.5.0",


+ 0
- 1
src/core/plugins/split-pane-mode/components/split-pane-mode.jsx Näytä tiedosto

@@ -1,7 +1,6 @@
import React from "react"
import PropTypes from "prop-types"
import SplitPane from "react-split-pane"
import "./split-pane-mode.less"

const MODE_KEY = ["split-pane-mode"]
const MODE_LEFT = "left"


+ 0
- 5
src/core/plugins/split-pane-mode/components/split-pane-mode.less Näytä tiedosto

@@ -1,5 +0,0 @@
.swagger-ui {
.Resizer.vertical.disabled {
display: none;
}
}

+ 0
- 52
src/plugins/topbar/topbar.less Näytä tiedosto

@@ -1,52 +0,0 @@
.swagger-ui {
.topbar {
background-color: #89bf04;
}

.topbar-wrapper {
padding: 0.7em;
}

.topbar-logo__img {
float: left;
}

.topbar-logo__title {
display: inline-block;
color: #fff;
font-size: 1.5em;
font-weight: bold;
margin: 0.15em 0 0 0.5em;
}

.download-url-wrapper {
text-align: right;
float: right;
}

.topbar .download-url__text {
width: 28em;
height: 2em;
margin-right: 0.5em;
}

.download-url__btn {
background-color: #547f00;
border-color: #547f00;
text-decoration: none;
font-weight: bold;
padding: 0.2em 0.3em;
color: white;
border-radius: 0.1em;

&:hover {
&:extend(.download-url__btn);
}
}

.center-700 {
display: block;
margin: 0 auto;
width: 45em;
}
}

+ 0
- 2
src/standalone/index.js Näytä tiedosto

@@ -1,6 +1,4 @@
import StandaloneLayout from "./layout"
import "../style/main.scss"

import TopbarPlugin from "plugins/topbar"
import ConfigsPlugin from "plugins/configs"



+ 3
- 0
src/style/_split-pane-mode.scss Näytä tiedosto

@@ -0,0 +1,3 @@
.Resizer.vertical.disabled {
display: none;
}

+ 1
- 0
src/style/main.scss Näytä tiedosto

@@ -14,4 +14,5 @@
@import 'information';
@import 'authorize';
@import 'errors';
@import 'split-pane-mode';
}

+ 12
- 44
webpack-dist-bundle.config.js Näytä tiedosto

@@ -1,64 +1,32 @@
var path = require('path')
var rules = [
const path = require("path")
const styleRules = require("./webpack.dist-style.config.js")

let rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: 'worker-loader',
loader: "worker-loader",
options: {
inline: true,
name: '[name].js'
}
},
{ loader: 'babel-loader' }
]
},
{ test: /\.(css)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
'postcss-loader'
]
},
{ test: /\.(scss)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: { sourceMap: true }
},
{ loader: 'sass-loader',
options: {
outputStyle: 'expanded',
sourceMap: true,
sourceMapContents: 'true'
name: "[name].js"
}
}
]
},
{ test: /\.(less)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
},
'less-loader'
{ loader: "babel-loader" }
]
}
]

module.exports = require('./make-webpack-config.js')(rules, {
module.exports = require("./make-webpack-config.js")(rules, {
_special: {
separateStylesheets: false,
separateStylesheets: true,
minimize: true,
sourcemaps: true,
},

entry: {
'swagger-ui-bundle': [
'./src/polyfills',
'./src/core/index.js'
"swagger-ui-bundle": [
"./src/polyfills",
"./src/core/index.js"
]
},



+ 11
- 44
webpack-dist-standalone.config.js Näytä tiedosto

@@ -1,65 +1,32 @@
var path = require('path')
const path = require("path")
const styleRules = require("./webpack.dist-style.config.js")

var rules = [
let rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: 'worker-loader',
loader: "worker-loader",
options: {
inline: true,
name: '[name].js'
name: "[name].js"
}
},
{ loader: 'babel-loader' }
]
},
{ test: /\.(css)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
'postcss-loader'
]
},
{ test: /\.(scss)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: { sourceMap: true }
},
{ loader: 'sass-loader',
options: {
outputStyle: 'expanded',
sourceMap: true,
sourceMapContents: 'true'
}
}
]
},
{ test: /\.(less)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
},
'less-loader'
{ loader: "babel-loader" }
]
}
]

module.exports = require('./make-webpack-config.js')(rules, {
module.exports = require("./make-webpack-config.js")(rules, {
_special: {
separateStylesheets: false,
separateStylesheets: true,
minimize: true,
sourcemaps: true,
},

entry: {
'swagger-ui-standalone-preset': [
'./src/polyfills',
'./src/standalone/index.js'
"swagger-ui-standalone-preset": [
"./src/polyfills",
"./src/standalone/index.js"
]
},



+ 9
- 50
webpack-dist.config.js Näytä tiedosto

@@ -1,66 +1,25 @@
var path = require('path')
var fs = require('fs')
const path = require("path")
const fs = require("fs")
const nodeModules = fs.readdirSync("node_modules").filter(function(x) { return x !== ".bin" })
var ExtractTextPlugin = require('extract-text-webpack-plugin')
const styleRules = require("./webpack.dist-style.config.js")

var rules = [
let rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: 'worker-loader',
loader: "worker-loader",
options: {
inline: true,
name: '[name].js'
name: "[name].js"
}
},
{ loader: 'babel-loader' }
{ loader: "babel-loader" }
]
},
{ test: /\.(css)(\?.*)?$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
'css-loader',
'postcss-loader'
]
})
},
{ test: /\.(scss)(\?.*)?$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: { minimize: true }
},
{
loader: 'postcss-loader',
options: { sourceMap: true }
},
{ loader: 'sass-loader',
options: {
outputStyle: 'expanded',
sourceMap: true,
sourceMapContents: 'true'
}
}
]
})
},
{ test: /\.(less)(\?.*)?$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader',
{
loader: 'postcss-loader',
},
'less-loader'
]
})
}
]
rules = rules.concat(styleRules)

module.exports = require('./make-webpack-config.js')(rules, {
module.exports = require("./make-webpack-config.js")(rules, {
_special: {
separateStylesheets: true,
minimize: true,


+ 24
- 33
webpack-hot-dev-server.config.js Näytä tiedosto

@@ -1,56 +1,46 @@
var path = require('path')
const path = require("path")

var rules = [
const rules = [
{ test: /\.(worker\.js)(\?.*)?$/,
use: [
{
loader: 'worker-loader',
loader: "worker-loader",
options: {
inline: true
}
},
{ loader: 'babel-loader' }
{ loader: "babel-loader" }
]
},
{ test: /\.(jsx)(\?.*)?$/,
use: [
{ loader: 'react-hot-loader' },
{ loader: 'babel-loader' }
{ loader: "react-hot-loader" },
{ loader: "babel-loader" }
]
},
{ test: /\.(css)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
'postcss-loader'
"style-loader",
"css-loader",
"postcss-loader"
]
},
{ test: /\.(scss)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
"style-loader",
"css-loader",
{
loader: 'postcss-loader',
loader: "postcss-loader",
options: { sourceMap: true }
},
{ loader: 'sass-loader',
{ loader: "sass-loader",
options: {
outputStyle: 'expanded',
outputStyle: "expanded",
sourceMap: true,
sourceMapContents: 'true'
sourceMapContents: "true"
}
}
]
},
{ test: /\.(less)(\?.*)?$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
},
'less-loader'
]
}
]

@@ -60,25 +50,26 @@ module.exports = require("./make-webpack-config")(rules, {
},
devtool: "eval",
entry: {
'swagger-ui-bundle': [
'./src/polyfills',
'./src/core/index.js'
"swagger-ui-bundle": [
"./src/polyfills",
"./src/core/index.js"
],
'swagger-ui-standalone-preset': [
'./src/polyfills',
'./src/standalone/index.js',
"swagger-ui-standalone-preset": [
"./src/style/main.scss",
"./src/polyfills",
"./src/standalone/index.js",
]
},
output: {
pathinfo: true,
filename: '[name].js',
filename: "[name].js",
library: "[name]",
libraryTarget: "umd",
chunkFilename: "[id].js"
},
devServer: {
port: 3200,
contentBase: path.join(__dirname, 'dev-helpers'),
contentBase: path.join(__dirname, "dev-helpers"),
publicPath: "/",
noInfo: true,
hot: true,


+ 1
- 1
webpack-watch.config.js Näytä tiedosto

@@ -1,3 +1,3 @@
var config = require("./webpack-dist.config.js")
const config = require("./webpack-dist.config.js")

module.exports = config

+ 4
- 5
webpack.check.js Näytä tiedosto

@@ -1,8 +1,7 @@
const webpack = require('webpack')
const path = require('path')
const deepMerge = require('deepmerge')
const webpackConfig = require('./webpack-dist-bundle.config.js')
const DEPS_CHECK_DIR = require('./package.json').config.deps_check_dir
const path = require("path")
const deepMerge = require("deepmerge")
const webpackConfig = require("./webpack-dist-bundle.config.js")
const DEPS_CHECK_DIR = require("./package.json").config.deps_check_dir

module.exports = deepMerge(
webpackConfig, {


+ 1
- 1
webpack.config.js Näytä tiedosto

@@ -1,3 +1,3 @@
module.exports = require("./make-webpack-config")({

});
})

+ 34
- 0
webpack.dist-style.config.js Näytä tiedosto

@@ -0,0 +1,34 @@
const ExtractTextPlugin = require("extract-text-webpack-plugin")

module.exports = [{
test: /\.(css)(\?.*)?$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
"css-loader",
"postcss-loader"
]
})
},
{ test: /\.(scss)(\?.*)?$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: "css-loader",
options: { minimize: true }
},
{
loader: "postcss-loader",
options: { sourceMap: true }
},
{ loader: "sass-loader",
options: {
outputStyle: "expanded",
sourceMap: true,
sourceMapContents: "true"
}
}
]
})
}]

Ladataan…
Peruuta
Tallenna