Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
const ui = swaggerUIConstructor({
spec: this.props.spec,
url: this.props.url,
defaultModelsExpandDepth: this.props.defaultModelsExpandDepth,
presets: [presets.apis, ...this.props.presets],
requestInterceptor: this.requestInterceptor,
responseInterceptor: this.responseInterceptor,
onComplete: this.onComplete,
docExpansion: this.props.docExpansion,
});
this.system = ui;
this.SwaggerUIComponent = ui.getComponent('App', 'root');
this.forceUpdate();
}
componentDidMount() {
SwaggerUi({
dom_id: '#swaggerContainer',
url: `${config.apiRoot}/openapi.json`,
presets: [presets.apis],
defaultModelRendering: 'model',
supportedSubmitMethods: ['get']
});
}
componentDidMount() {
SwaggerUi({
dom_id: '#swaggerContainer',
url: this.props.url,
presets: [presets.apis],
})
}