@tx-dts/react-openapi-renderer
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

react-openapi-renderer

React OpenAPI component

NPM JavaScript Style Guide

Install

npm install --save @tx-dts/react-openapi-renderer

or

yarn add @tx-dts/react-openapi-renderer

UI

react-open-api-renderer

You can also check out the example and how library works - here.

Usage

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.

Other notes

Currently you have to manually include Bootstrap CSS and JS files:

CSS - inside head tag

<link
  href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/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/core@2.9.1/dist/umd/popper.min.js"
  integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG"
  crossorigin="anonymous"
></script>
<script
  src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js"
  integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc"
  crossorigin="anonymous"
></script>

Contributing

If you want to contribute, please feel free to do so by following our contribution guideline.

License

Apache 2.0 © tamediadigital

Readme

Keywords

none

Package Sidebar

Install

npm i @tx-dts/react-openapi-renderer

Weekly Downloads

15

Version

0.2.2

License

Apache-2.0

Unpacked Size

210 kB

Total Files

47

Last publish

Collaborators

  • jmanot
  • maveonair