Skip to content

Commit 544d16d

Browse files
airamrgueztim-lai
andauthored
fix(swagger-ui-react): fix prop type for plugins (#7877)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
1 parent eece9f5 commit 544d16d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flavors/swagger-ui-react/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ SwaggerUI.propTypes = {
106106
PropTypes.oneOf(["get", "put", "post", "delete", "options", "head", "patch", "trace"])
107107
),
108108
queryConfigEnabled: PropTypes.bool,
109-
plugins: PropTypes.arrayOf(PropTypes.object),
109+
plugins: PropTypes.oneOfType([
110+
PropTypes.arrayOf(PropTypes.object),
111+
PropTypes.func,
112+
]),
110113
displayOperationId: PropTypes.bool,
111114
showMutatedRequest: PropTypes.bool,
112115
defaultModelExpandDepth: PropTypes.number,

0 commit comments

Comments
 (0)