# rapidoc

> RapiDoc - Open API spec viewer with built in console

Latest version **9.3.8** (published 2024-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install rapidoc
pnpm add rapidoc
yarn add rapidoc
bun add rapidoc
```

## Health

**Score 40/100 (D)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 9.3.8 |
| Published | 2024-10-11 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18.16.0 |
| Dependencies | 8 |
| Unpacked size | 3.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1899 |
| Author | Mrinmoy Majumdar |
| Maintainers | mrin9 |
| Keywords | OpenAPI, OpenAPI Specification, Swagger, JSON-Schema, API, REST, documentation, Custom Element, Web Component, rapidoc, swagger, swagger ui, openapi ui, openapi themes, openapi viewer, openapi renderer, openapi explorer, swagger themes |

## Links

- npm: https://www.npmjs.com/package/rapidoc
- Repository: https://github.com/rapi-doc/RapiDoc
- Homepage: https://rapidocweb.com
- Issues: https://github.com/rapi-doc/RapiDoc/issues
- npm.io page: https://npm.io/package/rapidoc

## Dependencies (8)

- [lit](https://npm.io/package/lit.md) ^3.2.1
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [marked](https://npm.io/package/marked.md) 4.3.0
- [prismjs](https://npm.io/package/prismjs.md) ^1.29.0
- [randexp](https://npm.io/package/randexp.md) ^0.5.3
- [xml-but-prettier](https://npm.io/package/xml-but-prettier.md) ^1.0.1
- [base64-arraybuffer](https://npm.io/package/base64-arraybuffer.md) ^1.0.2
- [@apitools/openapi-parser](https://npm.io/package/@apitools/openapi-parser.md) 0.0.33

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 9.3.8 (latest) — 2024-10-11
- 9.3.7 — 2024-09-27
- 9.3.6 — 2024-09-18
- 9.3.5 — 2024-09-17
- 9.3.4 — 2023-01-15
- 9.3.3 — 2022-07-04
- 9.3.2 — 2022-05-25
- 9.3.0 — 2022-05-25
- 9.2.0 — 2022-02-24
- 9.1.8 — 2022-02-19
- 9.1.7 — 2022-02-18
- 9.1.6 — 2022-02-18
- 9.1.5 — 2022-02-18
- 9.1.4 — 2022-01-22
- 9.1.3 — 2021-09-27
- … 85 more at https://npm.io/package/rapidoc/versions

## README

<img alt="MrinDoc logo" src="https://github.com/rapi-doc/RapiDoc/blob/master/logo.png" width="60px" />


<p align="center">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square"/>
    <img src="https://img.shields.io/github/size/rapi-doc/rapidoc/dist/rapidoc-min.js.svg?colorB=blue&label=minified&style=flat-square">
    <img src="https://img.shields.io/github/size/rapi-doc/rapidoc/dist/rapidoc-min.js.gz.svg?colorB=blue&label=zip&style=flat-square">
    <a href="https://www.webcomponents.org/element/rapidoc" alt="published on webcomponents.org">
        <img src="https://img.shields.io/badge/webcomponents.org-rapidoc-blue.svg?style=social"/>
    </a>
</p>        

# RapiDoc
Custom Element for Open-API spec viewing

> Sponsored by [Zuplo](https://zuplo.link/rapidoc-2) - Get a Stripe-like API experience for your customers in minutes - documentation, rate-limiting and API-key auth in minutes. 

## Features
- Supports Swagger 2.0, OpenAPI 3.x.x 
- Works with any framework or with no framework
- Allows making API calls
- Better Usability, 
  - all Models and Examples are expanded by default, eliminates the need to click and reveal.
  - Request fields are pre-populated with sample data
  - Takes only one click to make an API call
  - Request and response can be placed side-by-side for easy comparison
- Branding and Personalization features makes it easy to follow any style guide
  - Comes with 2 Themes (Dark and Light)
  - Replace default logo with yours
  - Typography, allows changing fonts
  - Allows changing text-color, button-color, header-color and color of other UI elements
- Plenty of customization options 
  - Add external contents at the top and bottom of the document,  you may add images, link, text, forms etc
  - Allows disabling API calling feature
  - Hide the header, so the user can't load any other OpenAPI Spec
  - Hide Authentication and provide your own pre-generated api-key 
  - Embed it inside another HTML document
  - Use it inside another framework (react, vue, angular, lit-element)
  - Use JavaScript to change its attributes, and it will react to those changes
  - Style the element with standard css (change padding, position, border, margin )
- Lightweight and fast
- Load local json spec from the disk
- Supported on Chrome, FireFox and Safari. (Not yet tested on Edge)


## Documentation
[Check out the usage and demos](https://rapi-doc.github.io/RapiDoc/)

## Examples
[Examples and Test cases](https://rapi-doc.github.io/RapiDoc/list.html)


## Build Process
```bash
# Clone / Download the project then
npm install

# build will generate rapidoc-min.js, this is the only file you will need.
# use it in the script tag of your html <script type="text/javascript" src="rapidoc-min.js"></script></body>
npm run build 

# for development use yarn serve (this will start an webserver at port 8080, then navigate to localhost:8080) 
npm run serve
```

## Roadmap
- ✅ Upgrade to use `lit 2`
- Pre Rendering / Server Side Rendering (SSR) of RapiDoc
- Improve PDF generation of OpenAPI spec Using RapiPDF
- Create a Command Line interface (CLI) to make it automation friendly
- Add localization support
- Follow Web Content Accessibility Guidelines (WCAG 2)
- Improve Homepage, Documentation and Examples
- Create groundwork for automated testing
- Create a live playground (Something like swagger editor)
- Create a short animation/video to show how RapiDoc/RapiPDF works

---
_Source: https://npm.io/package/rapidoc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
