React OpenAPI component
npm install --save @tx-dts/react-openapi-renderer
or
yarn add @tx-dts/react-openapi-renderer
You can also check out the example and how library works - here.
import React, { Component } from "react";
import ReactOpenApiRenderer from "@tx-dts/react-openapi-renderer";
import "@tx-dts/react-openapi-renderer/dist/index.css";
class Example extends Component {
render() {
const jsonSpecification = {};
return <ReactOpenApiRenderer specification={jsonSpecification} />;
}
}
Here is the link to example JSON documentation that you can try out.
Currently you have to manually include Bootstrap CSS and JS files:
CSS - inside head tag
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
crossorigin="anonymous"
/>
Bootstrap JS Scripts - at the bottom of body tag
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc"
crossorigin="anonymous"
></script>
If you want to contribute, please feel free to do so by following our contribution guideline.
Apache 2.0 © tamediadigital