feat(swagger-ui-react): add deeplinking as prop (#6424)
Co-authored-by: Ranjith Varma <ranjith.varma@hatio.in> Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ export default class SwaggerUI extends React.Component {
|
|||||||
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
|
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
|
||||||
displayOperationId: this.props.displayOperationId,
|
displayOperationId: this.props.displayOperationId,
|
||||||
showMutatedRequest: typeof this.props.showMutatedRequest === "boolean" ? this.props.showMutatedRequest : true,
|
showMutatedRequest: typeof this.props.showMutatedRequest === "boolean" ? this.props.showMutatedRequest : true,
|
||||||
|
deepLinking: typeof this.props.deepLinking === "boolean" ? this.props.deepLinking : false,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.system = ui
|
this.system = ui
|
||||||
@@ -96,11 +97,13 @@ SwaggerUI.propTypes = {
|
|||||||
showMutatedRequest: PropTypes.bool,
|
showMutatedRequest: PropTypes.bool,
|
||||||
defaultModelExpandDepth: PropTypes.number,
|
defaultModelExpandDepth: PropTypes.number,
|
||||||
presets: PropTypes.arrayOf(PropTypes.func),
|
presets: PropTypes.arrayOf(PropTypes.func),
|
||||||
|
deepLinking: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
SwaggerUI.defaultProps = {
|
SwaggerUI.defaultProps = {
|
||||||
supportedSubmitMethods: ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'],
|
supportedSubmitMethods: ['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'],
|
||||||
docExpansion: "list",
|
docExpansion: "list",
|
||||||
defaultModelsExpandDepth: 1,
|
defaultModelsExpandDepth: 1,
|
||||||
presets: []
|
presets: [],
|
||||||
|
deepLinking: false,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user