Compare commits

..
Author SHA1 Message Date
Kyle Shockey 5b6da05c4a re-pin selenium dependency version 2018-06-21 22:32:05 -07:00
Kyle Shockey 067f51bf04 drop unused dependencies from package.json 2018-06-21 22:31:19 -07:00
Kyle Shockey 6abc50ce66 Merge branch 'bug/update-dev-dependencies' of https://github.com/dennisroche/swagger-ui 2018-06-21 21:40:01 -07:00
Dennis Roche 8e510b84f4 Merge branch 'master' into bug/update-dev-dependencies 2018-05-30 11:26:01 +10:00
Dennis Roche 5789c8d17f Merge branch 'master' into bug/update-dev-dependencies 2018-05-22 14:14:16 +08:00
kyle 973c1254a1 Merge branch 'master' into bug/update-dev-dependencies 2018-05-21 20:46:08 -07:00
Dennis Roche 567154dcb9 Unused dependencies
* brace
* getbase
* matcher
* promise-worker
* react-addons-test-utils
* react-height
* redux-logger
* scroll-to-element
* shallowequal
* whatwg-fetch
2018-05-11 20:13:55 +08:00
Dennis Roche f13db314ea Update to react-inspector and Remove react-addons-shallow-compare as no longer used/required in 15.6 2018-05-11 20:13:55 +08:00
Dennis Roche e303ce4cf2 Update production dependencies 2018-05-11 20:13:55 +08:00
Dennis Roche d97fc6c502 Update webpack to v3 and fix package warnings 2018-05-11 20:13:54 +08:00
Dennis Roche aa66d4b9e3 Update other dev dependencies, one at time 2018-05-11 20:08:13 +08:00
Dennis Roche 232d39e3fc Update patch and minor dev dependencies 2018-05-11 20:08:13 +08:00
Dennis Roche 6951c0e649 Remove karma* as no longer used. mocha is the test runner now 2018-05-11 20:08:13 +08:00
Dennis Roche afabbcea46 Add package-lock 2018-05-11 20:08:13 +08:00
7 changed files with 9 additions and 56 deletions
+4
View File
@@ -41,6 +41,10 @@
{
"expose": "less",
"src": "src/less"
},
{
"expose": "base",
"src": "npm:getbase/src/less/base"
}
]
]
+3 -1
View File
@@ -141,7 +141,9 @@ module.exports = function(rules, options) {
"node_modules"
],
extensions: [".web.js", ".js", ".jsx", ".json", ".less"],
alias: {}
alias: {
base: "getbase/src/less/base",
}
},
devtool: specialOptions.sourcemaps ? "nosource-source-map" : false,
+1 -5
View File
@@ -41,7 +41,6 @@ export default class Models extends Component {
const ModelWrapper = getComponent("ModelWrapper")
const Collapse = getComponent("Collapse")
const ModelCollapse = getComponent("ModelCollapse")
const JumpToPath = getComponent("JumpToPath")
return <section className={ showModels ? "models is-open" : "models"}>
<h4 onClick={() => layoutActions.show("models", !showModels)}>
@@ -65,13 +64,11 @@ export default class Models extends Component {
this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(), name])
}
const specPath = Im.List([...specPathBase, name])
const content = <ModelWrapper name={ name }
expandDepth={ defaultModelsExpandDepth }
schema={ schema || Im.Map() }
displayName={displayName}
specPath={specPath}
specPath={Im.List([...specPathBase, name])}
getComponent={ getComponent }
specSelectors={ specSelectors }
getConfigs = {getConfigs}
@@ -85,7 +82,6 @@ export default class Models extends Component {
</span>
return <div id={ `model-${name}` } className="model-container" key={ `models-section-${name}` }>
<span className="models-jump-to-path"><JumpToPath specPath={specPath} /></span>
<ModelCollapse
classes="model-box"
collapsedContent={this.getCollapsedContent(name)}
-1
View File
@@ -29,7 +29,6 @@ export const sampleFromSchema = (schema, config={}) => {
let { type, example, properties, additionalProperties, items } = objectify(schema)
let { includeReadOnly, includeWriteOnly } = config
if(example !== undefined) {
return deeplyStripKey(example, "$$ref", (val) => {
// do a couple of quick sanity tests to ensure the value
+1 -1
View File
@@ -742,7 +742,7 @@ export const getCommonExtensions = (defObj) => defObj.filter((v, k) => /^pattern
// `predicate` can be used to discriminate the stripping further,
// by preserving the key's place in the object based on its value.
export function deeplyStripKey(input, keyToStrip, predicate = () => true) {
if(typeof input !== "object" || Array.isArray(input) || input === null || !keyToStrip) {
if(typeof input !== "object" || Array.isArray(input) || !keyToStrip) {
return input
}
-8
View File
@@ -166,7 +166,6 @@ section.models
.model-container
{
margin: 0 20px 15px;
position: relative;
transition: all .5s;
@@ -187,13 +186,6 @@ section.models
{
margin: 0 20px;
}
.models-jump-to-path {
position: absolute;
top: 8px;
right: 5px;
opacity: 0.65;
}
}
.model-box
-40
View File
@@ -379,46 +379,6 @@ describe("sampleFromSchema", function() {
expect(sampleFromSchema(definition)).toEqual(expected)
})
it("returns null for a null example", function() {
var definition = {
"type": "object",
"properties": {
"foo": {
"type": "string",
"nullable": true,
"example": null
}
}
}
var expected = {
foo: null
}
expect(sampleFromSchema(definition)).toEqual(expected)
})
it("returns null for a null object-level example", function() {
var definition = {
"type": "object",
"properties": {
"foo": {
"type": "string",
"nullable": true
}
},
"example": {
"foo": null
}
}
var expected = {
foo: null
}
expect(sampleFromSchema(definition)).toEqual(expected)
})
})
})