feat(swagger-ui-react): Enable displayRequestDuration prop (#7522)

* feat(react): allow displayRequestDuration via react

* docs(react): added displayRequestDuration prop

* Update flavors/swagger-ui-react/README.md

Co-authored-by: Vladimir Gorej <vladimir.gorej@gmail.com>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
Mahtis Michel
2022-01-18 19:24:34 +01:00
committed by GitHub
parent 3af8acf758
commit 85597b9a94
2 changed files with 7 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ export default class SwaggerUI extends React.Component {
defaultModelExpandDepth: this.props.defaultModelExpandDepth,
displayOperationId: this.props.displayOperationId,
tryItOutEnabled: this.props.tryItOutEnabled,
displayRequestDuration: this.props.displayRequestDuration,
requestSnippetsEnabled: this.props.requestSnippetsEnabled,
requestSnippets: this.props.requestSnippets,
showMutatedRequest: typeof this.props.showMutatedRequest === "boolean" ? this.props.showMutatedRequest : true,
@@ -118,6 +119,7 @@ SwaggerUI.propTypes = {
requestSnippetsEnabled: PropTypes.bool,
requestSnippets: PropTypes.object,
tryItOutEnabled: PropTypes.bool,
displayRequestDuration: PropTypes.bool,
}
SwaggerUI.defaultProps = {
@@ -129,6 +131,7 @@ SwaggerUI.defaultProps = {
defaultModelRendering: "example",
presets: [],
deepLinking: false,
displayRequestDuration: false,
showExtensions: false,
filter: false,
requestSnippetsEnabled: false,