Mastering Development

How to integrate swagger document in React js application

I would like to integrate customized swagger document into Reactjs application. For that i found npm package swagger-ui-react but it didn’t have an option to incorporate customized one. its only allowing url based specification. Any help would be greatly appreciated!