">
<react-openapi-designer id="abcdef" /> <script type="text/javascript"> window.onload = function () { var doc = document.getElementById("abcdef") doc.addEventListener("specChanged", function (e) { e.data.text().then((s) => { const spec = JSON.parse(s); console.log("spec in yaml syntax", spec.yaml) console.log("spec in json syntax", spec.json) }) }) } </script>
Adding a external url for host mocking for the spec, will show up as a mock url in the Samples
widget.
<react-openapi-designer mock-url="http://domain.tld/your/mock/url" />
To start local development, clone this repo.
git clone https://.com/codeasashu/react-openapi-designer
Then, install npm modules
npm install
and finally start dev server:
npm run dev