未验证 提交 6b12f150 编写于 作者: R Ranjith Varma 提交者: GitHub

feat(swagger-ui-react): add deeplinking as prop (#6424)

Co-authored-by: NRanjith Varma <ranjith.varma@hatio.in>
Co-authored-by: NTim Lai <timothy.lai@gmail.com>
上级 969faa73
......@@ -23,6 +23,7 @@ export default class SwaggerUI extends React.Component {
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
displayOperationId: this.props.displayOperationId,
showMutatedRequest: typeof this.props.showMutatedRequest === "boolean" ? this.props.showMutatedRequest : true,
deepLinking: typeof this.props.deepLinking === "boolean" ? this.props.deepLinking : false,
})
this.system = ui
......@@ -96,11 +97,13 @@ SwaggerUI.propTypes = {
showMutatedRequest: PropTypes.bool,
defaultModelExpandDepth: PropTypes.number,
presets: PropTypes.arrayOf(PropTypes.func),
deepLinking: PropTypes.bool,
}
SwaggerUI.defaultProps = {
supportedSubmitMethods: ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'],
docExpansion: "list",
defaultModelsExpandDepth: 1,
presets: []
presets: [],
deepLinking: false,
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册