diff --git a/flavors/swagger-ui-react/README.md b/flavors/swagger-ui-react/README.md index 8a026e9f12d..5986dd2b1ee 100644 --- a/flavors/swagger-ui-react/README.md +++ b/flavors/swagger-ui-react/README.md @@ -77,6 +77,12 @@ The default expansion depth for models (set to -1 completely hide the models). ⚠️ This prop is currently only applied once, on mount. Changes to this prop's value will not be propagated to the underlying Swagger UI instance. A future version of this module will remove this limitation, and the change will not be considered a breaking change. +#### `displayOperationId`: PropTypes.bool + +Controls the display of operationId in operations list. The default is false. + +⚠️ This prop is currently only applied once, on mount. Changes to this prop's value will not be propagated to the underlying Swagger UI instance. A future version of this module will remove this limitation, and the change will not be considered a breaking change. + #### `plugins`: PropTypes.arrayOf(PropTypes.object), An array of objects that augment and modify Swagger UI's functionality. See Swagger UI's [Plugin API](https://github.com/swagger-api/swagger-ui/blob/master/docs/customization/plugin-api.md) for more details. diff --git a/flavors/swagger-ui-react/index.js b/flavors/swagger-ui-react/index.js index efb4cb244b9..8a58dd031b0 100644 --- a/flavors/swagger-ui-react/index.js +++ b/flavors/swagger-ui-react/index.js @@ -20,6 +20,7 @@ export default class SwaggerUI extends React.Component { docExpansion: this.props.docExpansion, supportedSubmitMethods: this.props.supportedSubmitMethods, defaultModelExpandDepth: this.props.defaultModelExpandDepth, + displayOperationId: this.props.displayOperationId, }) this.system = ui @@ -90,6 +91,7 @@ SwaggerUI.propTypes = { ), defaultModelExpandDepth: PropTypes.number, plugins: PropTypes.arrayOf(PropTypes.object), + displayOperationId: PropTypes.bool, } SwaggerUI.defaultProps = {