Explorar el Código

Merge branch 'master' into TopbarPluginWithSelect

bubble
Jesse Mandel hace 7 años
committed by GitHub
padre
commit
e8a5d0d721
Se han modificado 13 ficheros con 88 adiciones y 99 borrados
  1. +1
    -1
      README.md
  2. +46
    -47
      dist/swagger-ui-bundle.js
  3. +1
    -1
      dist/swagger-ui-bundle.js.map
  4. +7
    -8
      dist/swagger-ui-standalone-preset.js
  5. +1
    -1
      dist/swagger-ui-standalone-preset.js.map
  6. +9
    -9
      dist/swagger-ui.js
  7. +1
    -1
      dist/swagger-ui.js.map
  8. +2
    -2
      package.json
  9. +2
    -7
      src/core/components/operation.jsx
  10. +2
    -7
      src/core/components/param-body.jsx
  11. +9
    -7
      src/core/components/response.jsx
  12. +2
    -7
      src/core/json-schema-components.js
  13. +5
    -1
      src/core/plugins/samples/fn.js

+ 1
- 1
README.md Ver fichero

@@ -22,7 +22,7 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20

Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
------------------ | ------------ | -------------------------- | ----- | ------
3.0.16 | 2017-06-17 | 2.0 | [tag v3.0.16](https://github.com/swagger-api/swagger-ui/tree/v3.0.16) |
3.0.17 | 2017-06-23 | 2.0 | [tag v3.0.17](https://github.com/swagger-api/swagger-ui/tree/v3.0.17) |
2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10) |
2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |


+ 46
- 47
dist/swagger-ui-bundle.js
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1
- 1
dist/swagger-ui-bundle.js.map Ver fichero

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAmqDA;AAorJA;AAiiCA;AAm1GA;AAiwHA;AAg9FA;AAo/EA;AA+tDA;AAq/CA;AAwkDA;AAk/CA;;;;;AA60EA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AAknGA;AA4iEA;AA43DA;AAgnDA;AA6eA;;;;;;AAsvGA;AA+1HA;AA0+DA;;;;;AAwiBA;AAgsFA;AA6kDA;AAq3CA;AA4wFA;AAk3CA;AA2iFA;;;;;;;;;AAwqEA;AA2zIA;AAu7FA;AAmrFA;AAi7EA;;;;;;AAiRA;AA+qHA;AAs7GA","sourceRoot":""}
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA+4CA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA81IA;AAwuGA;AA01FA;AAkjFA;AAs3FA;AAi+CA;AA29CA;AAmtCA;AAuyEA;;;;;AAwiDA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AA8nGA;AA+iEA;AAw3DA;AA4nDA;AAknBA;;;;;;AAg1FA;AAggGA;;;;;AA23CA;AAgsFA;AA6kDA;AA01CA;AA8yFA;AA61CA;AA0jFA;;;;;;;;;AA6pEA;AA2zIA;AAu7FA;AAmrFA;AAq/EA","sourceRoot":""}

+ 7
- 8
dist/swagger-ui-standalone-preset.js
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1
- 1
dist/swagger-ui-standalone-preset.js.map Ver fichero

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;AA+uFA;;;;;AAyOA;AAo7GA;AAw0FA;;;;;;AAmZA;AA+uFA;AAy+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;;;;;AA+tEA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}

+ 9
- 9
dist/swagger-ui.js
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1
- 1
dist/swagger-ui.js.map Ver fichero

@@ -1 +1 @@
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAylFA;;;;;;AAg5CA;AA2pHA;AA6qIA;AAi+FA;AAyvDA;AAmzCA;AA+xCA","sourceRoot":""}
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AA+nEA;;;;;;AAmgBA;AA2pHA;AA0pIA;AA09FA;AA0+CA;AAs0CA;AAgvCA","sourceRoot":""}

+ 2
- 2
package.json Ver fichero

@@ -1,6 +1,6 @@
{
"name": "swagger-ui",
"version": "3.0.16",
"version": "3.0.17",
"main": "dist/swagger-ui.js",
"repository": "git@github.com:swagger-api/swagger-ui.git",
"contributors": [
@@ -69,7 +69,7 @@
"sanitize-html": "^1.14.1",
"serialize-error": "2.0.0",
"shallowequal": "0.2.2",
"swagger-client": "3.0.15",
"swagger-client": "3.0.16",
"url-parse": "^1.1.8",
"whatwg-fetch": "0.11.1",
"worker-loader": "^0.7.1",


+ 2
- 7
src/core/components/operation.jsx Ver fichero

@@ -1,11 +1,10 @@
import React, { PropTypes } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PureComponent, PropTypes } from "react"
import { getList } from "core/utils"
import * as CustomPropTypes from "core/proptypes"

//import "less/opblock"

export default class Operation extends React.Component {
export default class Operation extends PureComponent {
static propTypes = {
path: PropTypes.string.isRequired,
method: PropTypes.string.isRequired,
@@ -70,10 +69,6 @@ export default class Operation extends React.Component {
}
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

toggleShown =() => {
let { layoutActions, isShownKey } = this.props
layoutActions.show(isShownKey, !this.isShown())


+ 2
- 7
src/core/components/param-body.jsx Ver fichero

@@ -1,11 +1,10 @@
import React, { Component, PropTypes } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PureComponent, PropTypes } from "react"
import { fromJS, List } from "immutable"
import { getSampleSchema } from "core/utils"

const NOOP = Function.prototype

export default class ParamBody extends Component {
export default class ParamBody extends PureComponent {

static propTypes = {
param: PropTypes.object,
@@ -41,10 +40,6 @@ export default class ParamBody extends Component {
this.updateValues.call(this, this.props)
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

componentWillReceiveProps(nextProps) {
this.updateValues.call(this, nextProps)
}


+ 9
- 7
src/core/components/response.jsx Ver fichero

@@ -5,14 +5,16 @@ import { getSampleSchema } from "core/utils"
const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => {
if ( examples && examples.size ) {
return examples.entrySeq().map( ([ key, example ]) => {
let exampleValue
try {
exampleValue = example && example.toJS ? example.toJS() : example
exampleValue = JSON.stringify(exampleValue, null, 2)
}
catch(e) {
exampleValue = String(example)
let exampleValue = example
if ( example.toJS ) {
try {
exampleValue = JSON.stringify(example.toJS(), null, 2)
}
catch(e) {
exampleValue = String(example)
}
}

return (<div key={ key }>
<h5>{ key }</h5>
<HighlightCode className="example" value={ exampleValue } />


+ 2
- 7
src/core/json-schema-components.js Ver fichero

@@ -1,5 +1,4 @@
import React, { PropTypes, Component } from "react"
import shallowCompare from "react-addons-shallow-compare"
import React, { PropTypes, PureComponent, Component } from "react"
import { List, fromJS } from "immutable"
//import "less/json-schema-form"

@@ -74,7 +73,7 @@ export class JsonSchema_string extends Component {
}
}

export class JsonSchema_array extends Component {
export class JsonSchema_array extends PureComponent {

static propTypes = JsonSchemaPropShape
static defaultProps = JsonSchemaDefaultProps
@@ -89,10 +88,6 @@ export class JsonSchema_array extends Component {
this.setState({value: props.value})
}

shouldComponentUpdate(props, state) {
return shallowCompare(this, props, state)
}

onChange = () => this.props.onChange(this.state.value)

onItemChange = (itemVal, i) => {


+ 5
- 1
src/core/plugins/samples/fn.js Ver fichero

@@ -9,7 +9,7 @@ const primitives = {
"number": () => 0,
"number_float": () => 0.0,
"integer": () => 0,
"boolean": () => true
"boolean": (schema) => typeof schema.default === "boolean" ? schema.default : true
}

const primitive = (schema) => {
@@ -74,6 +74,10 @@ export const sampleFromSchema = (schema, config={}) => {
return normalizeArray(schema["enum"])[0]
}

if (type === "file") {
return
}

return primitive(schema)
}



Cargando…
Cancelar
Guardar