diff --git a/README.md b/README.md index 855dac49be..3aad1e420b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
- ReDoc logo + Redoc logo - **OpenAPI/Swagger-generated API Reference Documentation** + # Generate interactive API documentation from OpenAPI definitions [![Build Status](https://travis-ci.com/Redocly/redoc.svg?branch=master)](https://travis-ci.com/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Redocly/redoc?branch=master) [![dependencies Status](https://david-dm.org/Redocly/redoc/status.svg)](https://david-dm.org/Redocly/redoc) [![devDependencies Status](https://david-dm.org/Redocly/redoc/dev-status.svg)](https://david-dm.org/Redocly/redoc#info=devDependencies) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/master/LICENSE) @@ -11,30 +11,93 @@ **This is the README for the `2.x` version of Redoc (React-based).** **The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch** -![ReDoc demo](https://raw.githubusercontent.com/Redocly/redoc/master/demo/redoc-demo.png) +## About Redoc -## [Live demo](http://redocly.github.io/redoc/) +Redoc is an open-source tool for generating documentation from OpenAPI (fka Swagger) definitions. -[Deploy to Github](https://github.com/Rebilly/generator-openapi-repo#generator-openapi-repo--) [ReDoc as a service](https://redoc.ly) [Customization services](https://redoc.ly/#services) +By default Redoc offers a three-panel, responsive layout: + +- The left panel contains a search bar and navigation menu. +- The central panel contains the documentation. +- The right panel contains request and response examples. + +![Redoc demo](https://raw.githubusercontent.com/Redocly/redoc/master/demo/redoc-demo.png) + +## Live demo + +If you want to see how Redoc will render your OpenAPI definition, +you can try it out online at https://redocly.github.io/redoc/. + +A version of the Swagger Petstore API is displayed by default. +To test it with your own OpenAPI definition, +enter the URL for your definition and select **TRY IT**. + +## Redoc vs. Reference vs. Portals + +Redoc is Redocly's community-edition product. Looking for something more? +Checkout the following feature comparison of Redocly's premium products versus Redoc: + +| Features | Redoc | Reference | Portals | +|------------------------------|:---------:|:---------:|:-----------:| +| **Specs** | | | | +| Swagger 2.0 | √ | √ | √ | +| OpenAPI 3.0 | √ | √ | √ | +| OpenAPI 3.1 | √ (basic) | √ | √ | +| | | | | +| **Theming** | | | | +| Fonts/colors | √ | √ | √ | +| Extra theme options | | √ | √ | +| | | | | +| **Performance** | | | | +| Pagination | | √ | √ | +| Search (enhanced) | | √ | √ | +| Search (server-side) | | | √ | +| | | | | +| **Multiple APIs** | | | | +| Multiple versions | | √ | √ | +| Multiple APIs | | | √ | +| API catalog | | | √ | +| | | | | +| **Additional features** | | | | +| Try-it console | | √ | √ | +| Automated code samples | | √ | √ | +| Deep links | | √ | √ | +| More SEO control | | | √ | +| Contextual docs | | | √ | +| Landing pages | | | √ | +| React hooks for more control | | | √ | +| Personalization | | | √ | +| Analytics integrations | | | √ | +| Feedback | | | Coming Soon | + +Refer to the Redocly's documentation for more information on these products: + +- [Portals](https://redoc.ly/docs/developer-portal/introduction/) +- [Reference](https://redoc.ly/docs/api-reference-docs/getting-started/) +- [Redoc](https://redoc.ly/docs/redoc/quickstart/intro/) ## Features +- Responsive three-panel design with menu/scrolling synchronization - [Multiple deployment options](https://redoc.ly/docs/redoc/quickstart/intro/) - [Server-side rendering (SSR) ready](https://redoc.ly/docs/redoc/quickstart/cli/#redoc-cli-commands) +- Ability to integrate your API introduction into the side menu - [Simple integration with `create-react-app`](https://redoc.ly/docs/redoc/quickstart/react/) - - [See an example](https://github.com/APIs-guru/create-react-app-redoc) + + [Example repo](https://github.com/APIs-guru/create-react-app-redoc) - [Command-line interface to bundle your docs into a **zero-dependency** HTML file](https://redoc.ly/docs/redoc/quickstart/cli/) -- Responsive three-panel design with menu/scrolling synchronization -- Deep linking support -- Ability to integrate your API introduction into the side menu -- High-level grouping in side-menu with [`x-tagGroups`](https://redoc.ly/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension +- Neat **interactive** documentation for nested objects
+ ![](docs/images/nested-demo.gif) + +## Customization options +[Customization services](https://redoc.ly/#services) +- High-level grouping in side-menu with the [`x-tagGroups`](https://redoc.ly/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension - Branding/customizations using the [`theme` option](https://redoc.ly/docs/api-reference-docs/configuration/theming/) + +## Support - OpenAPI v3.0 support - Basic OpenAPI v3.1 support - Broad OpenAPI v2.0 feature support (yes, it supports even `discriminator`)
![](docs/images/discriminator-demo.gif) -- Neat **interactive** documentation for nested objects
- ![](docs/images/nested-demo.gif) - Code samples support (via vendor extension)
![](docs/images/code-samples-demo.gif) @@ -44,12 +107,12 @@ - `next` release: https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**: -- particular release, e.g. `v1.2.0`: https://rebilly.github.io/ReDoc/releases/v1.2.0/redoc.min.js +- particular release, for example `v1.2.0`: https://rebilly.github.io/ReDoc/releases/v1.2.0/redoc.min.js - `v1.x.x` release: https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js - `latest` release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js - it will point to latest 1.x.x release since 2.x releases are not hosted on this CDN but on unpkg. ## Version Guidance -| ReDoc Release | OpenAPI Specification | +| Redoc Release | OpenAPI Specification | |:--------------|:----------------------| | 2.0.0-alpha.54| 3.1, 3.0.x, 2.0 | | 2.0.0-alpha.x | 3.0, 2.0 | @@ -66,16 +129,59 @@ Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(d - [APIs.guru](https://apis.guru/api-doc/) - [BoxKnight](https://www.docs.boxknight.com/) +## Lint OpenAPI definitions + +Redocly's OpenAPI CLI is an open source command-line tool that you can use to lint +your OpenAPI definition. Linting helps you to catch errors and inconsistencies in your +OpenAPI definition before publishing. + +Refer to [Lint configuration](https://redoc.ly/docs/cli/guides/lint/) in the OpenAPI documentation for more information. + ## Deployment + +### TL;DR final code example + +To render your OpenAPI definition using Redoc, use the following HTML code sample and +replace the `spec-url` attribute with the url or local file address to your definition. + +```html + + + + Redoc + + + + + + + + + + + + + + +``` + For step-by-step instructions for how to get started using Redoc to render your OpenAPI definition, refer to the -[Redoc quickstart guide](https://redoc.ly/docs/redoc/quickstart/intro/). +[**Redoc quickstart guide**](https://redoc.ly/docs/redoc/quickstart/intro/). -[**IE11 Support Notes**](docs/usage-with-ie11.md) +See [**IE11 Support Notes**](docs/usage-with-ie11.md) for information on +IE support for Redoc. -## ReDoc CLI +## Redoc CLI For more information on Redoc's commmand-line interface, refer to -[Using the Redoc CLI](https://redoc.ly/docs/redoc/quickstart/cli/). +[**Using the Redoc CLI**](https://redoc.ly/docs/redoc/quickstart/cli/). ## Configuration diff --git a/docs/images/redoc.png b/docs/images/redoc.png new file mode 100644 index 0000000000..1557976092 Binary files /dev/null and b/docs/images/redoc.png differ