improvement: expose docExpansion as a prop in swagger-ui-react (via #5242)

* improvement: expose docExpansion setting as a prop in swagger-ui-react

* Update README.md

* Update index.js

* Update README.md

* Update README.md
This commit is contained in:
Laurence Hudson
2019-03-20 02:04:34 +00:00
committed by kyle
parent 1a629886d6
commit 38def57c2d
2 changed files with 9 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ export default class SwaggerUI extends React.Component {
requestInterceptor: this.requestInterceptor,
responseInterceptor: this.responseInterceptor,
onComplete: this.onComplete,
docExpansion: this.props.docExpansion,
})
this.system = ui
@@ -80,4 +81,5 @@ SwaggerUI.propTypes = {
requestInterceptor: PropTypes.func,
responseInterceptor: PropTypes.func,
onComplete: PropTypes.func,
docExpansion: PropTypes.oneOf(['list', 'full', 'none']),
}