fix(swagger-ui-react): amend prop validation for plugins (#7900)

plugins prop can be defined as list of function as well.
This commit is contained in:
Vladimir Gorej
2022-03-10 12:15:21 +01:00
committed by GitHub
parent 08829b1d06
commit 5874d2be4f

View File

@@ -108,6 +108,7 @@ SwaggerUI.propTypes = {
queryConfigEnabled: PropTypes.bool, queryConfigEnabled: PropTypes.bool,
plugins: PropTypes.oneOfType([ plugins: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.object), PropTypes.arrayOf(PropTypes.object),
PropTypes.arrayOf(PropTypes.func),
PropTypes.func, PropTypes.func,
]), ]),
displayOperationId: PropTypes.bool, displayOperationId: PropTypes.bool,