Compare commits

...

2261 Commits
v0.5.2 ... main

Author SHA1 Message Date
dependabot[bot]
4d15a1fd5b
chore(deps-dev): bump webpack-dev-server from 4.15.1 to 5.2.1 (#2695)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.15.1 to 5.2.1.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.15.1...v5.2.1)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 5.2.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-30 12:34:37 +03:00
dependabot[bot]
7a9190241f
chore(deps): bump form-data and @cypress/request (#2704)
Bumps [form-data](https://github.com/form-data/form-data) and [@cypress/request](https://github.com/cypress-io/request). These dependencies needed to be updated together.

Updates `form-data` from 4.0.0 to 4.0.4
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.4)

Updates `@cypress/request` from 3.0.1 to 3.0.8
- [Release notes](https://github.com/cypress-io/request/releases)
- [Changelog](https://github.com/cypress-io/request/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/request/compare/v3.0.1...v3.0.8)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
- dependency-name: "@cypress/request"
  dependency-version: 3.0.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 08:57:41 +03:00
dependabot[bot]
ba863af102
chore(deps-dev): bump http-proxy-middleware from 2.0.7 to 2.0.9 (#2687)
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-26 12:55:47 +03:00
Roman Hotsiy
ce27184254 fix: fix headin slugs 2025-05-29 00:25:56 +08:00
Andrew Tatomyr
3ae251b7e4
docs: remove deprecated CLI commands from docs (#2691) 2025-05-20 19:47:37 +02:00
Alex Varchuk
00bc6edfc4
chore: v2.5.0 (#2684) 2025-04-14 18:17:50 +03:00
Alex Varchuk
45476135ad
chore: fix moderate vulnerabilities (#2683) 2025-04-14 16:45:31 +03:00
dependabot[bot]
05a04c85ed
chore(deps): bump @babel/runtime from 7.23.2 to 7.27.0 (#2679)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.2 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 15:59:27 +03:00
Imamuzzaki Abu Salam
2db293bfb2
fix: enhance accessibility for menu items with keyboard support (#2655) 2025-04-14 15:54:15 +03:00
Imamuzzaki Abu Salam
1b4126fde4
feat: add keyboard navigation support to JsonViewer component (#2654) 2025-04-14 15:48:23 +03:00
dependabot[bot]
1fa13270a1
chore(deps): bump esbuild and esbuild-loader (#2661)
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.0 and updates ancestor dependency [esbuild-loader](https://github.com/privatenumber/esbuild-loader). These dependencies need to be updated together.


Updates `esbuild` from 0.17.19 to 0.25.0
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.17.19...v0.25.0)

Updates `esbuild-loader` from 3.0.1 to 4.3.0
- [Release notes](https://github.com/privatenumber/esbuild-loader/releases)
- [Commits](https://github.com/privatenumber/esbuild-loader/compare/v3.0.1...v4.3.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: indirect
- dependency-name: esbuild-loader
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kanoru <kanoru3101@gmail.com>
2025-04-08 15:47:37 +03:00
dependabot[bot]
7cedd59826
chore(deps): bump dompurify from 3.1.3 to 3.2.4 (#2667)
* chore(deps): bump dompurify from 3.1.3 to 3.2.4

Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): update dompurify

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kanoru <kanoru3101@gmail.com>
2025-04-08 15:06:41 +03:00
dependabot[bot]
cab07bad3b
chore(deps): bump prismjs from 1.29.0 to 1.30.0 (#2672)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:59:04 +02:00
Ivan Kropyvnytskyi
1243095926
chore: v2.4.0 (#2658) 2025-02-07 14:30:00 +02:00
Alex Varchuk
6fa5a2a57a
fix: update version download/upload artifacts in cicd (#2656) 2025-02-07 13:27:21 +02:00
Alex Varchuk
3a748022be
feat: add supporting react 19 in package.json (#2652) 2025-02-05 18:13:55 +02:00
Alex Varchuk
53a6afc596
fix: unify redoc config (#2647)
---------

Co-authored-by: Ivan Kropyvnytskyi <130547411+ivankropyvnytskyi@users.noreply.github.com>
2025-01-30 14:23:07 +02:00
Alex Varchuk
ae1ae79901
docs: update options for future major release (#2646) 2025-01-30 10:26:09 +02:00
Lucas Akira Uehara
153ec7a0b7
fix: Prototype Pollution Vulnerability Affecting redoc <=2.2.0 (#2638)
https://github.com/Redocly/redoc/issues/2499

Co-authored-by: Lucas Akira Uehara <80917717@telefonicati.onmicrosoft.com>
2025-01-28 23:28:26 +02:00
Alex Varchuk
c765b34ef5
chore: v2.3.0 (#2649) 2025-01-16 13:33:22 +02:00
Alex Varchuk
0e2d595ef7
chore: fix vulnerabilities (#2648) 2025-01-16 13:01:29 +02:00
dependabot[bot]
8caddaf0eb
chore(deps-dev): bump micromatch from 4.0.4 to 4.0.8 (#2578)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.4...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 12:50:06 +02:00
wadakatu
981e4a84fb
chore: move @cfaester/enzyme-adapter-react-18 to devDependencies (#2625) 2025-01-16 12:41:22 +02:00
Alex Varchuk
59ee73fefa
fix: displaying json example when showObjectSchemaExamples enabled (#2635) 2025-01-08 18:49:11 +02:00
Alex Varchuk
d614d2d022
fix: passing inline parameters after support react 18 for response title (#2640) 2025-01-06 13:40:07 +02:00
Alex Varchuk
85b622fc58
fix: displaying nested items with type string (#2634) 2024-12-31 13:09:48 +02:00
Alex Varchuk
639fd2c32c
chore: npm audit for previnting feature vulnerabilities (#2612) 2024-10-28 13:28:36 +02:00
Michael Huynh
aa0879ca02
feat: update pattern styling (#2196) (#2600)
Closes #2196
2024-10-28 13:25:32 +02:00
Dxuian
c3fce4e2b2
chore: updated webpack version to 5.94.0 (#2583) 2024-10-28 13:09:34 +02:00
Taylor Krusen
11912f5d91
docs(all): change admonition type to 'info' (#2608) 2024-10-18 07:47:56 -07:00
Alex Varchuk
1593d01936
fix: docker build (#2607) 2024-10-16 13:29:44 +03:00
Alex Varchuk
4736c54edd
chore: v2.2.0 (#2606) 2024-10-16 12:22:32 +03:00
Alex Varchuk
64f18779e5
feat: add support x-badges (#2605)
* feat: add support x-badges

Co-authored-by: Max Mueller <maxmueller@eaton.com>

* chore: try to fix e2e tests

* chore: try to fix e2e tests part 2

* Update docs/redoc-vendor-extensions.md

---------

Co-authored-by: Max Mueller <maxmueller@eaton.com>
Co-authored-by: Jacek Łękawa <164185257+JLekawa@users.noreply.github.com>
2024-10-16 11:48:21 +03:00
dependabot[bot]
1cceed4b47
chore(deps): bump dompurify from 3.0.6 to 3.1.3 (#2602)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.0.6 to 3.1.3.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.0.6...3.1.3)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 18:24:19 +03:00
dependabot[bot]
c0c68206de
chore(deps): bump body-parser and express (#2603)
Bumps [body-parser](https://github.com/expressjs/body-parser) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `body-parser` from 1.20.2 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.2...1.20.3)

Updates `express` from 4.19.2 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.1)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 17:59:12 +03:00
Lorna Jane Mitchell
d193dd2627
chore: Remove the sync job, we don't use it any more (#2591) 2024-09-19 16:10:09 +01:00
Lorna Jane Mitchell
c04b4c8fec
docs: Remove the old zero-dependency claim for Redoc docs (#2590) 2024-09-16 09:12:25 +01:00
Alex Varchuk
c0203be045
chore: upgrade node version for docker (#2589) 2024-09-13 11:17:02 +03:00
Lorna Jane Mitchell
c813eeac04
docs: fix http-server example from in-page feedback (#2580) 2024-09-02 11:48:55 +01:00
Alex Varchuk
60d131b0a9
fix: show siblings schema with oneOf (#2576) 2024-08-29 21:22:07 +03:00
Alex Varchuk
a7607eafdd
docs: update broken link of Openapi Object (#2577) 2024-08-29 19:18:05 +02:00
Roman Hotsiy
e0666776e8 chore: remove heavy bundlesize dev dependency 2024-08-01 15:56:39 +08:00
Roman Hotsiy
d0543bb116 chore: upgrade vulnerable dev dependencies 2024-08-01 14:37:12 +08:00
Alex Varchuk
3658b6def4
chore: v2.1.5 (#2550) 2024-06-10 16:21:57 +03:00
Alex Varchuk
c664dd0d56
fix: update react to 18 and react-tabs to 6 (#2547) 2024-06-06 17:03:18 +03:00
Alex Varchuk
72dd57d457
chore: move jest-environment-jsdom to dev dependencies (#2543) 2024-06-06 11:21:00 +03:00
Lorna Jane Mitchell
31d88a184b
docs: Remove outdated sync job for docs folder (#2465) 2024-04-26 12:43:35 +01:00
Alex Varchuk
50c7f60fb6
chore: fix docker publish action (#2531) 2024-04-25 19:46:13 +03:00
Alex Varchuk
a661320625
chore: v2.1.4 (#2530) 2024-04-25 17:19:58 +03:00
Kerem Nalbant
b0d03d0206
fix: add deprecated css to clickable property name (#2526)
Co-authored-by: Kerem Nalbant <k.nalbant@epilot.cloud>
2024-04-25 16:24:58 +03:00
Max Krumpe
2b72dc0e90
fix: use h2/h3 for headings instead of h1/h2 for better seo (#2514)
* fix: use h2/h3 for headings instead of h1/h2 for better seo

* fix: fixed e2e tests for changed headings

---------

Co-authored-by: Max Krumpe <max.krumpe@uniserv.com>
2024-04-25 12:46:12 +03:00
Alex Varchuk
ff91768879
chore: upgrade cypress to fix e2e tests and update-browserslist-db (#2529) 2024-04-25 11:21:26 +03:00
Alex Varchuk
20a923b485
chore: upgrade openapi-sampler (#2525) 2024-04-24 17:43:01 +03:00
Alex Varchuk
edac97236d
fix: publish script (#2524) 2024-04-24 16:30:51 +03:00
Alex Varchuk
9af774e443
chore: add check-version to publish script (#2446) 2024-04-24 16:07:21 +03:00
Alex Varchuk
1f11f597c4
chore: fix vulnerabilities and upgrade deps (#2445)
* chore: fix vulnerabilities and upgrade deps

* chore: use old version of cypress

* fix: additional vulnerabilities
2024-04-24 15:48:02 +03:00
Lorna Jane Mitchell
3f3f9551ee
docs: Update API examples list to include Museum API (#2506)
* feat: Update API examples list to include Museum API

* updates museum.yaml with logo and replaces petstore with museum api in playground for local dev and some minor edits to redoc name

* docs: update definition

---------

Co-authored-by: Heather Cloward <heathercloward@gmail.com>
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2024-04-02 18:16:44 +03:00
Lorna Jane Mitchell
8c391497bf
docs: Fix a link that couldn't be checked as it reaches outside the Redoc project (#2490) 2024-02-12 14:44:00 +00:00
Lorna Jane Mitchell
4fd22f6d74
docs: Add docs tooling to align with publishing to main site (#2484)
* docs: add markdownlint and some link checks alongside vale

* docs: add link checker config and fix/update some links reported broken

* docs: update markdownlint action

* docs: fix markdown table formatting

* docs: Unpin Vale version and pick up the latest
2024-01-29 16:39:44 +00:00
Lorna Jane Mitchell
76cecf054c
chore: Update directory structure for Vale v3 (#2477)
* chore: Update directory structure for Vale v3

* chore: update Vale folder name
2024-01-17 18:33:40 +00:00
Javi Rubio
21b961dffa
Add Quaderno API to README's Showcase section (#2468) 2023-12-28 15:38:40 +00:00
Lorna Jane Mitchell
0db1e9872d
docs: Remove references to interactive docs in the open source project (#2460)
* docs: Remove references to interactive docs in the open source project

* Update README.md

Co-authored-by: Adam Altman <adam@redoc.ly>

---------

Co-authored-by: Adam Altman <adam@redoc.ly>
2023-12-01 16:00:50 +00:00
Alexei Maridashvili
e9f9799e89
Update README.md (#2422)
Fix link to deployment options
2023-11-13 11:48:58 +00:00
Adam Altman
8c04c02ab0
docs: fix admonition on config page (#2452) 2023-11-13 10:16:32 +00:00
redocly-bot
7b2931dc91 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-11-09 15:56:30 +00:00
Alex Varchuk
b2d8e0f5b7
chore: v2.1.3 (#2439) 2023-10-25 11:43:48 +03:00
Alex Varchuk
8ddeb6dfda
fix: display string pattern in array items (#2438) 2023-10-24 13:12:51 +03:00
Alex Varchuk
bf960612a4
fix: hideRequestPayloadSample (#2436) 2023-10-23 18:36:53 +03:00
Alex Varchuk
b36a6e27bb
fix: default value as object in request body (#2437) 2023-10-23 18:36:30 +03:00
redocly-bot
ba7cd0a130 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-10-23 12:07:23 +00:00
dependabot[bot]
88f813eb68
chore(deps-dev): bump postcss from 8.4.27 to 8.4.31 (#2427)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-22 12:49:59 +03:00
redocly-bot
f28a807dec sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-10-18 14:49:43 +00:00
redocly-bot
25394b7aba sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-10-09 19:12:25 +00:00
redocly-bot
75065a28fd sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-10-09 16:35:52 +00:00
redocly-bot
ff492b5eb2 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-09-28 11:43:40 +00:00
redocly-bot
aadc32c1eb sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-09-21 14:20:06 +00:00
Lorna Jane Mitchell
b3503f2109
Config docs and README refresh (#2393)
* docs: Give Redoc a landing page with overview and tldr instructions

* docs: move config to dedicated page

* docs: modernise README, link to resources

* docs: more detailed format for theme configurations

* fix: README formatting

* fix: Fix future tense errors and add exceptions for config fields as headings

* Apply suggestions from code review

Co-authored-by: Heather Cloward <heathercloward@gmail.com>

* docs: minor updates from excellent pull request feedback

* docs: Remove the old quickstart, update HTML as the preferred onboarding method and improve docs/examples on that page

* Apply suggestions from code review

Co-authored-by: Heather Cloward <heathercloward@gmail.com>

---------

Co-authored-by: Heather Cloward <heathercloward@gmail.com>
2023-09-21 15:19:27 +01:00
Andrew Tatomyr
26674e70c6
fix: more cases for react18 and cli integration (#2416) 2023-09-15 13:28:35 +03:00
Alex Varchuk
0e38089204
chore: v2.1.2 (#2413) 2023-09-11 13:31:28 +03:00
ckszabi
1d6100111a
fix: style RefreshToken URL as <code> in the authorization section
Co-authored-by: szaszeke <Szabolcs.Szekely@t-systems.com>
2023-09-11 13:22:18 +03:00
dependabot[bot]
98813e687d
chore(deps): bump @cypress/request and cypress (#2410)
Bumps [@cypress/request](https://github.com/cypress-io/request) to 3.0.1 and updates ancestor dependency [cypress](https://github.com/cypress-io/cypress). These dependencies need to be updated together.


Updates `@cypress/request` from 2.88.11 to 3.0.1
- [Release notes](https://github.com/cypress-io/request/releases)
- [Changelog](https://github.com/cypress-io/request/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/request/compare/v2.88.11...v3.0.1)

Updates `cypress` from 12.17.1 to 13.1.0
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v12.17.1...v13.1.0)

---
updated-dependencies:
- dependency-name: "@cypress/request"
  dependency-type: indirect
- dependency-name: cypress
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 11:08:57 +03:00
Oprysk Viacheslav
76edc15939
fix: react18 cli integration (#2404)
* fix: react18 cli integration

* fix: update unit tests snapshots
2023-09-08 10:51:39 +03:00
Alex Varchuk
2eff85a261
chore: add tests for cover field default crash (#2389) 2023-08-31 10:43:53 +03:00
Roman Hotsiy
c86fd7f597 chore: v2.1.1 2023-08-18 07:03:41 +10:00
Roman Hotsiy
9e14e1484c fix: hotfix, crash after 2.1 release 2023-08-18 07:03:41 +10:00
Alex Varchuk
ae74ef95c3
chore: v2.1.0 (#2382) 2023-08-17 16:33:15 +03:00
Lorna Mitchell
d6eac394cf docs: Remove Redoc CLI and a non-existent config option 2023-08-03 18:02:13 +03:00
Alex Varchuk
7529fd2492 chore: upgrade packages for fixing vulnerabilities 2023-07-27 13:09:38 +03:00
Alex Varchuk
6a52698da9 chore: upgrade openapi-core to 1.0.0-rc.2 2023-07-27 13:09:38 +03:00
Alex Varchuk
c7d07cdf18 chore: update cypress to 12.17.1 2023-07-27 13:09:38 +03:00
Roman Pidkostelnyi
054f604195
feat: add support of react 18 (#2369)
* feat: add support of react 18

* chore: add newest version of styled-components to peerDependencies

* chore: add supoort of styled components

* chore: downgrade types

* chore: update snapshots
2023-07-26 11:41:20 +03:00
Alex Varchuk
0bb21c8128
feat: add x-tags (#2355)
* feat: add x-tags

* chore: fix e2e tests and add new for x-tag

* chore: add x-tags to demo definition

* chore: update snapshots
2023-07-26 11:17:56 +03:00
Adam Altman
9b73dae685
docs: fix and update links in redoc-vendor-extensions (#2368)
Co-authored-by: Lorna Jane Mitchell <github@lornajane.net>
2023-07-21 11:40:20 -05:00
Roman Pidkostelnyi
d21af58414
feat: enable keyboard navigation (#2361) 2023-07-19 14:45:12 +03:00
dependabot[bot]
8fbc955f12
chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 (#2359)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 10:59:23 +03:00
Oprysk Viacheslav
8907ff2ba0
chore: update packages dependecy (#2360)
* chore: update packages dependecy

* fix: remove redundant options

* fix: webpack config demo folder

* fix: replace cypress ts-loader

* chore: remove redundant dependency
2023-07-19 10:54:04 +03:00
Heather Cloward
c407726a66
docs: adds vale rules and workflow for running in CI (#2348)
* docs: adds vale rules and workflow for running in CI

* docs: updates product name from ReDoc to Redoc
2023-07-11 13:31:52 -04:00
Alex Varchuk
4386867d90
fix: schema oneOf title with const (#2350) 2023-07-11 15:33:36 +03:00
Ricardo Graça
7e052028d9
fix: renames 'FieldContstraints' to 'FieldConstraints' (#2352)
Co-authored-by: Ricagraca <ricardo.graca@freiheit.com>
2023-07-11 15:32:00 +03:00
Alex Varchuk
916639098f
chore: remove broken link from demo (#2338) 2023-06-14 07:17:48 +08:00
redocly-bot
44372d5702 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-06-13 17:13:40 +00:00
Heather Cloward
7e4639e8cf
docs: updates the redocly cli command prefix from openapi to redocly in the redoc deployment guide intro page (#2326) 2023-05-26 11:11:14 -04:00
Alex Varchuk
d1c9155ae1
chore: remove redoc-cli (#2320) 2023-05-18 17:53:26 +03:00
dependabot[bot]
874b0d6f81
chore(deps): bump json5 from 1.0.1 to 1.0.2 (#2248)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 20:11:12 +03:00
redocly-bot
6a2f2c98e0 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-05-10 18:51:48 +00:00
redocly-bot
c26e3473a4 sync: Synced local 'docs/' with remote 'docs/redoc/' 2023-03-31 17:40:37 +00:00
Alex Varchuk
d4cd6f7fbd
chore: update openapi-sampler (#2275) 2023-03-23 16:55:39 +02:00
Maryana Svitlyk
d3ad7925cf
feat: indicate whether request body is required or optional (#2175) 2023-03-06 20:41:41 +02:00
Danil Zagoskin
b4f71c6bbc
docs: add some success response codes to openapi 3.1 (#2251) 2023-03-06 20:13:18 +02:00
Michael Goberling
1a38b870ae
docs: fix typo in CLI readme (#2249) 2023-03-06 20:12:16 +02:00
Alex Varchuk
d3ac16f477
chore: cli-v0.13.21 (#2274) 2023-03-06 19:44:09 +02:00
Alex Varchuk
2ae7e08af4
feat: add deprecation label to redoc-cli (#2172)
---------

Co-authored-by: Adam Altman <adam@redoc.ly>
2023-03-06 14:36:53 +02:00
Jesper Hagström
53c83b4962
chore: bump http-cache-semantics to 4.1.1 (#2268) 2023-03-06 13:18:13 +02:00
Thomas Florelli
33be51a7a4
fix(types/open-api): import type (#2213) 2022-12-29 08:44:19 -06:00
ayame113
1597bae403
fix(demo): Get CORS proxy to work in Chrome on Windows (#2220) 2022-12-29 08:43:52 -06:00
Dag Frode Solberg
12be1bc5ff
fix: improve accessible label by using the property name (#2224) 2022-12-29 08:43:06 -06:00
Dag Frode Solberg
b8f7da6b00
fix: move role to list item to meet ARIA spec (#2228) 2022-12-29 08:39:48 -06:00
Tony Spataro
f6a70b11b0
chore: update developer setup with new dependency in contributing.md (#2239) 2022-12-29 08:38:32 -06:00
dependabot[bot]
ef99fb1f6b
chore(deps): bump qs from 6.5.2 to 6.5.3 (#2232)
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-29 08:37:45 -06:00
dependabot[bot]
f254e109b7
chore(deps): bump express from 4.17.1 to 4.18.2 (#2235)
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-29 08:37:38 -06:00
Mohamed El omary
630e63bf45
chore: remove isarray package (#2241) 2022-12-29 08:37:13 -06:00
Alex Varchuk
3d410b6002
fix: default value for array query parameter (#2186) 2022-10-31 20:46:00 +02:00
Alex Varchuk
0753bbea4b
fix: call onLoaded if specs are not found (#2182) 2022-10-21 17:15:22 +03:00
Alex Varchuk
187e555558
chore: update link to redocly.com and add security to definition (#2173) 2022-10-12 15:28:08 +03:00
Alex Varchuk
53c4f36fad
fix: error with immutable object spec (#2179) 2022-10-11 13:39:30 +03:00
Alex Varchuk
cc9818ca41
chore: return genericObject for cli (#2178) 2022-10-04 15:50:57 +03:00
Bill Collins
127ef260b9
fix: remove GenericObject shim (#2177)
This was declared in the local stubs file but not shipped, meaning that
consumers with typescript libchecking enabled would have to also add the
GenericObject definition to their local stubs file.

This commit inlines the definition where necessary, or replaces it with
object where appropriate.
2022-09-29 14:42:23 +03:00
André Stösel
168189b2fd
feat: add option to hide the example code when using the SchemaDefinition component (#2157) 2022-09-19 12:44:44 +03:00
Waldir Pimenta
1697d2ce78
chore: demo/index.tsx: update to use new Redoc logo (#2167) 2022-09-19 12:00:11 +03:00
Waldir Pimenta
a2a4cf9554
chore: update capitalization in README: ReDoc → Redoc (#2166)
Also add missing punctuation to warning, and change example CDN link to the now-released 2.0.0
2022-09-19 11:54:28 +03:00
Alex Varchuk
5fb4daa618
chore: v2.0.0 (#2160) 2022-09-13 15:11:20 +03:00
dependabot[bot]
6f6a3f0a36
chore(deps): bump trim-newlines from 1.0.0 to 3.0.1 (#2161)
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 1.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)

---
updated-dependencies:
- dependency-name: trim-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 12:01:44 +03:00
Alex Varchuk
64cf624fff
chore: rename master branch to main (#2163) 2022-09-12 19:28:47 +03:00
Roman Marshevskyy
16f542bbfe
Update feature_request.md 2022-09-09 21:51:35 +03:00
Roman Marshevskyy
aa3f9bcc24
Update bug_report.md 2022-09-09 21:51:17 +03:00
Alex Varchuk
9d36b328fe
chore: cli-v0.13.20 (#2155) 2022-09-06 18:51:08 +03:00
Alex Varchuk
c374b2d7f7
chore: reinstall cli with new npm for update npm-shrinkwrap.json (#2156) 2022-09-06 18:27:42 +03:00
Alex Varchuk
580f883ce3
chore: v2.0.0-rc.77 (#2154) 2022-09-06 17:09:07 +03:00
徒言
da9ed0b4d1
fix: markdown parent name (#2062)
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2022-09-06 15:10:54 +03:00
abouteiller-niji
3241000894
chore: remove useless types libraries already included (#2144) 2022-09-06 14:58:02 +03:00
bpateldx
c52ee83f77
feet: search feature to support path (#2145) 2022-09-06 12:24:55 +03:00
Roman Hotsiy
ddde105aca fix: add hard limit on deref depth to prevent crashes 2022-09-06 12:23:55 +03:00
Alex Varchuk
bb325d0d28 fix: hoistOneOf missing refs stack and improve allOf for same $ref
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2022-09-06 12:23:55 +03:00
Roman Hotsiy
6ac1e1eb18
fix: do not use discriminator when specific schema was referenced in oneOf or anyOf (#2153) 2022-09-06 11:43:09 +03:00
Oleksandr Savchenko
8dc03eb7ed
fix: latest docker cli tag (#2140) 2022-08-30 15:44:07 +03:00
Alex Varchuk
acb72d5ec0
chore: cli-v0.13.19 (#2139) 2022-08-18 17:49:27 +03:00
Alex Varchuk
c7d5ae03ef
fix: invalidate cache action (#2138) 2022-08-18 17:26:00 +03:00
Alex Varchuk
0b87d25c42
chore: v2.0.0-rc.76 (#2137) 2022-08-18 17:05:12 +03:00
Alex Varchuk
d8093e3e20
feat: add clear cache for publish action (#2129) 2022-08-18 16:56:28 +03:00
Bruno Parmentier
781690284a
fix: encoding issue in CDN responses (#2130)
When downloading the redoc JS from redoc.ly CDN (e.g.
https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) the
Content-Type header in the response is missing 'charset=utf-8', causing
the file to be displayed with garbled characters.
2022-08-18 15:42:57 +03:00
Grzegorz Zalewski
efd5e09c90
fix: Optional authentication not rendered properly (#2117) (#2134) 2022-08-17 16:02:12 +03:00
Oprysk Vyacheslav
c60c6f5891
fix: "API Docs By Redocly" overlapping last element in sidebar (#2132) 2022-08-16 18:03:11 +03:00
Alex Varchuk
c24b31b228
chore: cli-v0.13.18 (#2128) 2022-08-10 17:54:37 +03:00
Alex Varchuk
d7440fb24f
chore: fix integratin test in publish script (#2127) 2022-08-10 17:05:17 +03:00
Alex Varchuk
1641e738bb
chore: add install cli to publish actions (#2126) 2022-08-10 15:44:37 +03:00
Alex Varchuk
56e2b6f009
chore: v2.0.0-rc.75 (#2125) 2022-08-10 15:25:43 +03:00
Alex Varchuk
1a99e65953 chore: update perfect-scrollbar lib 2022-08-10 14:30:54 +03:00
Roman Hotsiy
87c79916df chore: fix circular crash
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2022-08-10 14:30:54 +03:00
Alex Varchuk
cfd810fdf9 fix: search and navigate error 2022-08-10 14:30:54 +03:00
Alex Varchuk
4dbde2bcc0 chore: add tslib for fixing error with spreadArray 2022-08-10 14:30:54 +03:00
Alex Varchuk
d6ca8cc53b
feat: add notification about new version available (#2100) 2022-08-10 10:55:26 +03:00
Alex Varchuk
250f6d12b2
fix: publishing docker image to github packages (#2115) 2022-08-09 16:49:59 +03:00
Mateusz
40ebfd2d63
fix: duplication of title (#2119)
Co-authored-by: Mateusz Romański <m.romanski@webspire.pl>
2022-08-09 16:47:43 +03:00
Alex Varchuk
0b1a790090
fix: sibling for openapi 3.1 (#2112) 2022-08-02 14:39:59 +03:00
Anastasiia Derymarko
a35bb3ff26
fix: Redocly logo (#2109) 2022-08-02 14:13:41 +03:00
Alex Varchuk
428fd6983d
fix: handle error if security scopes is invalid (#2113) 2022-08-02 13:52:15 +03:00
Alex Varchuk
cf4642e303
chore: cli-v0.13.17 (#2104) 2022-07-28 17:05:14 +03:00
Alex Varchuk
6f564f88b8
chore: v2.0.0-rc.74 (#2106) 2022-07-28 16:47:47 +03:00
Alex Varchuk
e5f0235985
fix: invalid url when href is empty (#2105) 2022-07-28 16:37:43 +03:00
Alex Varchuk
2a7046b9d3
chore: v.2.0.0-rc.73 (#2103) 2022-07-28 13:26:28 +03:00
Anastasiia Derymarko
dcdab83890
fix: add label API docs by Redocly (#2099) 2022-07-27 11:27:12 +03:00
Alex Varchuk
a5804db1ce
fix: recursion for boolean items (#2097) 2022-07-26 18:25:18 +03:00
Alex Varchuk
2384c5afe9
chore: use latest tag for build command (#2098) 2022-07-26 16:33:55 +03:00
Alex Varchuk
e4f84bb7de
chore: improve deprecation message for serve command (#2096) 2022-07-25 19:10:31 +03:00
Maria McParland
17bb08909a
Fixing 404 on the documentation page (#2092) 2022-07-25 17:34:40 +03:00
Oleksandr Savchenko
80ecd0f197
fix: add the latest tag for the CLI docker image (#2087)
Co-authored-by: Oleksandr Savchenko <oleksandr.savchenko@nordsec.com>
2022-07-25 17:22:37 +03:00
dependabot[bot]
491ac6b9d0
chore(deps): bump terser from 4.8.0 to 4.8.1 (#2089)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-25 17:15:17 +03:00
Alex Varchuk
e4118479f6
fix: enum duplication values when schema uses a specific combination of oneOf and allOf(#2088) 2022-07-25 17:02:37 +03:00
Pavel Zagorodnyuk
b1afd08bcf
fix: correct URLs of OperationModel servers for static site generation (#2081)
Co-authored-by: paza0322 <pavel.zagorodniuk@netcracker.com>
2022-07-22 18:33:58 +03:00
Alex Varchuk
d7a1ec11d4
chore: revert "fix: operation url in static page (#2093)" (#2094)
This reverts commit 98eec19647.
2022-07-22 17:15:34 +03:00
Alex Varchuk
98eec19647
fix: operation url in static page (#2093) 2022-07-22 14:05:08 +03:00
Alex Varchuk
8869aff406
chore: fix yarn webpack 5 (#2064) 2022-07-20 19:02:25 +03:00
Oprysk Vyacheslav
0045be0b75
fix: Scrolling keeps rewriting url after a Redoc element was removed #2051 (#2085) 2022-07-19 18:17:28 +03:00
Alex Varchuk
7cc0500f3c
fix: property with nested allOf (#2083) 2022-07-19 09:57:43 +03:00
Alex Varchuk
1a1bc26503
fix: restore old variant security injections (#2075) 2022-07-18 17:48:26 +03:00
Alex Varchuk
2970f959cf
fix: rewrite recursive checks (#2072)
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2022-07-18 17:47:06 +03:00
Alex Varchuk
9920991080
fix: nested patternProperties (#2073) 2022-07-08 11:34:49 +03:00
Alex Varchuk
4fc6aa0859
fix: highlight text syntax (#2069) 2022-07-06 17:14:20 +03:00
Alex Varchuk
f8c30e5e57
chore: improve bundle size and remove url-polifill (#2070) 2022-07-06 12:33:40 +03:00
Alex Varchuk
87541e45dc
fix: merge reference for openapi 3.1 (#2063) 2022-07-05 13:19:30 +03:00
Alex Varchuk
e26c8b23d9
fix: resolve dependency conflict in installing (#2060) 2022-06-24 17:22:59 +03:00
Ryan Garrett
7ca10daf12
Mis-nesting of aria roles on sidebar navigation (#2050) 2022-06-20 13:30:25 +03:00
redocly-bot
01ffff7f15 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-06-20 07:05:04 +00:00
Alex Varchuk
2100b549c0
chore: cli-v0.13.16 (#2039) 2022-06-02 16:37:43 +03:00
Alex Varchuk
5f2d05f32e
chore: v2.0.0-rc.72 (#2038) 2022-06-02 16:15:56 +03:00
Alex Varchuk
51127aadc3
fix: nested items with refs (#2035) 2022-06-01 15:01:39 +03:00
pranitkhadilkar7
a366de4cf6
fix: handled style change in ServerUrl and ServersOverlay dynamically (#1989)
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2022-06-01 14:48:16 +03:00
Alex Varchuk
c513b28850
chore: cli-v0.13.15 (#2032) 2022-05-31 16:30:52 +03:00
Alex Varchuk
2cc993e29f
chore: fix publish-cdn script (#2031) 2022-05-31 16:16:03 +03:00
Alex Varchuk
16463f9a15
chore: v2.0.0-rc.71 (#2029) 2022-05-31 15:41:08 +03:00
Anastasiia Derymarko
49cc11d917
feat: add hideSecuritySection option allowing to disable the Security panel (#2027) 2022-05-31 13:20:23 +03:00
Anastasiia Derymarko
a863302cc8
feat: remove auth section (#2022) 2022-05-30 18:55:39 +03:00
Alex Varchuk
b98c7a0d34 chore: update openapi-sampler to v1.3.0 2022-05-30 16:35:22 +03:00
Alex Varchuk
27a9dbaf46 feat: add support prefix items 2022-05-30 16:35:22 +03:00
Alex Varchuk
eb0917d002 fix: constraints label details 2022-05-30 16:35:22 +03:00
Alex Varchuk
77104d6c0d
feat: add Redoc to Redocly CDN (#2026) 2022-05-30 13:40:19 +03:00
Alex Varchuk
1e4ea03d4a
fix: merge allOf in correct order (#2020) 2022-05-26 14:54:03 +03:00
Anastasiia Derymarko
82712c5b40
feat: show minProperties maxProperties (#2015) 2022-05-20 11:57:04 +03:00
redocly-bot
0aafee1131 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-05-18 09:06:41 +00:00
Alex Varchuk
6b7283f240
chore: cli-v0.13.14 (#2012) 2022-05-17 11:29:44 +03:00
Alex Varchuk
036f97d521
chore: v2.0.0-rc.70 (#2011) 2022-05-17 11:07:03 +03:00
Alex Varchuk
291b62a206
feat: support conditional operators (#1939)
* fix: merge type and enum in allOf for 3.1

* chore: add example for OpenApi 3.1

* fix: correct merge constraints in allOf
2022-05-17 10:56:28 +03:00
Frazer Smith
ddcc76b5fa
ci: update github actions (#2010) 2022-05-16 16:16:16 +03:00
Loïc Fürhoff
ba06485ece
feat: theme add links textDecoration options (#1599)
Co-authored-by: Anastasiia Derymarko <anastasiia@redocly.com>
Co-authored-by: Loïc Fürhoff <loic.furhoff@pix4d.com>
2022-05-16 11:49:22 +03:00
Andrew Tatomyr
660cc857bc
feat: display patternProperties (#2008) 2022-05-13 13:53:03 +02:00
Alex Varchuk
58cd3cb782
chore: enable cli test for build command with url (#2006) 2022-05-12 18:09:49 +03:00
Alex Varchuk
dfacf989bc
fix: add node version to docker (#2005) 2022-05-12 16:52:16 +03:00
Alex Varchuk
f3862d58a8
chore: cli-v0.13.13 (#2004) 2022-05-12 15:57:12 +03:00
Alex Varchuk
ed7b665c12
fix: unit test for deployment (#2003) 2022-05-12 15:31:35 +03:00
Alex Varchuk
858f1a4d1d
chore: v2.0.0-rc.69 (#2002) 2022-05-12 15:09:13 +03:00
Alex Varchuk
a83933da34
chore: upgrade openapi-sampler to v1.2.3 (#2001) 2022-05-12 12:39:31 +03:00
Alex Varchuk
e594bdb912
chore: upgrade openapi-core to 1.0.0-beta.97 (#2000) 2022-05-12 12:11:14 +03:00
Andrew Tatomyr
d2cdaa1221
fix: wrong base url format causing error when constructing new URL (#1996)
Co-authored-by: Andrew Tatomyr <andrew.tatomyr@redocly.com>
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
Co-authored-by: Anastasiia Derymarko <anastasiia@redocly.com>
2022-05-12 12:05:22 +03:00
Alex Varchuk
311d2ce64d
feat: add option to display verb in webhooks (#1994)
* chore: cli test run ts files
Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2022-05-11 19:13:50 +03:00
Anastasiia Derymarko
1f417d67c6
feat: support .redocly.yaml for options for redoc-cli (#1981)
Co-authored-by: Anastasiia Derymarko < anastasiia@redocly.com>
Co-authored-by: Adam Altman <adam@redoc.ly>
Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2022-05-11 08:58:24 +03:00
redocly-bot
7988e8137c sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-05-10 21:43:23 +00:00
Zach Whaley
b601c9ae9e
feat: Add download file option (#1699)
Co-authored-by: Zach Whaley <zachbwhaley@gmail.com>
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
Co-authored-by: anastasiia-developer <anastasiia@redocly.com>
Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2022-05-10 20:09:01 +03:00
Anastasiia Derymarko
494122f93e
chore:cli-v0.13.12 (#1993) 2022-05-10 18:48:29 +03:00
anastasiia-developer
9fef7b56ba chore: publish redoc image to DockerHub 2022-05-10 18:42:03 +03:00
Anastasiia Derymarko
c14f6f424f
chore: fix publish dockerhub (#1991) 2022-05-10 18:24:59 +03:00
Anastasiia Derymarko
6a9594b982
chore:v2.0.0-rc.68 (#1990) 2022-05-10 17:52:56 +03:00
Alex Varchuk
5b9aa27af0 fix: examples in json schemas 2022-05-10 16:41:05 +03:00
Alex Varchuk
e7a6d38a56 chore: add isArray helper function 2022-05-10 16:41:05 +03:00
Alex Varchuk
f0cf5fe149 chore: fix dropdown style 2022-05-10 16:41:05 +03:00
Andrew Tatomyr
8678615a0e
chore: make Redoc lib compatible with Webpack 5 (#1982) 2022-05-10 13:50:50 +02:00
Anastasiia Derymarko
7e01a0cfe2
chore: publish dockerhub (#1971) 2022-05-10 12:12:28 +03:00
Adam Altman
42c91dc485
docs: update the README with correct links (#1988)
- Rename from OpenAPI CLI to Redocly CLI
- Fix links to Redoc quickstart and deployment guides.
2022-05-09 17:53:40 -05:00
redocly-bot
20e4316535 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-05-06 16:38:07 +00:00
AlexVarchuk
508ebd58a3
fix: handle error when definition load fails (#1979) 2022-05-05 15:49:08 +03:00
AlexVarchuk
186f5a98bd
fix: remove dropdown-aria and use native select (#1954) 2022-05-05 13:17:45 +03:00
Anastasiia Derymarko
0755ac6f04
feat: Support OAS 3.1 unevaluatedProperties (#1978) 2022-05-05 12:04:43 +03:00
Anastasiia Derymarko
60bc603e9b
fix: large text in examples value (#1974) 2022-05-03 13:03:36 +03:00
AlexVarchuk
4e793f07a8
fix: not show scopes if keys empty or not exist (#1975) 2022-05-03 11:25:46 +03:00
Chintan Radia
0fa08faab1
feat: implement configurable minimum characer length to init search (#1402)
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2022-05-03 10:48:08 +03:00
AlexVarchuk
7a404863f9
chore: cli-v0.13.11 (#1973) 2022-04-28 15:48:42 +03:00
AlexVarchuk
2628335db8
chore:v2.0.0-rc.67 (#1972) 2022-04-28 15:18:18 +03:00
Draon con Color
90f71c0d77
feat: add optional BASE_PATH to Docker config (#1378)
Co-authored-by: draoncc <14227820+draoncc@users.noreply.github.com>
Co-authored-by: anastasiia-developer <anastasiia@redocly.com>
2022-04-27 18:40:44 +03:00
AlexVarchuk
aba2d1ad2d
fix: improve markdown render with CRLF (#1953) 2022-04-27 11:19:07 +03:00
dependabot[bot]
88e250e053
chore(deps): bump async from 2.6.3 to 2.6.4 (#1964)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27 10:26:36 +03:00
AvroraPolnareff
2ca8e081ba
fix: Expand/Collapse all buttons disappears for flat structures (#1424)
Co-authored-by: AvroraPolnareff <araintheskywith@gmail.com>
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
Co-authored-by: anastasiia-developer <anastasiia@redocly.com>
2022-04-26 13:36:14 +03:00
Oprysk Vyacheslav
8240404a55
chore: codeowners 2022-04-18 23:46:08 +03:00
Andrey Lomakin
8f7e56c747
fix: issue with navigation when operationId contains backslash or quotes (#1513)
Co-authored-by: Andrey Lomakin <lom16133@gmail.com>
Co-authored-by: Anastasiia Derymarko <anastasiia@redocly.com>
Co-authored-by: Andriy Zaleskyy <andriy.zaleskyy@redocly.com>
2022-04-15 16:53:36 +03:00
Ben Blowers
fd8917e5c1
fix: prefix operation ids with parent id (#1245)
Co-authored-by: ben.blowers <ben.blowers@imanage.com>
Co-authored-by: anastasiia-developer <anastasiia@redocly.com>
2022-04-12 12:19:15 +03:00
Anastasiia
1e80dd69a3
fix: update snapshot (#1956) 2022-04-11 10:40:30 +03:00
Loïc Fürhoff
6716b08e88
feat: theme add sidebar activeBackgroundColor and activeTextColor (#1600) 2022-04-07 16:51:52 +03:00
AlexVarchuk
a160498089
chore: update redoc version in cli (#1951) 2022-03-30 15:29:47 +03:00
AlexVarchuk
84fa123987
chore:cli-v0.13.10 (#1950)
Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2022-03-30 15:17:45 +03:00
AlexVarchuk
61edf6c1b9
chore: v2.0.0-rs.66 (#1949) 2022-03-30 14:20:40 +03:00
dependabot[bot]
2b551e7bf1
chore(deps): bump node-forge from 1.2.1 to 1.3.0 (#1944)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 17:33:38 +02:00
Sergey Dubovyk
de67df102a
chore: change side menu message (#1390) 2022-03-24 22:46:03 +08:00
AlexVarchuk
d8916df303
chore: update minimist for security reasons (#1943) 2022-03-24 09:02:01 +02:00
AlexVarchuk
7dd76292e0
chore: update snapshots for unit tests (#1942) 2022-03-24 08:53:19 +02:00
Quentin D
c75ac9cf70
feat: nonce support (#1566)
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
Co-authored-by: AlexVarchuk <olexandr.varchuk@gmail.com>
2022-03-23 18:02:30 +02:00
Ajeet Shah
25be934bb1
H2: Set color form theme.colors.text.primary (#1491)
* H2: Set color form theme.colors.primary.main

* feat: change heading color configuration from `primary.main` to `text.primary`

Co-authored-by: Oprysk <vyacheslav@redocly.com>
2022-03-23 17:54:11 +02:00
Ryc O'Chet
09786f2a5a
feat: Add support for displaying operationId in the sidebar (#1927)
* feat: Add support for displaying id in the sidebar

* fix: previous commit `feat: Add support for displaying id in the sidebar`

Co-authored-by: Oprysk <vyacheslav@redocly.com>
2022-03-23 12:39:26 +02:00
Josh
ab3e8a8f80
fix: move comma out of code block in SecurityRequirement.tsx (#1924) 2022-03-23 12:12:30 +02:00
AlexVarchuk
eb096b69be
fix: rename bandle command and add deprecate notice (#1935)
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2022-03-21 17:21:02 +02:00
redocly-bot
0c23f8d051 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-03-21 14:48:22 +00:00
redocly-bot
a36610b3c5 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-03-21 14:25:04 +00:00
AlexVarchuk
117071ee83
fix: add handle local files for serve command (#1810) 2022-03-21 15:56:12 +02:00
AlexVarchuk
30b3b57b26
chore: update docs about support IE 11 (#1938) 2022-03-21 15:51:23 +02:00
AlexVarchuk
95dbfc930f
chore: update openapi-core and yargs libs (#1934) 2022-03-18 17:30:23 +02:00
AlexVarchuk
c508949c54
chore: cli-v0.13.9 (#1933) 2022-03-15 17:27:27 +02:00
AlexVarchuk
df477abdd3
chore: 2.0.0-rc.65 (#1932) 2022-03-15 16:48:04 +02:00
Eli$
ac6fb458a4
use x-displayName in securityDefinitions (#1444)
Co-authored-by: elis-k <53352199+elis-k@users.noreply.github.com>
Co-authored-by: AlexVarchuk <olexandr.varchuk@gmail.com>
2022-03-15 15:47:22 +02:00
AlexVarchuk
29bbfbddbf
chore: update prismjs lib (#1931) 2022-03-15 15:35:19 +02:00
Anastasiia
f60b475833
Fix: deprecated badge on one of any of buttons (#1930) 2022-03-15 13:22:22 +02:00
AlexVarchuk
fe67e9c332
fix: auth link scroll for Firerox (#1922) 2022-03-14 17:49:08 +02:00
AlexVarchuk
059bd8000e
fix: sanitize array of items (#1920) 2022-03-14 17:39:55 +02:00
dependabot[bot]
1672d4599b
chore(deps): bump prismjs from 1.26.0 to 1.27.0 in /cli (#1915)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 17:01:54 +02:00
AlexVarchuk
635f379eb0
fix: improve customization fab (#1891) 2022-03-14 15:36:50 +02:00
dependabot[bot]
eb4040afd8
chore(deps): bump prismjs from 1.25.0 to 1.27.0 (#1916)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.25.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 15:29:16 +02:00
redocly-bot
cb3d0a018e sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-03-14 10:21:58 +00:00
AlexVarchuk
0f4ae0196d
chore: cli-v0.13.8 (#1913) 2022-02-24 14:56:14 +02:00
AlexVarchuk
3b576c8abb
chore: 2.0.0-rc.64 (#1912) 2022-02-24 14:32:59 +02:00
AlexVarchuk
b33ac554dc
chore: update openapi-sampler to v1.2.1 (#1911) 2022-02-24 13:51:49 +02:00
Michael Crenshaw
777efdde35
fix: bump json-pointer version to avoid CVE-2021-23820 (#1910)
Co-authored-by: Michael Crenshaw <michael_crenshaw@intuit.com>
2022-02-24 13:19:47 +02:00
dependabot[bot]
86cd8df1f3
chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#1906)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-24 13:15:57 +02:00
redocly-bot
ab02f667a1 sync: Synced local 'docs/' with remote 'docs/redoc/' 2022-02-09 12:18:16 +00:00
AlexVarchuk
57cdd9f6da
fix: external ref in schema definition (#1894) 2022-02-04 15:21:46 +02:00
AlexVarchuk
60f012d760
chore: add supported options to the readme file (#1899) 2022-02-04 14:33:43 +02:00
AlexVarchuk
18832b9252
chore: add showObjectSchemaExamples to readme (#1898) 2022-02-04 12:25:41 +02:00
AlexVarchuk
da4e4ad677
chore: cli-v0.13.17 (#1889) 2022-01-27 16:59:28 +02:00
Oprysk Vyacheslav
b474d679b5
fix: package-lock (#1888) 2022-01-27 16:31:41 +02:00
AlexVarchuk
ec3f28642f
chore: v2.0.0-rc.63 (#1886) 2022-01-27 16:05:07 +02:00
Oprysk
dabca2476f chore: update license-check 2022-01-27 15:41:58 +02:00
Oprysk
9befed5c4a chore: update packages 2022-01-27 15:41:58 +02:00
Alex Varchuk
b5b0d61b35 fix: scroll in sidebar 2022-01-27 15:41:58 +02:00
Oprysk Vyacheslav
acbc5c7b59
chore: (cli) v0.13.6 (#1881) 2022-01-26 12:34:47 +02:00
Oprysk Vyacheslav
a355a7aaa9
chore: 2.0.0-rc.61 (#1880) 2022-01-26 12:20:25 +02:00
Oprysk Vyacheslav
f411f0aee2
Revert "hotfix: field expand (#1878)" (#1879)
This reverts commit f173781edf.
2022-01-26 12:12:58 +02:00
Oprysk Vyacheslav
f173781edf
hotfix: field expand (#1878) 2022-01-26 12:07:57 +02:00
Roman Hotsiy
957f1a61be
Fix expanded (#1877)
* fix: fields not expanding after esbuild migration

* chore: fix local dev

* update snapshot

Co-authored-by: Oprysk <vyacheslav@redocly.com>
2022-01-26 11:56:08 +02:00
Oprysk Vyacheslav
c43824c6a3
chore: add cache option for eslint (#1876) 2022-01-26 11:54:27 +02:00
romanhotsiy
b2cad9c0f0
chore(cli): v0.13.5 2022-01-26 00:32:12 +02:00
romanhotsiy
a1cc19ec78 chore: Release 2.0.0-rc.61 🔖 2022-01-26 00:23:02 +02:00
romanhotsiy
8ded7699ee fix: fix ssr usage after migrating to esbuild pipeline 2022-01-26 00:23:02 +02:00
AlexVarchuk
f3289872d6
chore: v0.13.4 (#1871) 2022-01-25 18:49:59 +02:00
AlexVarchuk
2436530930
chore: v0.13.3 (#1870) 2022-01-25 18:49:37 +02:00
AlexVarchuk
695654a38f
chore: v2.0.0-rc.60 (#1869) 2022-01-25 17:01:10 +02:00
AlexVarchuk
250d53a59f
fix: add schema expansion level (#1868)
* feat: add schemaExpansionLevel
2022-01-25 16:43:14 +02:00
Oprysk Vyacheslav
35418b1569
chore: migrate from babel to esbuild loader (#1848)
* chore: migrate from babel to esbuild loader

* fix cypress tests
2022-01-25 15:50:28 +02:00
Depickere Sven
b74dcde42b
feat(#1251): Add file selector to demo application (#1859)
* feat(#1251): Add file selector to demo application

This PR should fix the request to add a file selector to the demo application see issue #1251 .

* refactor(): Remove function, use it implicit

* refactor(): Add interface props

* refactor(): Update method usage

use regular func as a Component declaration and the arrow func as a handler inside the component.
2022-01-24 19:58:46 +02:00
Depickere Sven
18f943d2b5
fix: Response objects couldn't open (#1867)
* This was undefined on response toggle

* Add test cases for opening response object
2022-01-24 11:14:31 +02:00
Oprysk Vyacheslav
5694913e71
fix: writeOnly params displaying in webhook (#1866) 2022-01-20 18:36:40 +02:00
Oprysk Vyacheslav
95a7347931
fix: definition name util (#1865)
* fix: definition name util

* update snapshot
2022-01-20 00:01:30 +02:00
Oprysk Vyacheslav
3e47932754
chore: bump marked version (#1863) 2022-01-17 14:18:16 +02:00
dependabot[bot]
1686bb33d3
chore(deps-dev): bump shelljs from 0.8.4 to 0.8.5 (#1858)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-17 14:14:51 +02:00
Andriy Zaleskyy
6c7685e5fa
fix: No maxLength label is displayed for arrays of items #1701 (#1765)
* fix: No maxLength label is displayed for arrays of items #1701

* Revert "fix: No maxLength label is displayed for arrays of items #1701"

This reverts commit 543ecc4d39.

* fix: No maxLength label is displayed for arrays of items #1701

* change array items display

* fix alignment

* remove theme font from labels

* update snapshot

Co-authored-by: Oprysk <vyacheslav@redocly.com>
2022-01-05 17:11:05 +02:00
Oprysk Vyacheslav
2474b76d0d
chore: update snapshots (#1846) 2021-12-31 14:11:12 +02:00
Loïc Fürhoff
fb104e6966
feat: redoc-cli add host option (#1598) 2021-12-31 13:21:50 +02:00
TJT
ea8573dbd7
fix: attachHeadingsDescriptions match headings incorrectly (#1845)
* fix: attachHeadingsDescriptions match headings incorrectly

* fix: match new line instead of `$` in MarkdownRenderer.attachHeadingsDescriptions

Co-authored-by: TJT <tjt@maimemo.com>
2021-12-31 13:00:09 +02:00
flouthoc
831b207715
MenuBuilder: Add support for sortOperationsAlphabetically and sortTagsAlphabetically (#1843)
* operations: Add support for sortOperationsAlphabetically

Already documented but is currently `NO-OP` and not implemented
`sortOperationsAlphabetically`.

Allows sorting operations in sidebar menu according to their `name`
configured which is by default `summary` from Swaggerspec

TLDR:
Following commit adds support for `sortOperationsAlphabetically` already
documented but not implemented here: https://redoc.ly/docs/api-reference-docs/guides/migration-guide-2-0/#automated-sorting

Signed-off-by: flouthoc <flouthoc.git@gmail.com>

* feat: move sort by prop to utils functions

* feat: add ability to sort tags

Co-authored-by: Oprysk <vyacheslav@redocly.com>
2021-12-30 14:31:00 +02:00
Oprysk Vyacheslav
c986f0ef1a
feat: support examples in object schema (#1832)
* feat: support examples in object schema

* revert pure components used with observer

* rename option

* update test
2021-12-29 12:22:57 +02:00
Oprysk
6c41e95aa0 chore: fix broken test & components refactoring 2021-12-14 11:10:39 +02:00
Oprysk
a42d29d5c9 chore: bump marked version 2021-12-14 11:10:39 +02:00
Shelby Sanders
f82eb53ccf
Added support for showExtensions and $ref for Responses (#1406)
* Corrected responses to support $ref

* Add showExtentions for Responses

* Add showExtentions support for Responses

* Update src/services/__tests__/models/Response.test.ts

Co-authored-by: Giles Wells <giles@mediagearhead.com>

Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
Co-authored-by: Giles Wells <giles@mediagearhead.com>
2021-12-09 19:43:47 +02:00
Oprysk Vyacheslav
af138639ca
chore(cli): v0.13.2 (#1828) 2021-12-09 17:17:52 +02:00
Oprysk Vyacheslav
9f564d3b75
chore: v2.0.0-rc.59 (#1827) 2021-12-09 16:47:54 +02:00
Oprysk Vyacheslav
aaa3b3280c
fix: x-examples for request body param does not display #1743 (#1826)
* fix: x-examples for request body param does not display #1743

* lint

* fix ts
2021-12-09 15:27:49 +02:00
Oprysk Vyacheslav
913b3a422f
chore: update docs (#1825) 2021-12-09 15:27:31 +02:00
Aarni Koskela
3028d3d7ac
Fix Chrome scrolling by using alternate scrollIntoViewIfNeeded (#1823)
* Break out scrollIntoViewIfNeeded into freely usable function

* Always use alternate implementation of scrollIntoViewIfNeeded

Refs #1714

Refs #1742
2021-12-09 12:51:02 +02:00
Oprysk Vyacheslav
ace52f7e49
chore: update packages (#1824) 2021-12-09 12:38:03 +02:00
dependabot[bot]
fe5292208c
chore(deps): bump prismjs from 1.24.1 to 1.25.0 (#1802)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.1...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-09 11:07:42 +02:00
AlexVarchuk
bc2d9a7d9c
fix: fix scroll in example dropdown (#1803) 2021-12-09 11:04:17 +02:00
Aarni Koskela
3d11a80c9c
chore: replace bundlesize with size-limit (#1822) 2021-12-09 10:29:35 +02:00
Junghyun Colin Kim
2e4663b3b7
Use an option usePathInSidebar (#1805)
* Use an option usePathInSidebar

If this option is enabled, it displays a path in the sidebar instead of
summary.

Usage:

```js
                <RedocStandalone
                spec={props.spec}
                options={{
                    scrollYOffset:'.navbar',
                    nativeScrollbars: true,
                    usePathInSidebar:true
                }}
```

* Rename usePathInSidebar to sideNavStyle

* Rename sidebarName to sidebarLabel

* Use ternary operator

* Use enums instead of raw string
2021-12-08 15:53:14 +02:00
AlexVarchuk
8b1eea8c0c
chore(cli): v0.13.1 (#1809) 2021-11-29 16:37:08 +02:00
AlexVarchuk
f0bd5c8acf
chore: v2.0.0-rc.58 (#1808) 2021-11-29 15:48:22 +02:00
AlexVarchuk
0e43ad3102
fix: add browser build for webpack 5 (#1796) 2021-11-29 14:27:06 +02:00
Oprysk Vyacheslav
b604bd8da8
fix: exclusiveMin/Max shows incorect range (#1799)
* fix: exclusiveMin/Max shows incorect range

* cover all number range cases & add unit tests

* add more tests

* fix maximum value

* simplify humanizeNumberRange function

* simplify exclusive checks

* Update src/utils/openapi.ts

Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>

* update test coverage

* linting

* revert weird prettier changes

* add md files to prettier ignore

Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2021-11-24 16:47:24 +02:00
Oprysk Vyacheslav
4fb5f914fa
chore: run prettier & add husky pre-commit hook (#1800) 2021-11-24 16:11:45 +02:00
redocly-bot
82df17d871 sync: Synced local 'docs/' with remote 'docs/redoc/' 2021-11-23 17:46:45 +00:00
redocly-bot
7e287d984e sync: Synced local 'docs/' with remote 'docs/redoc/' 2021-11-23 14:47:32 +00:00
AlexVarchuk
ad652b9c7f
fix: mobile view in docker image (#1795) 2021-11-23 15:28:02 +02:00
redocly-bot
bf6b85d4ba sync: Synced local 'docs/' with remote 'docs/redoc/' 2021-11-23 05:08:42 +00:00
Heather Cloward
6cbd96a24a
[GSoD]Reorganizes the quickstart into a deployment guide and quickstart (#1749)
* Reorganizes the quickstart into a deployment guide and quickstart

* Minor edits

* fix: minor formatting issue

* fix: simplify phrasing

* Adds redirects, link to preview-docs docs, and other review edits

* remove IE polyfills as IE is no longer supported

Co-authored-by: Ivana Isadora Devcic <33730345+skadinna@users.noreply.github.com>
2021-11-23 16:07:56 +11:00
Roman Hotsiy
262177ddfd
chore: remove broken badges from README 2021-11-08 09:11:44 +02:00
Andriy Zaleskyy
734080c354
fix: Default boolean property value not rendered #1779 (#1781) 2021-10-27 16:55:20 +03:00
romanhotsiy
ebbd256b1f
chore: fix cli publish workflow 2021-10-11 21:00:54 +03:00
Roman Hotsiy
7b1a720942
chore(cli): v0.13.0 (#1771) 2021-10-11 20:53:41 +03:00
romanhotsiy
e4f34f5363
chore: fix publish workflow again 2021-10-11 20:39:20 +03:00
romanhotsiy
56543d239e
chore: fix publish workflow and disable s3 demo 2021-10-11 18:40:33 +03:00
romanhotsiy
aeb276aaf1
chore: update publish cli workflow 2021-10-11 18:25:47 +03:00
AlexVarchuk
e621535dc7
chore: v2.0.0-rc.57 (#1770) 2021-10-11 17:56:29 +03:00
raghavi92
352a851857
fix: No match scenario in search (#1667)
Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com>
2021-10-11 17:34:20 +03:00
Gabriel Simon Gianotti
8e75f9929b
chore: remove commented out code (#1768) 2021-10-11 17:30:59 +03:00
Roman Hotsiy
4fb9c83525
fix: fix deref logic for oas3.1 (#1767) 2021-10-11 15:02:08 +03:00
Andriy Zaleskyy
3b8d6441bd
fix: The number of items in the array in the array is incorrect #1762 (#1763) 2021-10-11 13:05:50 +03:00
kylenarocroc
43451ba4cd
feat: add q/kdb+ syntax highlighting (#1605) 2021-10-11 12:50:09 +03:00
AlexVarchuk
952c05c6b4
fix: improve publish action scripts (#1729) 2021-10-11 12:40:56 +03:00
Roman
ba25e24087
Merge pull request #1766 from Redocly/fix/missing-description-when-ref-used-1727
fix: OpenAPI 3.1: Missing description when $ref used #1727
2021-10-11 12:18:19 +03:00
Roman Marshevskyy
fe6909ed80 fix: OpenAPI 3.1: Missing description when $ref used #1727 2021-10-11 11:51:17 +03:00
Roman Marshevskyy
35f77878de fix: OpenAPI 3.1: Missing description when $ref used #1727 2021-10-11 10:53:28 +03:00
Swapnil Ogale
0f53f4b208
Merge pull request #1748 from HCloward/docs/more-readme-updates
[GSoD]Updates readme with about section and organizes features list
2021-10-11 10:37:02 +11:00
Heather Cloward
c4564de324 Updates image src 2021-10-09 14:46:36 -04:00
Heather Cloward
3cc6ea4589 Minor edit 2021-10-09 14:44:37 -04:00
Heather Cloward
1c8578ea88 Adds comparison table and OpenAPI link section 2021-10-09 14:40:39 -04:00
AlexVarchuk
bccd21394e
fix: scrolling to the first item (#1753) 2021-09-27 12:21:59 +03:00
Heather Cloward
8d93021f17 Minor edits 2021-09-22 22:20:49 -04:00
Heather Cloward
86907bd7ae Merge branch 'docs/more-readme-updates' of github.com:HCloward/redoc into docs/more-readme-updates 2021-09-22 22:17:36 -04:00
Heather Cloward
669adddc9d Updates per reviews and adds new logo 2021-09-22 22:17:19 -04:00
Ivana Isadora Devcic
c87600d520
fix: Redoc spelling 2021-09-21 22:17:48 +02:00
AlexVarchuk
3f6bf5febb
chore: update libs (#1707) 2021-09-20 14:08:58 +03:00
Mark Theisen
bd9390a5bf
feat: new option generatedPayloadSamplesMaxDepth (#1642) 2021-09-14 13:08:50 +03:00
Heather Cloward
899d7f9637 Adds some notes to deployment 2021-09-13 07:22:18 -04:00
Heather Cloward
f8925facf8 Updates readme with about section and organizes features list 2021-09-12 21:41:29 -04:00
Swapnil Ogale
1d088a8dd8
Merge pull request #1737 from HCloward/docs/update-readme
[GSOD]Removes content that is now in documentation and adds link to docs
2021-09-01 22:22:49 +10:00
Swapnil Ogale
e7f7d963bd
Update README.md
Co-authored-by: Adam Altman <adam@rebilly.com>
2021-09-01 22:03:57 +10:00
Ivana Isadora Devcic
a7ed8ddd98
Apply suggestions from code review 2021-09-01 13:48:46 +02:00
Andriy Zaleskyy
a8e0c29685
fix: Schema for events incorrectly omits readOnly and includes writeOnly (#1720 #1540) 2021-08-31 15:39:55 +03:00
Heather Cloward
8afcf1b932 Removes content that is now in documentation and adds link to docs 2021-08-29 21:27:18 -04:00
Adam Altman
683eabbbf0
docs: fix broken links in intro (#1730) 2021-08-24 21:40:16 -05:00
Heather Cloward
e8412e8e93
docs(GSOD): Adds new quickstart doc (#1718) 2021-08-24 20:44:27 -05:00
romanhotsiy
ccb18604a6
chore(cli): v0.12.3 2021-08-11 13:36:13 +03:00
AlexVarchuk
d164699c42
chore: add change log for v2.0.0-rc.56(#1723) 2021-08-11 13:25:02 +03:00
AlexVarchuk
c904cdb705
chore: up version for release (#1722) 2021-08-11 13:11:02 +03:00
AlexVarchuk
ddf297b112
fix: nullable object's fields were missing (#1721) 2021-08-11 12:59:31 +03:00
Roelof Kallenkoot
919a5f02fb
feat: add github action to build docker images and push to ghcr.io on release (#1614) 2021-08-10 16:56:27 +03:00
AlexVarchuk
6a52a16d5b
fix: hideLoading options in redoc standalone (#1709) 2021-08-03 13:37:01 +03:00
AlexVarchuk
cd2d6f76e8
fix: improve openapi 3.1 (#1700) 2021-08-03 13:36:06 +03:00
AlexVarchuk
7eec319195
chore: add headers to github templates (#1710) 2021-07-30 19:03:51 +03:00
AlexVarchuk
e2dee0f741
chore: add github template (#1708) 2021-07-30 17:35:52 +03:00
Marius Butuc
836c422262
docs: add real-life usage example: BoxKnight (#1651) 2021-07-30 11:19:41 +03:00
Valdir Mendes
9e1ea703e5
fix: handle empty object in security array (#1678) 2021-07-30 11:18:13 +03:00
romanhotsiy
f7211ceb08
chore: fix dockerfile 2021-07-20 15:18:21 +03:00
romanhotsiy
8dc00a9f1c
chore: upgrade shrinkwrap 2021-07-16 09:23:32 +03:00
Andrea Mugx
43470f17e3
chore: bumps npm-shrinkwrap (#1688) 2021-07-16 09:18:44 +03:00
Andrea Mugx
e3b2f10ab0
chore(cli): v0.12.2 2021-07-09 17:59:30 +03:00
Roman Hotsiy
d724440085
feat: add yaml highlight (#1684)
* feat: add yaml highlight

* chore: upgrade prism version
2021-07-09 17:04:53 +03:00
ILya Volchenkov
ec50858ec4
feat: added localization for some labels (#1675) 2021-07-09 10:33:36 +03:00
Waldir Pimenta
eba55124c9
docs: improve the redoc cli README (#1679)
- Break some long lines
- Add some articles (the, a)
- Add a couple links for additional context
- Expand the SSR acronym
- Describe what --watch does
2021-07-09 10:25:52 +03:00
Roman
bb67e29bbf
Merge pull request #1671 from Redocly/marshevskyy
chore: added pull request template
2021-07-05 16:20:34 +03:00
Roman
a7a1efd83f
chore: added security section into pull request template 2021-07-05 15:50:43 +03:00
Ivan Shvets
0c6fd47762
Merge pull request #1665 from Redocly/chore/change-docs-sync-flow
chore: changed docs sync flow
2021-07-05 11:25:33 +03:00
Ivan Shvets
78c7e37ecb
chore: changed docs sync flow 2021-07-02 18:14:26 +03:00
romanhotsiy
99618bbee7
chore: fix demo slack url 2021-07-01 12:53:49 +03:00
romanhotsiy
68690d1872
chore: v2.0.0-rc.55 2021-07-01 12:45:19 +03:00
romanhotsiy
a4e85fb374
chore: fix sync workflow 2021-07-01 12:40:25 +03:00
romanhotsiy
b41a8b4ac7
fix: fix accidentally removed onLoaded
fixes #1656
2021-07-01 12:37:42 +03:00
romanhotsiy
3df72fb99f
fix: broken linkify
fixes #1655
2021-07-01 12:34:50 +03:00
romanhotsiy
f944da0e7d
chore: change cors url in the demo 2021-07-01 12:31:20 +03:00
Ivan Shvets
ece0f5a0cb
Merge pull request #1652 from Redocly/feat/git-folder-sync
feat: added git folder sync config
2021-06-25 10:47:58 +03:00
Ivan Shvets
a69f0fb009 feat: added git folder sync config 2021-06-23 12:59:47 +03:00
romanhotsiy
274b04b432
chore(cli): v0.12.1 2021-06-09 17:25:34 +03:00
romanhotsiy
173d411071
chore(cli): v0.12.0 2021-06-09 15:58:25 +03:00
romanhotsiy
43b693f319
chore(cli): upgrade redoc to rc.54 2021-06-09 15:57:44 +03:00
romanhotsiy
bcfae6acef
chore: v2.0.0-rc.54 2021-06-09 15:46:58 +03:00
Roman Hotsiy
f4ea368f78
feat: merge refs oas 3.1 (#1640) 2021-06-09 15:43:52 +03:00
romanhotsiy
0a4d172333
chore: remove extra webpack resolver 2021-06-09 15:10:32 +03:00
Roman Hotsiy
c09cf9dbbe
chore: modernize build pipeline (#1635) 2021-06-09 14:57:36 +03:00
Roman Hotsiy
92387bc653
chore: upgrade dependencies (#1634) 2021-06-02 15:53:36 +03:00
AlexVarchuk
823be24b31
feat: add basic support openApi 3.1 (#1622) 2021-05-31 19:23:05 +03:00
Yevhenii Hyzyla
4b072be8d1
fix: use operation path if operation summary/description is not provided (#1596)
resolves #1270
2021-04-29 23:34:43 +03:00
langhabel
d7a0a4da17
fix: parse json theme string for standalone tag (#1492) 2021-04-15 10:47:40 +03:00
Andriy Leliv
22cc5f17dc
chore: update(cli) engine node version >=12 (#1583) 2021-04-15 10:01:28 +03:00
Andriy Leliv
0ee6c51320 chore(cli): v0.11.4 2021-04-13 17:14:18 +03:00
Andriy Leliv
ab2d57a5a2
fix: right absolute path for load and bundle definition (#1579) 2021-04-13 17:00:36 +03:00
Andriy Leliv
18511fdb62 Merge branch 'master' of github.com:Redocly/redoc 2021-04-13 11:13:09 +03:00
Andriy Leliv
79961d4c0c chore(cli): v0.11.3 2021-04-13 11:11:17 +03:00
Andriy Leliv
44152fdae7
docs: update specUrl (#1577) 2021-04-12 21:26:00 +03:00
Olivier Beaulieu
dfc4cf1caa
fix: added missing semicolon to styling (#1578) 2021-04-12 19:24:15 +03:00
Andriy Leliv
5c8524d80f chore: Release 2.0.0-rc.53 2021-04-12 18:28:56 +03:00
Andriy Leliv
3c4ece966c chore: Release 2.0.0-rc.52 2021-04-09 22:17:30 +03:00
Andriy Leliv
ca3108b78b chore: update openapi-core version to fix parsing root document 2021-04-09 22:16:50 +03:00
romanhotsiy
893e296398
chore(cli): v0.11.2 2021-04-09 11:12:30 +03:00
Andriy Leliv
cc04106a68
fix: broken paths when budle or serve using cli (#1572) 2021-04-09 11:10:49 +03:00
romanhotsiy
0a08f121f3
chore(cli): v0.11.1 2021-04-08 22:42:31 +03:00
Andriy Leliv
3cae0b37b5
chore(cli): v0.11.0 2021-04-08 22:38:10 +03:00
Andriy Leliv
60bf22e106 chore: Release 2.0.0-rc.51 2021-04-08 19:58:52 +03:00
Andriy Leliv
5a9154ab1d
chore: unit tests to check loading and bundling api definitions with openapi-core (#1568) 2021-04-08 18:45:55 +03:00
Andriy Leliv
503394655d
chore: use openapi-core to bundle definition instead of json-schema-ref-parser (#1500)
* chore: use openapi-core to bundle definition instead of json-schema-ref-parser
* chore: update: root and demo webpack configs
* chore: refactor loadAndBundleSpec
* chore: update vesions: openapi-core, redoc
* chore: rolled back webpack.config(s) to previous version
* chore: changed the way of creating core Config for bundling definition
* fix: disable eslint react/display-name
* fix: update nodejs version to 12 in travis config
* chore: optimize verification: browser or server
* chore: add fetch only for browser
* Update src/utils/loadAndBundleSpec.ts
* chore: isBrowser verification improvment
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2021-04-08 15:49:15 +03:00
Kurt Furbush
e5644ee67a
docs: remove extra word in grammar (#1539) 2021-03-31 15:52:45 +03:00
Patrick Demers
c7bbef5155
feat: add disable-google-font parameter to serve command in cli (#1558) 2021-03-31 15:51:50 +03:00
迷渡
4846259de3
docs: minor syntax highlight fix on the README (#1549) 2021-03-02 09:35:28 +02:00
Oleksiy Kachynskyy
6086c6c89f
docs: remove outdated config option from readme (#1543) 2021-02-22 15:50:33 +02:00
romanhotsiy
7003bcc109
chore(cli): v0.10.4 2021-02-15 15:45:24 +02:00
romanhotsiy
8bee3d5777
chore: Release 2.0.0-rc.50 🔖 2021-02-15 14:52:37 +02:00
romanhotsiy
3ba622f3ab
fix: add includes polyfill
fixes #1530
2021-02-15 14:51:25 +02:00
Roman Hotsiy
8270481e9f
fix: false-positive recursive tag case when using oneOf + allOf (#1534) 2021-02-15 14:50:35 +02:00
romanhotsiy
524e512b94
chore(cli): v0.10.3 2021-02-15 14:19:47 +02:00
romanhotsiy
8d98fed766
chore(cli): upgrade redoc to rc.49 2021-02-15 14:19:47 +02:00
romanhotsiy
d3589ddfbb
chore: clean up .travis.yaml 2021-02-15 14:19:47 +02:00
Anton Kozachuk
d288165a4e
fix: background-color in search results (#1531)
* fix: background-color in search results

* Delete some changes
2021-02-15 14:14:54 +02:00
romanhotsiy
755a9095f5
chore: update travis badge url 2021-01-30 23:36:10 +02:00
romanhotsiy
753b4abe84
chore: Release 2.0.0-rc.49 🔖 2021-01-30 23:18:43 +02:00
Anton Kozachuk
c874a5942c
fix: pass boolean and number values as a string in highlight function (#1512) 2021-01-30 14:19:18 +02:00
romanhotsiy
0dce880dce
fix: crash on multiple examples on parameter object
fixes #1485
2021-01-28 11:21:25 +02:00
baijunyao
d886751261
chore: remove duplicate semicolons (#1504) 2021-01-22 11:15:10 +02:00
Karl Scheirer
a5e8e818c8
docs: document theme options (#1438) 2021-01-08 14:05:10 +02:00
romanhotsiy
040ce72a8a
fix: fix SourceCodeWithCopy component to be non-pure 2020-12-11 11:14:01 +02:00
romanhotsiy
bc19750771
chore(cli): v0.10.2 2020-12-11 11:12:53 +02:00
jabba-jedi
f0755a804f
docs: fix the Rebilly link 2020-12-10 12:38:12 +02:00
Roman Hotsiy
2a329c1bec
docs: fix menuToggle default value
fixes #1476

[ci skip]
2020-12-01 15:24:20 +02:00
romanhotsiy
7b78e75287
chore: Release 2.0.0-rc.48 🔖 2020-11-30 13:09:04 +02:00
romanhotsiy
abcd7e0832
chore: upgrade prism.js
fixes #1455
2020-11-30 13:08:00 +02:00
Anna Stasiuk
8c559bcbcd
fix: add missed labels to elements (#1445) 2020-11-30 12:51:27 +02:00
Anna Stasiuk
bb4594ee58
feat: add new option hideSchemaPattern (#1475)
* feat: add new option hideSchemaPattern
* chore: add hideSchemaPattern option to readme
2020-11-30 11:54:46 +02:00
Roman Hotsiy
d12e410d99
feat: support multiple examples for parameters (#1470) 2020-11-23 14:00:17 +02:00
romanhotsiy
340a568262
chore(cli): v0.10.1 2020-11-17 13:05:14 +02:00
romanhotsiy
c6b7d567d9
chore: Release 2.0.0-rc.47 🔖 2020-11-17 11:31:22 +02:00
romanhotsiy
d09e744d15
fix: limit autogen json samples depth to 10 2020-11-17 11:26:04 +02:00
romanhotsiy
b6d6f864a0
chore: upgrade some deps 2020-11-17 11:22:34 +02:00
Karl Scheirer
64b01162dc
docs: add 3 vendor extensions to list (#1457) 2020-11-10 10:21:02 +02:00
romanhotsiy
faf6fd00c1
chore: Release 2.0.0-rc.46 🔖 2020-11-05 15:36:15 +02:00
Anna Stasiuk
702fea0f41
feat: add tabTextColor option for responses (#1451) 2020-11-05 15:23:05 +02:00
Anna Stasiuk
6bedcf94b2
fix: fix arrow color in responses (#1452) 2020-11-05 15:22:42 +02:00
Anna Stasiuk
4729fc3d8f
fix: remove duplicated slash if hideHostname option enabled (#1448) 2020-11-03 14:47:23 +02:00
Caleb Boyd
4567534cbb
fix: use shrinkwrap for cli package (#1446) 2020-10-31 08:35:46 +02:00
romanhotsiy
6a97239f50
chore(cli): v0.10.0 2020-10-27 22:30:46 +02:00
romanhotsiy
0ec03a34df
chore: upgrade cli to rc.45 2020-10-27 22:30:03 +02:00
romanhotsiy
aa53416d14
chore: Release 2.0.0-rc.45 🔖 2020-10-27 17:52:34 +02:00
Hleb Albau
7ffaf9ff72
docs: add 'maxDisplayedEnumValues' option to docs (#1421) 2020-10-27 10:54:08 +02:00
Michael Huynh
c0ae9de607
feat: add field constraint indicator for uniqueItems (#1423)
* Add field constraint indicator for uniqueItems

Resolves #1353

* Update src/components/Fields/FieldContstraints.tsx

Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2020-10-27 10:51:44 +02:00
Anna Stasiuk
e2de5b065e
fix: increase colors contrast to make them more accessible (#1433) 2020-10-27 10:44:06 +02:00
Dávid Kaya
c11f679f82
fix: fix the name of OpenID Connect security scheme (#1425)
The official name of the OpenID Connect security scheme does not contain a space between 'Open' and 'ID', see https://openid.net/connect/.
2020-10-27 10:42:26 +02:00
romanhotsiy
1fdfd1353d
chore: Release 2.0.0-rc.44 🔖 2020-10-16 18:24:37 +03:00
romanhotsiy
0703f73f79
feat: new extensions hook PropertyDetailsCell + wrap property name into span 2020-10-16 18:24:26 +03:00
Roman Hotsiy
f5eeacfd05
chore: add .vscode to .gitignore (#1416) 2020-10-14 11:49:54 +03:00
romanhotsiy
d4016b8142
chore: fix tests 2020-10-13 19:10:04 +03:00
romanhotsiy
129e18b939
chore: Release 2.0.0-rc.43 🔖 2020-10-13 19:00:53 +03:00
Roman Hotsiy
26c407bd0f
fix: fix broken observable after mobx upgrade (#1415) 2020-10-13 18:59:58 +03:00
romanhotsiy
b848988c34
chore: Release 2.0.0-rc.42 🔖 2020-10-13 17:19:10 +03:00
Roman Hotsiy
c90245598e
chore: update test snapshot (#1414) 2020-10-13 17:13:35 +03:00
Roman Hotsiy
a0f15d99f0
chore: upgrade to mobx@6 (#1412) 2020-10-13 16:58:27 +03:00
Roman Hotsiy
84ab95ddc7
fix: make schema layout more responsive on small screen (#1411) 2020-10-13 16:21:36 +03:00
David Goss
086302bb23
docs: unqualify mobx version for react usage (#1380)
Per https://github.com/Redocly/redoc/issues/1189#issuecomment-606857342 the latest version works now, and the currently-specified version doesn't.
2020-10-13 14:56:53 +03:00
Anna Stasiuk
146b38c9d0
fix: make samples accessible by keyboard (#1401)
* fix: make samples accessible by keyboard

* chore: set outline-width and padding to collapser
2020-10-13 14:56:03 +03:00
Swapnil Ogale
0c782ec51f
docs: improvements to vendor extensions topic (#1386) 2020-10-13 14:55:45 +03:00
Anna Stasiuk
6632d84453
fix: hide dropdown input on IE 11 (#1403) 2020-10-13 14:50:00 +03:00
Vincent Leon
8f99cd0882
feat: Dockerfile compatible with OpenShift (#1407) (#1408)
Co-authored-by: Vincent LEON <vincent.leon@amadeus.com>
2020-10-13 14:47:58 +03:00
Kostyantyn Pshenychnyy
f805271d90
chore: fix demo examples urls (#1400) 2020-10-02 11:46:27 +03:00
Tom Green
8d4fbd419c
Fix #1387: Update the styled-components peerDependency (#1396)
* Update the styled-components peerDependency in package.json to 5.1.1 to match the devDependency

* Update package.json

Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2020-09-29 00:29:24 +03:00
Roman Hotsiy
9aa742025e
chore: Release 2.0.0-rc.41 🔖 2020-09-24 17:55:19 +03:00
Roman Hotsiy
38ac792b85
chore: do not use single-letter tokens in search 2020-09-24 14:04:58 +03:00
Roman Hotsiy
346b10f173
feat: load external search index 2020-09-24 14:04:58 +03:00
Roman Hotsiy
9730c4ee1c
feat: support for ignoring specified named schemas 2020-09-24 14:04:57 +03:00
Roman Hotsiy
a5468fb7bb
fix: fix displaying top-level object without any properties 2020-09-24 14:04:57 +03:00
Anna Stasiuk
f3e8ab4f8e
fix: fix displaying response title (#1376) 2020-09-08 16:14:39 +03:00
Andriy Leliv
d32b3c8422
chore: demo deployment to s3 (#1373) 2020-09-07 12:54:36 +03:00
Anna Stasiuk
a6b41aa00b
fix: show long pattern and add toggle button (#1375) 2020-09-07 12:53:30 +03:00
Anna Stasiuk
c801b87d2a
fix: display response code at the top after adding a line break (#1374)
* fix: display response code at the top after adding a line break

* chore: rename component from Strong to Code
2020-09-03 14:18:42 +03:00
Roman Hotsiy
4e7c7228aa
chore(cli): redoc-cli@0.9.12 2020-08-24 12:34:36 +03:00
Roman Hotsiy
17b98731a0
chore: Release 2.0.0-rc.40 🔖 2020-08-24 12:04:18 +03:00
Roman Hotsiy
be07197e6d
fix: invalid discriminator dropdown behaviour with enum 2020-08-24 12:03:44 +03:00
Roman Hotsiy
babae6098c
chore: Release 2.0.0-rc.39 🔖 2020-08-22 14:57:34 +03:00
Roman Hotsiy
d009e4a959
fix: broken dropdowns with SSR by using forked react-dropdown-aria 2020-08-22 14:57:31 +03:00
Anna Stasiuk
46eee7b70c
fix: make callbacks expandable by keyboard (#1354) 2020-08-20 17:06:55 +03:00
Roman Hotsiy
0ab06cfd84
chore: Release 2.0.0-rc.38 🔖 2020-08-20 16:52:46 +03:00
James Harris
fed9a061d5
fix: scale sideMenu labels according to computed font size (#1356) 2020-08-20 16:43:12 +03:00
Roman Hotsiy
addf8956e3
fix: do not crash for invalid parameter.in value
closes #1340
2020-08-19 13:16:05 +03:00
Anna Stasiuk
7e7d95fe18
chore: export dropdown components (#1351) 2020-08-18 13:11:13 +03:00
Roman Hotsiy
b76b936abe
chore(cli): redoc-cli@0.9.11 2020-08-18 13:07:25 +03:00
Roman Hotsiy
a3b98177a1
chore: fix demo webpack config 2020-08-18 13:05:51 +03:00
Roman Hotsiy
8e5a5e8a83
chore: Release 2.0.0-rc.37 🔖 2020-08-14 16:38:00 +03:00
Anna Stasiuk
41f81b4d96
feat: add webhooks support (#1304) 2020-08-14 16:33:25 +03:00
Anna Stasiuk
171711f79c
chore: export parameters and example components (#1347)
* chore: export parameters and example components

* chore: export OpenAPIEncoding interface
2020-08-14 12:24:22 +03:00
dependabot[bot]
74ebba6e02
chore(deps): bump prismjs from 1.20.0 to 1.21.0 in /cli (#1344)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.20.0...v1.21.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-11 15:19:11 +03:00
Roman Hotsiy
a553393a79
chore(cli): redoc-cli@0.9.10 2020-08-04 15:53:42 +03:00
Roman Hotsiy
a6e9f6dbf6
chore: Release 2.0.0-rc.36 🔖 2020-08-04 12:24:57 +03:00
Roman Hotsiy
7af2efe731
feat: new option simpleOneOfTypeLabel 2020-08-04 12:21:58 +03:00
Anna Stasiuk
2ce71895bc
fix: make elements accessible by keyboard navigation tools (#1339)
* fix: make api endpoint selectable

* fix: make response schema details selectable

* fix: update react-dropdown-aria to make dropdowns selectable
2020-08-04 12:19:01 +03:00
Roman Hotsiy
3ae069c436
chore(cli): redoc-cli@0.9.9
fixes #1318
2020-07-25 20:15:14 +03:00
Roman Hotsiy
9fe8a4b685
chore: fix eslint errors 2020-07-25 20:15:14 +03:00
Roman Hotsiy
5fea0b0fea
chore: upgrade cli deps 2020-07-25 20:15:14 +03:00
Roman Hotsiy
aedfa47ba4
chore: upgrade deps
closes #1316
2020-07-25 20:15:14 +03:00
Roman Hotsiy
1976dd4ee2
chore: minor refactor in theme.ts 2020-07-25 20:15:14 +03:00
Barış
c9596d4b6c
fix: highlight json keys using different color (#1287) 2020-07-25 19:52:27 +03:00
Roman Hotsiy
93d8f46cfe
chore: fix Github stars widget width on demo page 2020-07-24 19:54:15 +03:00
Roman Hotsiy
630d0b074e
chore: Release 2.0.0-rc.35 🔖 2020-07-24 19:51:55 +03:00
Roman Hotsiy
12bf6426ad
chore: remove tokens from .travis.yml 2020-07-24 19:51:42 +03:00
Roman Hotsiy
8a8f9ef824
chore: Release 2.0.0-rc.34 🔖 2020-07-24 19:21:14 +03:00
Oleksiy Kachynskyy
de27ac0308
fix: update EnumValues component (#1324) 2020-07-24 10:15:36 +03:00
Roman Hotsiy
676faa943a
chore: Release 2.0.0-rc.33 🔖 2020-07-21 17:16:29 +03:00
Roman Hotsiy
1834a140e2
chore: Release 2.0.0-rc.32 🔖 2020-07-21 16:54:18 +03:00
Oleksiy Kachynskyy
14e7db9403
feat: add maxDisplayedEnumValues config and buttons for show/hide enums (#1322) 2020-07-21 16:54:17 +03:00
Roman Hotsiy
a96a11a4dc
feat: new option sortEnumValuesAlphabetically (#1321) 2020-07-21 16:10:48 +03:00
Roman Hotsiy
4db5bc470b chore: skipLibCheck 2020-07-13 11:29:53 +03:00
Roman Hotsiy
371f3dfc4e chore: fix tests 2020-07-13 11:29:53 +03:00
Anya Stasiuk
30a27c116b fix: update focus styling 2020-07-13 11:29:53 +03:00
Anya Stasiuk
3d25005f08 fix: make endpoint dropdown accessible 2020-07-13 11:29:53 +03:00
Anya Stasiuk
e8a0d105ca fix: make dropdowns accessible by keyboard 2020-07-13 11:29:53 +03:00
Anya Stasiuk
006031c517 fix: make sample controls focusable 2020-07-13 11:29:53 +03:00
Anya Stasiuk
05fd7543a2 fix: make properties focusable 2020-07-13 11:29:53 +03:00
Anya Stasiuk
442014c06d fix: make response sections focusable 2020-07-13 11:29:53 +03:00
Anya Stasiuk
47c6319206 fix: fix contrast ratio for response titles 2020-07-13 11:29:53 +03:00
Roman Hotsiy
0904b3fec2
fix: fix expand variable for vars with hyphens or dots
fixes #926
2020-06-27 19:51:39 +03:00
Roman Hotsiy
633d71293f
fix: default style and explode for params
fixes #1016
2020-06-27 19:22:49 +03:00
Roman Hotsiy
418b74848d
chore: upgrade openapi-sampler
fixes #907
fixes #1296
2020-06-27 19:03:41 +03:00
Moshe Eshel
644e96ae45
feat: array size info based on min max Items properties (#1308) 2020-06-27 18:45:00 +03:00
Roman Hotsiy
41b8b5d77b
chore: add missing changelog changes 2020-06-25 19:05:08 +03:00
Roman Hotsiy
5eec3be4c5
chore: Release 2.0.0-rc.31 🔖 2020-06-25 18:47:49 +03:00
Petr Flaks
865a56a2a9
fix: prevent body scrolling when user scrolls side menu (#1300) 2020-06-23 11:53:00 +03:00
Anna Stasiuk
2ede22c45c
fix: do not display long regexps (#1295) 2020-06-09 13:36:43 +03:00
Roman Hotsiy
5bace3008f
chore: Release 2.0.0-rc.30 🔖 2020-05-25 16:50:58 +03:00
Roman Hotsiy
5cf4d2aada
chore: simplify .github workflow 2020-05-25 16:49:00 +03:00
Roman Hotsiy
c69f6de4c9
chore: remove global Dict<T> and replace it with Record<string, T> 2020-05-25 16:37:45 +03:00
Roman Hotsiy
9dd129d90b
fix: proper search-index dispose 2020-05-25 16:37:45 +03:00
Roman Hotsiy
8d1d4c82e1
fix: keep 3-column layout on 13-inch mbp 2020-05-25 16:37:45 +03:00
JoBrad
b6414f4e43
Updated x-servers link to point to valid location. (#1267) 2020-05-24 23:06:08 +03:00
Daniel Schosser
4512436f1d
fix: add security headers to Docker nginx config (#1244)
* Add security headers to nginx config

Increase the security of the nginx server and the served page, by adding the following security headers to the nginx config:
- X-Frame-Options (Disables click jacking by disallowing the page to be run in a frame/iframe)
- X-XSS-Protection (Enables cross site scripting filtering)
- X-Content-Type-Options (Disables MIME sniffing and forces browser to use the type given in Content-Type.)
- Content-Security-Policy (Controls resources the user agent is allowed to load for a given page.)
- Referrer-Policy (Governs which referrer information sent in the Referer header should be included with requests made.)

Additional headers that could be added optionally:
- Strict-Transport-Security (Enforce HTTPS over HTTP)
2020-05-14 10:33:09 +03:00
Roman Hotsiy
05e0a3f06b
chore(cli): redoc-cli@0.9.8 2020-05-10 22:25:34 +03:00
Roman Hotsiy
2c6e3b6595
chore: Release 2.0.0-rc.29 🔖 2020-05-10 22:12:16 +03:00
Roman Hotsiy
becc2f5856
fix: depreacate x-code-samples, rename to x-codeSamples for consistency 2020-05-10 22:11:01 +03:00
Roman Hotsiy
6e607b9a29
fix: do not crash on incompatible allOf, console.warn instead
fixes #1156
2020-05-10 21:59:53 +03:00
Roman Hotsiy
846065916d
fix: fix broken md headings with ampersand
fixes #1173
2020-05-10 21:56:37 +03:00
Roman Hotsiy
c88c41b9b5
chore: fix node typing issue
fixes #1233
2020-05-09 15:46:43 +03:00
Roman Hotsiy
b59faada82
fix: download button opens in new tab instead of downloading
fixes #1247
2020-05-09 14:54:13 +03:00
Roman Hotsiy
40a4e5fa47
chore: enable untrustedSpec in demo 2020-05-09 14:41:38 +03:00
Neel Kamath
63ec3d120c
Update README.md (#1130) 2020-05-09 14:32:27 +03:00
Zakary Kamal Ismail
10414fc6d5
feat(cli): add the --title option to the serve subcommand (#1160) 2020-05-09 14:31:54 +03:00
Peter
1c7fc1a261
demo: new URL for GraphHopper (#1165) 2020-05-09 14:31:25 +03:00
Roman Hotsiy
18dbd6270c
chore: Release 2.0.0-rc.28 🔖 2020-04-27 19:52:18 +03:00
Roman Hotsiy
62c01da420
fix: encode URLs in json samples linkify (xss)
thanks to @masatokinugawa
2020-04-27 19:47:32 +03:00
Roman Hotsiy
ffa216ea87
chore: Release 2.0.0-rc.27 🔖 2020-04-20 16:29:37 +03:00
Oleksiy Kachynskyy
57e93ec435
feat: add callbacks support (#1224)
Co-authored-by: Jonathan Bailey <jonathan_bailey@bose.com>
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2020-04-08 14:04:58 +03:00
Roman Hotsiy
5bd2e6227b
chore: Release 2.0.0-rc.26 🔖 2020-03-29 20:20:46 +03:00
Roman Hotsiy
3908a7c464
fix: crash to wrong spelling in localeCompare
fixes #1218
2020-03-29 20:19:25 +03:00
Roman Hotsiy
89054dae6c
chore: Release 2.0.0-rc.25 🔖 2020-03-27 19:01:18 +02:00
Roman Hotsiy
a0bd27c754
fix: improve names for some theme settings 2020-03-27 18:35:07 +02:00
Mohamed Zenadi
ac4f915494
fix: sort discriminator entries by mapping order (#1216)
* sort discriminator entries by mapping order

* fix string compare
2020-03-27 13:09:51 +02:00
Mohamed Zenadi
ea5b0aabf9
feat: add x-explicitMappingOnly extension (#1215) 2020-03-27 12:09:44 +02:00
Oleksiy Kachynskyy
830371b5d1
fix: do not collapse top level on Collapse All in json samples (#1209)
* fix: update collapseAll method
to avoid collapsing whole object/array

* fix: remove extra "slice()" call
2020-03-20 15:05:07 +02:00
GreenHedgehog
c6eaa0281b
fix: fix passing boolean value to showExtensions options (#1211)
Co-authored-by: Alef <aleksey.pavlov@corp.mail.ru>
2020-03-20 14:37:22 +02:00
Roman Hotsiy
afc7a95f13
docs: update usages examples 2020-03-17 16:46:43 +02:00
Roman Hotsiy
6ad9f72dcd
chore(cli): redoc-cli@0.9.7 2020-03-17 14:13:50 +02:00
Roman Hotsiy
e675f57e9a
chore(cli): update redoc 2020-03-17 14:13:06 +02:00
Roman Hotsiy
972dc373fd
chore: Release 2.0.0-rc.24 🔖 2020-03-17 14:01:21 +02:00
Roman Hotsiy
11377c903c
chore: fix ts error, use name but cannot be named 2020-03-17 13:41:55 +02:00
Roman Hotsiy
7ba3de2e28
chore: fix lint issues 2020-03-17 13:18:23 +02:00
Roman Hotsiy
54eb2a0dce
chore: prettier all 2020-03-17 12:01:32 +02:00
Roman Hotsiy
4ab2d0556d
chore: migrate tslint -> eslint 2020-03-17 11:52:33 +02:00
Roman Hotsiy
a24142b3fa
chore: migrate yarn -> npm 2020-03-17 11:06:03 +02:00
Roman Hotsiy
6fd6da0c37
chore: fix tslint and tests 2020-03-16 19:15:40 +02:00
Roman Hotsiy
641898ceca
chore: upgrade deps 2020-03-16 16:58:38 +02:00
Roman Hotsiy
8c053cc474
fix: fix major search performance due to wrong marker element
fixes #1109
2020-03-16 16:58:38 +02:00
Roman Hotsiy
7608800d0a
feat: new option expandSingleSchemaField 2020-03-16 16:58:28 +02:00
Faheem Abrar
373f018d0c
fix: Add debounce for 300 ms when searching (#1089)
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com>
2020-03-16 16:01:21 +02:00
Nick Oliver
af415e89e8
fix: do not load SearchWorker if disableSearch is true (#1191)
Blob URLs may be disabled by CORS (ex: #764) but should not block execution when the disableSearch option is true
2020-03-01 12:38:15 +08:00
Roman Hotsiy
c05db38576
chore(cli): redoc-cli@0.9.6 2020-02-09 21:19:27 +07:00
Roman Hotsiy
88f8d7475f
chore: Release 2.0.0-rc.23 🔖 2020-02-09 21:01:44 +07:00
Roman Hotsiy
1a2a7dd833
fix: fix broken sticky sidebar in Chrome 80
fixes #1167
2020-02-09 20:59:17 +07:00
Roman Hotsiy
4289eb0bee
chore: Release 2.0.0-rc.22 🔖 2020-01-15 23:08:12 +02:00
Roman Hotsiy
56ddce1b11
chore: minor perf optimizations 2020-01-15 23:05:51 +02:00
Roman Hotsiy
5248415791
fix: do not process oneOf if inherited from parent with discriminator 2020-01-14 22:53:45 +02:00
Kryštof Korb
27a4af7076 feat: add HTTP syntax highlighting (#1157) 2020-01-14 09:59:05 +02:00
Roman Hotsiy
1f05af52ff
chore(cli): redoc-cli@0.9.5 2020-01-10 17:27:04 +02:00
Roman Hotsiy
1967c25f31
chore(cli): update redoc 2020-01-10 17:26:48 +02:00
Roman Hotsiy
236822d2af
chore(cli): upgrade handlebars in yarn.lock 2020-01-10 17:04:53 +02:00
Roman Hotsiy
45c337b382
chore: Release 2.0.0-rc.21 🔖 2020-01-10 17:04:53 +02:00
Roman Hotsiy
1030e88aa3
tests: fix tests for empty servers 2020-01-10 17:04:13 +02:00
Roman Hotsiy
ca80b7ea57
chore: fix travis export vars 2020-01-10 16:28:10 +02:00
Roman Hotsiy
ed1db0c902
fix: empty servers behaviour per OAS spec
fixes #1151
2020-01-10 15:54:16 +02:00
Roman Hotsiy
a260c8414c
fix: fix duplicated content in tags when using md headings
fixes #1150, fixes #1152
2020-01-10 15:19:05 +02:00
Zakary Kamal Ismail
6d9a401b3b chore(cli): Lint and prettify cli/index.ts (#1074) 2020-01-10 14:29:09 +02:00
Anna Stasiuk
41a9b3c182 fix: use mobile menu background color value from theme (#1144) 2019-12-16 11:59:22 +02:00
Roman Hotsiy
284474322b
chore(cli): redoc-cli@0.9.4 2019-12-13 19:32:19 +02:00
Roman Hotsiy
fd581261f3
chore: Release 2.0.0-rc.20 🔖 2019-12-13 19:27:08 +02:00
Roman Hotsiy
942d782b5a
fix: fix missing parameters
fixes #1142
2019-12-13 19:25:31 +02:00
Roman Hotsiy
aa26d9c0c3
chore(cli): redoc-cli@0.9.3 2019-12-13 12:08:15 +02:00
Roman Hotsiy
91c6a118b6
chore: update npm token for travis deploy 2019-12-13 12:02:28 +02:00
Roman Hotsiy
32ce57712d
chore: Release 2.0.0-rc.19 🔖 2019-12-13 11:48:11 +02:00
Nan Yan
d92434d11b fix: fix sortByRequired (stabilise sort) (#1136)
fixes #1104
fixes #1121
fixes #1061
2019-12-13 11:34:41 +02:00
Roman Hotsiy
1bf490c05b
fix: search-box use theme 2019-12-13 11:29:12 +02:00
Roman Hotsiy
eaaa99d68e
feat: new option payloadSampleIdx 2019-12-12 19:12:50 +02:00
Roman Hotsiy
448b1b48c8
chore: refactor request samples 2019-12-12 18:37:47 +02:00
Roman Hotsiy
cbb9f50fa0
fix: remove implicit discriminator mapping when explicit is present 2019-12-12 18:05:37 +02:00
Roman Hotsiy
11cc4c4c3e
feat: new option hideSchemaTitles 2019-12-12 17:32:03 +02:00
Roman Hotsiy
4a25aaef69
fix: python comment stripped in headings
fixes #1116
2019-12-12 17:32:02 +02:00
Roman Hotsiy
7ed1a7ef0e
fix: h2 padding on mobile
fixes #1118
2019-12-12 17:32:02 +02:00
Roman Hotsiy
094ce914e3
fix: remove hardcoded fontFamily for oneOf labels
fixes #1120
2019-12-12 17:32:02 +02:00
Roman Hotsiy
6e390f9c79
fix: support discriminator mapping 1-n
fixes #1111
2019-12-12 17:32:02 +02:00
Roman Hotsiy
81a44a239a
chore: remove react-hot-loader from deps
fixes #1133
2019-12-12 17:32:02 +02:00
Roman Hotsiy
5d81abeb28
feat: enable menuToggle by default 2019-12-12 17:32:02 +02:00
Roman Hotsiy
4bb59d5d4d
chore: upgrade deps 2019-12-12 17:32:02 +02:00
Roman Hotsiy
6aeb0bf68d
fix: do not URI-encode parameter values for better readability
fixes #1138
2019-12-12 17:32:02 +02:00
Zakary Kamal Ismail
e01eea445c feat(cli): Fallback on the spec's title before falling back on… (#1073) 2019-12-12 17:31:08 +02:00
Chris Faulkner
42696a01ba doc: fix some typos (#1117) 2019-12-10 08:13:37 +02:00
Alex
76a8988a1b docs: fixed example slack api url (#1077) 2019-12-10 08:09:40 +02:00
torbenw
289c8e6ae1 fix: change the title of "Security Scheme Type" to match "HTTP Authorization Scheme" (#1126) 2019-12-10 08:04:42 +02:00
bwjohnson-ss
7cabd4b90d docs: fix link to x-nullable docs from README (#1135) 2019-12-10 08:03:46 +02:00
Dimitar Nanov
3e90133664 feat: display multipleOf constrains (#1065) 2019-12-08 11:54:07 +02:00
Andrii Tykhan
dc5430e53d fix: wrap json examples in code tag (#1064) 2019-10-22 16:37:32 +03:00
Roman Hotsiy
e82e98ebbb
hore: Release 2.0.0-rc.18 🔖 2019-10-16 17:25:02 +03:00
Roman Hotsiy
cd9fd61831
fix: add oneOf buttons vertical space when wrapped to new line 2019-10-16 17:21:32 +03:00
Roman Hotsiy
ce885f864a
fix: improve mime-type dropdown font 2019-10-16 17:19:42 +03:00
Roman Hotsiy
eac7bb8051
chore: Release 2.0.0-rc.17 🔖 2019-10-16 16:38:43 +03:00
Roman Hotsiy
0a01e9a080
fix: active menu item scroll into view 2019-10-16 16:07:42 +03:00
Andrew Zhukevych
0c20e64178 fix: changed several components style font-family to monospace (#1063)
fixes #909
2019-10-16 16:02:50 +03:00
russellrobinson
b5af71da5f fix: no quotes for default values in header fields. (#1059) 2019-10-16 16:01:54 +03:00
Alex
8bfa364010 docs: improve options documentation (#1071)
* Sort by name
* Document `hideSingleRequestSampleTab`
* End option description with `.`
2019-10-16 15:58:02 +03:00
Michael Huynh
4494f80dbc fix: types over-pluralization (#1057)
fixes #1053
2019-10-12 12:33:03 +03:00
Sergey Dubovyk
4adb927463 feat: added support for file paths as --options cli argument (#1049) 2019-10-12 12:30:41 +03:00
Anastasiya Mashoshyna
4d4cfd65aa docs: fix typo (#1062) 2019-10-12 12:24:03 +03:00
Roman Hotsiy
69c3dce883
chore(cli): redoc-cli@0.9.2 2019-09-30 14:53:07 +03:00
Roman Hotsiy
98a5139127
chore: Release 2.0.0-rc.16 🔖 2019-09-30 14:40:58 +03:00
Roman Hotsiy
d09c1c1086
fix: fix scrollYOffset when SSR 2019-09-30 14:39:58 +03:00
Roman Hotsiy
eb8d4fd678
chore(cli): redoc-cli@0.9.1 2019-09-30 13:57:05 +03:00
Roman Hotsiy
dd583b6a2e
chore(cli): update yarn.lock 2019-09-30 13:52:33 +03:00
Roman Hotsiy
4f63088638
chore(cli): redoc-cli v0.9.0 2019-09-30 13:34:27 +03:00
Roman Hotsiy
53962def82
chore: Release 2.0.0-rc.15 🔖 2019-09-30 13:33:18 +03:00
Roman Hotsiy
e318fb3381
fix: remove excessive whitespace between md sections on small screens
fixes #874
2019-09-30 13:10:35 +03:00
Roman Hotsiy
faa74d6002
fix: false-positive recursive detection with allOf at the same level 2019-09-30 12:56:09 +03:00
Roman Hotsiy
4649683785
fix: clicking on group title breaks first tag
fixes #1034
2019-09-30 12:56:09 +03:00
Roman Hotsiy
67e2a8fb79
fix: left menu item before group is not highligted
fixes #1033
2019-09-30 12:56:09 +03:00
Roman Hotsiy
5aa7784307
fix: auth section appears twice
fixes #818
2019-09-30 12:56:09 +03:00
Roman Hotsiy
e787d9e276
fix: do not crash on empty scopes
fixes #1044
2019-09-30 12:56:09 +03:00
Roman Hotsiy
9f0694c10f
docs: expandDefaultServerVariables 2019-09-30 12:56:09 +03:00
Sergey Dubovyk
2a28130c82 feat(cli): added support for JSON string value for --options CLI argument (#1047)
closes #797
2019-09-30 11:56:02 +02:00
Melvyn Sopacua
8632b193b2 refactor(cli): Update watching (#716)
- For now hardcode ignore JetBrain's "safe file changes".
- Show events for new files and directories
- Update spec on new files
2019-09-30 09:51:12 +02:00
Antherkiv
0360dcee5a feat: new option expandDefaultServerVariables (#1014)
Recover server expanding default variables

This reverts commit 7849f7f6b7.
2019-09-30 09:39:19 +02:00
Roman Hotsiy
f0c2181bd1
chore: upgrade deps 2019-09-30 10:34:49 +03:00
Roman Hotsiy
21258a5b61
fix: fix scrollYOffset when SSR 2019-09-30 10:31:18 +03:00
Peter Wessels
32a464aaa8 fix: use url-template dependency (#1008)
Fixes #1007
2019-09-30 09:12:26 +02:00
duxiaofeng
aceb3438f2 feat(cli): add disableGoogleFont parameter to cli (#1045) 2019-09-25 18:14:21 +02:00
Anthony Porthouse
350649d8b3 chore: correct typo of expolde to explode (#1009) 2019-09-25 18:11:53 +02:00
Quinn Blenkinsop
d74e2d6c46 docs: Add core-js as peer dependency in docs (#1018) 2019-08-20 10:12:27 +03:00
Roman Hotsiy
ffacdc09be
chore: setup simple unit-tests workflow 2019-08-19 09:35:21 +03:00
Roman Hotsiy
121bf640fa
chore: Release 2.0.0-rc.14 🔖 2019-08-07 12:34:11 +03:00
Roman Hotsiy
58cb20d4b2
fix: fix escaping JSON string values
fixes #999
2019-08-07 12:02:25 +03:00
Anya Stasiuk
7849f7f6b7 fix: revert expanding default server variables 2019-08-07 11:41:50 +03:00
Roman Hotsiy
3e18093e6f
chore(cli): redoc-cli v0.8.6
fixes #998
2019-08-01 12:06:39 +03:00
Roman Hotsiy
06a6d921f9
chore(cli): update redoc 2019-08-01 12:05:47 +03:00
Roman Hotsiy
574e512dc9
chore: Release 2.0.0-rc.13 🔖 2019-08-01 11:22:30 +03:00
Roman Hotsiy
1367380a88
fix: support json serialization for parameter examples
fixes #934
2019-08-01 11:20:44 +03:00
Roman Hotsiy
2afc2e4921
fix: unify accordion icons for responses section
fixes #975
2019-08-01 10:41:13 +03:00
Roman Hotsiy
9e3375d12d
fix: update to core.js 3
fixes #997
2019-08-01 10:35:32 +03:00
Roman Hotsiy
bfbb0c1787
fix: enum list doesn't wrap
fixes #993
2019-08-01 10:32:11 +03:00
Roman Hotsiy
aba45dbbe6
fix: incorrect serialization of some parameter samples
fixes #992
2019-08-01 10:31:41 +03:00
Roman Hotsiy
36ebbb1c89
chore: Release 2.0.0-rc.12 🔖 2019-07-30 19:54:14 +03:00
Roman Hotsiy
cb5c19781c
chore: add more exports 2019-07-30 19:53:47 +03:00
Roman Hotsiy
4496622438
fix: rename ObjectDescription to SchemaDefinition as discussed 2019-07-30 19:51:27 +03:00
Roman Hotsiy
173f7df55a
chore: Release 2.0.0-rc.11 🔖 2019-07-30 11:33:06 +03:00
Roman Hotsiy
70d1ee9edd
fix: do not add extra slashes to pattern
fixes #983
2019-07-30 10:54:40 +03:00
Roman Hotsiy
2f75aa3aed
chore: remove ci-publish as it was not working 2019-07-29 18:51:54 +03:00
Roman Hotsiy
d1ce306340
chore: update yarn.lock's 2019-07-29 18:49:01 +03:00
Roman Hotsiy
5d433fa1fb
chore(cli): update deps 2019-07-29 18:42:51 +03:00
Roman Hotsiy
12e7394ea3
chore: update deps 2019-07-29 18:41:57 +03:00
Roman Hotsiy
f7dd658a01
fix: incorrect serialization of parameter sample with hypen 2019-07-29 18:40:47 +03:00
Roman Hotsiy
299a59faad
feat: new option menuToggle - fold active MenuItem if clicked (#963)
update: fold active MenuItem if clicked
2019-07-29 17:33:58 +03:00
Roman Hotsiy
1504ade0e2
chore: add docs 2019-07-29 17:33:22 +03:00
Roman Hotsiy
bfd703d2da
Merge branch 'master' into update/toggleMenuItem 2019-07-29 17:30:26 +03:00
Roman Hotsiy
2588160d7c
chore: refactor 2019-07-29 17:29:32 +03:00
Roman Hotsiy
f7248135b1
fix(cli): Add missing content type header on compressed responses of / 2019-07-29 17:18:51 +03:00
Roman Hotsiy
ac41f0bde5
feat: menu items from tags + md extension for Schema Definition (#681)
* add section menus for tags and object description

* bundle and test

* add depth calculation

* add object descriptions to test

* enable operations spacing for operations as well

* bring back section rule, as this could be solved better

* update read/writeonly filter rule to be able to filter both

* add showReadOnly and showWriteOnly options to object-description

* update demo to show use cases

* remove forgotten console.log

* adjust demo test with newly added items

* do the right match with the menu items :/

* chore: refactor + jsxify md tags

* chore: simplify demo spec

* fix: dropdown fixes related to object description
2019-07-29 17:17:16 +03:00
Roman Hotsiy
9bf45d810e
chore: rename ObjectDescription to SchemaDefinition 2019-07-29 17:14:39 +03:00
Roman Hotsiy
e4c3af6549
chore: fix addons in .travis.yml 2019-07-29 16:58:51 +03:00
Roman Hotsiy
6c48372aeb
chore: update travis config 2019-07-29 15:54:55 +03:00
Roman Hotsiy
a282b92024
chore: temporary disable bundlesize in Travis 2019-07-29 15:39:33 +03:00
Aleksandr Karo
d3f1c1677c feat: add sampleCollapseLevel option (#937)
* feat: add sampleCollapseLevel option

* fix: rename sampleCollapseLevel option to jsonSampleExpandLevel
Change README.md description

* fix: provide maxCollapseLevel option via argument

* fix: rename normalizer function and some vars
2019-07-29 15:26:16 +03:00
Roman Hotsiy
0504ad4b76
fix: dropdown fixes related to object description 2019-07-29 15:14:39 +03:00
Roman Hotsiy
7c06735c6d
chore: fix test 2019-07-29 14:39:21 +03:00
Roman Hotsiy
7883fad333
chore: simplify demo spec 2019-07-29 13:19:22 +03:00
Roman Hotsiy
00a0abf4a4
chore: refactor + jsxify md tags 2019-07-29 13:19:22 +03:00
Dimitar Nanov
8c27d31396
do the right match with the menu items :/ 2019-07-29 13:19:21 +03:00
Dimitar Nanov
e4d8fa23d7
adjust demo test with newly added items 2019-07-29 13:19:21 +03:00
Dimitar Nanov
413e1fad5b
remove forgotten console.log 2019-07-29 13:19:21 +03:00
Dimitar Nanov
51b5d04fcc
update demo to show use cases 2019-07-29 13:19:21 +03:00
Dimitar Nanov
6935b16964
add showReadOnly and showWriteOnly options to object-description 2019-07-29 13:19:21 +03:00
Dimitar Nanov
a8f70377ab
update read/writeonly filter rule to be able to filter both 2019-07-29 13:19:21 +03:00
Dimitar Nanov
5addc21cd8
bring back section rule, as this could be solved better 2019-07-29 13:19:21 +03:00
Dimitar Nanov
2f34b8ebaf
enable operations spacing for operations as well 2019-07-29 13:19:21 +03:00
Dimitar Nanov
e9f8bdb10c
add object descriptions to test 2019-07-29 13:19:21 +03:00
Dimitar Nanov
92ada2b895
add depth calculation 2019-07-29 13:19:21 +03:00
Dimitar Nanov
ffb70d2db2
bundle and test 2019-07-29 13:18:51 +03:00
Dimitar Nanov
4359724434
add section menus for tags and object description 2019-07-29 13:17:59 +03:00
Anna Stasiuk
7db7d4fc91 chore: refactor expandServerVariables function (#978) 2019-07-29 13:08:17 +03:00
Anna Stasiuk
afc7e36cf8 feat: Add option for skipping quotes in enums enumSkipQuotes (#968)
* feat: add option for skipping enum quotes
* chore: move enumSkipQuotes
2019-07-15 11:14:48 +03:00
leoliu
2f80394e3c add an option for menu toggle 2019-07-11 17:25:13 +08:00
Roman Hotsiy
7219344f2f
chore(cli): redoc-cli v0.8.5 2019-07-08 08:50:23 +03:00
Roman Hotsiy
685febb116
chore(cli): update deps 2019-07-08 08:50:05 +03:00
Roman Hotsiy
6dc54e9344
chore(cli): bump redoc 2019-07-08 08:44:11 +03:00
Roman Hotsiy
f2210fd86f
chore: Release 2.0.0-rc.10 🔖 2019-07-08 08:31:50 +03:00
Roman Hotsiy
12b7057055
fix: fix fields table overflow if deeply nested with long title 2019-07-08 08:30:04 +03:00
Roman Hotsiy
45c0c23c73
chore: prettier all 2019-07-07 23:34:09 +03:00
Roman Hotsiy
84e03e2d07
chore: prettier + export 2019-07-07 23:33:46 +03:00
Roman Hotsiy
f52d9e875b fix: markdown in examples descriptions + minor ui tweaks 2019-07-07 21:28:19 +03:00
Anya Stasiuk
995e557d6d fix: organize response examples in dropdown and display description 2019-07-07 21:28:19 +03:00
Roman Hotsiy
51d3b9b02b
fix: broken headings with single quote
fixes #955
2019-07-07 21:26:29 +03:00
Roman Hotsiy
4bd499f0e9
fix: hide empty example when it is not defined 2019-07-07 19:43:31 +03:00
leoliu
65ccebd9e2 update: collapse active MenuItem if clicked 2019-07-04 11:41:31 +08:00
Andrew Berry
c99d9f6983
Add missing content type header on compressed responses of / 2019-06-28 10:02:05 -04:00
Roman Hotsiy
027d83a88f
chore: Release 2.0.0-rc.9 🔖 2019-06-27 15:53:53 +03:00
Roman Hotsiy
5270737a98
chore: add core-js as peer-dep
fixes #814
2019-06-20 19:08:51 +03:00
Mathias Schreck
39392869f4 fix: serialize parameter example values according to the spec (#917) 2019-06-20 16:44:02 +03:00
Roman Hotsiy
888f04e872
fix: IE11, add missing Object.assign polyfill 2019-06-20 10:49:14 +03:00
David Beacham
0eb1e66a10 feat: add x-additionalPropertiesName (#622) (#944)
* Add x-additionalPropertiesName (#622)

Supply custom name to be displayed for property name of
`additionalProperties`.

* Include prettier output for Schema.ts
2019-06-18 11:41:48 +03:00
zhzxang
c488bbf305 fix: styled-component style error in tabs (#946) 2019-06-18 11:39:38 +03:00
Roman Hotsiy
753b013eee
chore: fix stars iframe after repo transfer 2019-06-04 16:02:16 +03:00
Roman Hotsiy
fca6527af9
chore: fix deps security alerts 2019-06-04 15:51:38 +03:00
Roman Hotsiy
d78029a04e
chore: move repo to Redocly org 2019-06-04 15:47:22 +03:00
Sander van de Graaf
18590ccc60 docs: Fixed typo (#921)
[ci skip]
2019-05-22 09:37:42 +03:00
Roman Hotsiy
f29a4fe2ee
fix: fix regression double slashes added to full URL display 2019-05-13 23:23:37 +03:00
Roman Hotsiy
672ef56507
chore: cli version bump 2019-05-13 15:52:56 +03:00
Roman Hotsiy
4d8cba1a52
chore: Release 2.0.0-rc.8-1 2019-05-13 15:51:20 +03:00
Roman Hotsiy
3d52b39274
fix: crash with empty servers with redoc-cli 2019-05-13 15:49:54 +03:00
Roman Hotsiy
3ae62f1d5d
chore: Release 2.0.0-rc.8 🔖 2019-05-13 13:09:14 +03:00
Roman Hotsiy
4e12b5dbd6
fix: fix broken CLI again 2019-05-13 13:08:26 +03:00
Roman Hotsiy
81896d32b8
fix: fix logo gutter bg 2019-05-13 12:18:15 +03:00
Roman Hotsiy
4c59628e14
fix: fix logo gutter bg 2019-05-13 12:16:54 +03:00
Roman Hotsiy
8922690d0f
chore: Release 2.0.0-rc.7 🔖 2019-05-13 12:09:13 +03:00
Roman Hotsiy
8df2b97a66
fix: crash in node due to broken URL parsing 2019-05-13 12:07:31 +03:00
Roman Hotsiy
3f6765078e
chore: fix react keys warning 2019-05-13 12:06:26 +03:00
Roman Hotsiy
845511ce9a
chore: Release 2.0.0-rc.6 🔖 2019-05-13 09:52:46 +03:00
Roman Hotsiy
2491d970de
fix: deep linking sometimes not working when sent over messengers 2019-05-13 09:51:58 +03:00
Roman Hotsiy
3a74b745b1
fix: broken schema talbes with long enums 2019-05-13 09:50:51 +03:00
Roman Hotsiy
c210ae4d5d
chore: Release 2.0.0-rc.5 🔖 2019-05-13 08:59:43 +03:00
Roman Hotsiy
a3d7d7a32c
fix: discriminator and oneOf title fix 2019-05-13 00:31:41 +03:00
Roman Hotsiy
301ca225ff
docs: add note about IE11 support when using as React component
resolves #809
2019-05-13 00:07:43 +03:00
Roman Hotsiy
d2ce1bd928
fix: IE11 add missing fetch and URL polyfills
fixes #875
2019-05-13 00:07:26 +03:00
Roman Hotsiy
7d7b4e3fb8
fix: incorrect detected schema title for deeply inherited schemas 2019-05-12 23:18:17 +03:00
Roman Hotsiy
b0e660eca0
feat: basic UI labels configuration
This can be used for translations later
2019-05-12 23:18:17 +03:00
Roman Hotsiy
fdcac30829
fix: pluralize arrray of types 2019-05-12 23:17:26 +03:00
Roman Hotsiy
5c187f34c9
fix: remove tabs top margin 2019-05-12 23:17:26 +03:00
Roman Hotsiy
6de3523eb0
chore: fix bundle after oas-kit update 2019-05-12 23:17:26 +03:00
Roman Hotsiy
5297fdf01a
chore: minor refactor of example values 2019-05-12 23:17:26 +03:00
Roman Hotsiy
4550e4d61f
feat: add hideSingleRequestSampleTab option 2019-05-12 23:17:26 +03:00
Roman Hotsiy
de2aed21e7
fix: right panel code samples bg color 2019-05-12 23:17:26 +03:00
Cédric Fabianski
35df477388 fix: update apiKey in to be titleize (#902) 2019-05-12 22:34:10 +03:00
Anto
64453ff6cd fix: remove query string from server URL (#895) 2019-05-12 22:10:49 +03:00
Jon Nicholson
5c915906c8 fix: clean up field values display (#855) 2019-05-12 22:07:50 +03:00
Kris Kalavantavanich
5dd5d6d704 feat: add lineHeight config for headings (#894) 2019-04-19 11:31:50 +03:00
Anya Stasiuk
82c0cb1a3c add logo gutter 2019-04-08 17:42:30 +03:00
davchen51
649940bfe5 docs: add additional property to theme usage doc (#876) 2019-03-31 11:08:33 +03:00
Roman Hotsiy
65930ad7ee
fix: encode x-www-form-urlencoded examples correctly
fixes #870
2019-03-28 10:41:20 +02:00
Roman Hotsiy
5af6ba7191
chore: add simple parameter to playground to simplify local testing 2019-03-28 10:39:41 +02:00
Cédric Bertolini
851b1337cb fix: change fontFamily for EndpointInfo (#866) 2019-03-27 22:16:11 +02:00
Roman Hotsiy
548fae3cbc
fix: remove huge space after Authentication section
fixes #872
2019-03-27 12:35:48 +02:00
Anton Komarev
4366a0d122 fix: ignore empty x-tagGroups array (#869) 2019-03-27 09:19:24 +02:00
Patrick Rodacker
2f65f051e0 chore: fixes typo in error message for detecting a circular dependency in theme.ts (#852) 2019-03-18 09:08:44 +02:00
Roman Hotsiy
dc77d8f25e
chore: minor refactor 2019-03-15 17:20:20 +02:00
Jon Nicholson
b21cd3d366 fix: tidy up non-redoc vendor extension presentation (#847) 2019-03-15 17:15:06 +02:00
Roman Hotsiy
26f6b3d5c9
chore(cli): redoc-cli v0.8.3 2019-03-15 17:10:31 +02:00
Roman Hotsiy
6c79901a25
fix(cli): add node-libs-browser to the deps
fixes #850
2019-03-15 17:09:40 +02:00
Roman Hotsiy
7331cc8149
chore(cli): redoc-cli v0.8.2 2019-03-15 16:24:07 +02:00
Roman Hotsiy
81a756864d
fix: fix redoc-cli broken dependencies 2019-03-15 16:23:18 +02:00
Roman Hotsiy
0dab8afe01
chore: Release 2.0.0-rc.4 🔖 2019-03-15 12:10:25 +02:00
tomjankes
56ca3716b3 feat: display requestBody description #833 (#838) 2019-03-15 12:09:07 +02:00
Roman Hotsiy
ed9b878efe
fix: move swagger2openapi to deps because of missing transitive deps 2019-03-15 12:03:47 +02:00
Roman Hotsiy
a541b08a91
chore(cli): redoc-cli v0.8.0 2019-03-15 11:40:41 +02:00
Roman Hotsiy
6b152c67ef
chore: update peerDeps before release 2019-03-15 11:37:54 +02:00
Roman Hotsiy
75459bd4fa
chore: Release 2.0.0-rc.3 🔖 2019-03-15 11:33:47 +02:00
Roman Hotsiy
d81b63147c
fix: add extra deref step for anyOf/oneOf variants
fixes #810
2019-03-15 11:22:39 +02:00
Pete Nykänen
869a91ae4d chore: Remove duplicate re-export from index.ts (#842) 2019-03-15 09:07:39 +02:00
Roman Hotsiy
178ff4c365
fix: pin lunr version in ReDoc
fixes #844
2019-03-14 08:19:51 +02:00
Roman Hotsiy
f31cf3534c
chore: fix cli declarations 2019-03-11 17:58:23 +02:00
Roman Hotsiy
2cdfcd25cd
feat: support externalValue for examples
implements #551, related to #840
2019-03-11 17:14:14 +02:00
Roman Hotsiy
309901bd31
chore: update deps 2019-03-11 17:14:14 +02:00
Julian
2013973d75 docs: Fixed docker README, added missing redocly repo name (#841) 2019-03-11 09:32:55 +02:00
unarist
70faca17b6 fix: escape backslashes in string literals (#823)
Follow up for #822 and 04731656 (only escape quotes).
2019-02-26 11:31:42 +02:00
Roman Hotsiy
3ce5bff438
fix: duplicate keys in request samples
fixes #815
2019-02-26 10:41:52 +02:00
Roman Hotsiy
4dd79cd840
fix: set last section min-height
fixes #820
2019-02-26 10:41:52 +02:00
Roman Hotsiy
04731656db
fix: escape quotes in string values
fixes #882
2019-02-26 10:41:52 +02:00
Sergio Regueira
3659a75020 chore: Group documentation of x-traitTag extension (#802) 2019-02-26 08:58:18 +01:00
Roman Hotsiy
12cfb6ebde
chore: update styled components peer dep
closes #801
2019-01-31 19:25:06 +08:00
Roman Hotsiy
c366cf434f
chore: update mobx peer dependency version
fixes #741
2019-01-31 09:55:46 +08:00
Siarhei Bautrukevich
4e8ee0305d feat(cli): Add templateOptions param to pass additional data to custom template (#792)
* Add templateOptions param to pass additional data to custom template
* Update README for ReDoc cli
2019-01-31 09:51:44 +08:00
Roman Hotsiy
889cbe3f79
chore: Release 2.0.0-rc.2 🔖 2019-01-27 20:13:46 +07:00
Roman Hotsiy
d197c0feda
fix: make syntax highlighting for md js code blocks same as for payload samples 2019-01-23 20:11:32 +07:00
Roman Hotsiy
007752dfc4
fix: make padding for md code blocks and code samples consistent 2019-01-23 19:55:14 +07:00
Roman Hotsiy
801fea0474
chore: remove info.version validation 2019-01-17 18:43:02 +02:00
Roman Hotsiy
8c9e3bdbe4
chore: fix lint issue 2019-01-17 17:32:47 +02:00
Patrick Niklaus
fb3cb3627b fix: Only display API version if present (#773)
* Only display API version if present
* Warn if `info.version` is omitted, error if `info` is missing.
2019-01-17 17:24:05 +02:00
Roman Hotsiy
c343db694e
chore(cli): redoc-cli v0.7.1 2019-01-17 16:14:57 +02:00
Roman Hotsiy
206d43edb8
chore(cli): Update redoc in cli 2019-01-17 16:14:29 +02:00
Roman Hotsiy
c16d3d5a91
v2.0.0-rc.1 🔖 2019-01-17 13:21:31 +02:00
Roman Hotsiy
fa39ce4eef
fix: make example/defaults badge consistent with code blocks 2019-01-17 13:19:17 +02:00
Roman Hotsiy
c7436f2cee
fix: pattern constrain spacing 2019-01-17 12:54:59 +02:00
Roman Hotsiy
c04f387378
fix: sidebar navigation issues when scrollYOffset is float number
fixes #748
2019-01-17 12:20:22 +02:00
Luigi Pinca
02f6e1820b chore: update marked to version 0.6.0 (#768)
The new release includes https://github.com/markedjs/marked/pull/1383.
2019-01-17 12:06:35 +02:00
lrobledo
a419303612 docs: fix typos in redoc-vendor-extensions.md (#782)
[ci skip]
2019-01-10 17:28:21 +02:00
DeBr0glie
1bbb0fe679 docker: Incorrect port after restart when PORT is 8080 (#776)
When PORT is 8080 and dokcer restart, nginx will listen 80808080
2019-01-10 10:06:51 +02:00
Alex Scammon
30cbba3f6f docs: Fix the demo specUrl (#778) 2019-01-10 10:03:41 +02:00
Sebastián Ramírez
ab943a8dd5 docs: Add FastAPI to real-life usages in README (#756) 2018-12-24 11:25:31 +02:00
Patrick Elam
a1aa49a322 docs: fix link to OpenAPI specification in vendor extensions doc (#750) 2018-12-17 23:07:33 +02:00
neumond
cfb6f0fde0 fix: allow docker container serving under non-root URLs (#731)
fixes #730
2018-12-11 15:27:12 +02:00
SoftBrix
809e7f2841 chore: updated marked to 0.5.2 (#734)
Updated version for the marked dependency to an official release.
2018-12-06 15:35:04 +02:00
Matthias Mohr
523dbdc38f docs: fix typo in README (#735) 2018-12-06 15:17:57 +02:00
Patrick Elam
4f60ec85aa docs: fixed links to oas spec page (#728) 2018-11-30 10:09:40 +02:00
Roman Hotsiy
a47a4b83c3
chore: Release 2.0.0-rc.0 🔖 2018-11-27 14:41:54 +02:00
Roman Hotsiy
25dc775443
chore: fix ts declarations 2018-11-27 13:32:12 +02:00
Roman Hotsiy
0525d2de8b
chore: update cli deps 2018-11-27 13:31:52 +02:00
Roman Hotsiy
59eaa8d633
fix: false-positive recursive detection with oneOf
fixes #723, fixes #585
2018-11-27 12:54:52 +02:00
Roman Hotsiy
e2d0cd5b18
fix: theme improvments by @stasiukanya
squashed commit of the following:

commit 6b07dc7fa0
Author: Anya Stasiuk <stasiukanya@gmail.com>
Date:   Wed Nov 7 15:18:26 2018 +0200

    theme fixes
2018-11-27 12:07:52 +02:00
Roman Hotsiy
f2f6909835
fix: fix spacing with nested markdown lists
fixes #718
2018-11-27 11:47:34 +02:00
Roman Hotsiy
155d214509
feat: add support for markdown in Server Object 2018-11-27 11:43:31 +02:00
Roman Hotsiy
3673720497
fix: nested oneOf button spacing
fixes #719
2018-11-27 11:36:07 +02:00
Roman Hotsiy
27d195ef38
chore: update styled components typings 2018-11-27 11:28:13 +02:00
Roman Hotsiy
af3eee1f52
chore: update dev deps 2018-11-27 11:27:36 +02:00
TATSUNO Yasuhiro
87fd7d7fdd feat: Add feature to specify href for logo explicitly (#645)
Closes https://github.com/Rebilly/ReDoc/issues/627
2018-11-27 11:27:10 +02:00
Dave Oram
5e6f6fff03 Feature/dockerize redoc cli (#614)
* Docker container to run redoc-cli

* Dockerfile to package the 'redoc-cli' tool as a docker image

* Revert "Dockerfile to package the 'redoc-cli' tool as a docker image"

This reverts commit fec72ac0ea.

* Dockerfile to package the 'redoc-cli' tool as a docker image

* Fixed with help from RomanGotsiy  & xxxcoltxxx
2018-11-27 09:36:06 +02:00
mknoszlig
4691d78dc0 docs: fix link to Dockerfile. (#710)
[ci skip]
2018-11-14 14:37:14 +02:00
Roman Hotsiy
ebe8d3f68c
chore: use docker build hook to use Dockerfile from other location
[ci skip]
2018-11-06 16:56:56 +02:00
Roman Hotsiy
07b5e62897
chore: move Dockerfile to config/docker 2018-11-06 15:30:04 +02:00
Roman Hotsiy
ea5029b52d
chore: optimize docker build 2018-11-06 15:24:12 +02:00
Roman Hotsiy
e77df0ca07
fix: onLoaded callback not run on spec error
fixes #690
2018-11-06 14:09:10 +02:00
Roman Hotsiy
bba40cd34a
Merge 'mes3fork/watch-backend' 2018-11-06 11:00:12 +02:00
Robert DeRose
5c9f488656 docs: corrected Docker Port in README.md (#691)
The command to launch ReDoc with Docker had the `-p` values reversed.
According to the Docker Docs, it should be `HOST_PORT:CLIENT_PORT`.
The Nginx service is running on port 80 inside the container, 8080 is the 
port exposed on the host.
2018-11-05 16:44:44 +02:00
lscholten
f40568b79e feat: Add support for minLength and maxLength constraint humanization (#700)
According to #42 , `minItems` and `maxItems` are not yet rendered in the documentation.
This pull request shows the humazined form of `minItems` and `maxItems` next to the type description.
The [suggestion of fgabolde](https://github.com/Rebilly/ReDoc/issues/42#issuecomment-371883853) is followed and "characters" is simply replaced with "items".

![image](https://user-images.githubusercontent.com/1814807/47999845-0a13f900-e104-11e8-9ddc-adab701ec0bb.png)

Some examples are added to the demo.
2018-11-05 16:14:57 +02:00
Roman Hotsiy
b5f32247be
fix: fix hideHostname also hiding basePath
fixes #677
2018-11-05 15:57:01 +02:00
Roman Hotsiy
a69c402d9b
fix: improve scrolling performance in Chrome with non-wrapped json examples 2018-11-05 15:57:01 +02:00
Marius Rumpf
9e2853c2fd fix(cli): old peer dependency issue with styled-components (#699) 2018-11-05 12:38:57 +02:00
Melvyn Sopacua
df43cfbe64 refactor(cli): Use chokidar for watching
Caveat: could not get this to work with a debounce.
Fixes: recursive file watching on Linux (and thus Docker).
2018-11-03 17:03:59 +01:00
Petr Flaks
97db54aa2e docs: Add information to README about Docker image & Docker Hub (#676)
closes #657
2018-10-18 18:27:31 +03:00
Roman Hotsiy
a6652542f3
chore: Release 2.0.0-alpha.41 🔖 2018-10-18 14:35:46 +03:00
Roman Hotsiy
9a238e75eb
chore: fix lint issue 2018-10-18 14:19:30 +03:00
William Boman
6b7c5b7df3 fix: add null check in dispose method (#675) 2018-10-18 14:12:14 +03:00
Roman Hotsiy
7df471b69d
chore: fix cli ts compiling 2018-10-18 14:10:32 +03:00
Roman Hotsiy
ef520eacfa
chore: upgrade to styled-components@4 2018-10-18 12:14:40 +03:00
Roman Hotsiy
00846e1f55
chore: update dev deps 2018-10-18 11:27:28 +03:00
Roman Hotsiy
70cf29328e
fix: fix issue with broken markdown caused by marked bug 2018-10-18 10:46:13 +03:00
Roman Hotsiy
477c01a9de
chore: fix benchmark crashing 2018-10-18 10:40:26 +03:00
Roman Hotsiy
a4a40135ec
fix: extensionHook not being used
fixes #665
2018-10-08 11:54:09 +03:00
Roman Hotsiy
14acab32b2
chore: minor refactor 2018-10-05 16:48:08 +03:00
Roman Hotsiy
8f7fccc657
chore: Release 2.0.0-alpha.40 🔖 2018-10-05 16:26:17 +03:00
TATSUNO Yasuhiro
10bca66dce feat: New option onlyRequiredInSamples (#646)
* Add onlyRequiredInSamples option that let user to show only required fields in Request samples.
2018-10-05 16:14:40 +03:00
Roman Hotsiy
fbcec82275
fix: minor media print improvements 2018-10-05 15:57:12 +03:00
Roman Hotsiy
393681b99e
feat: turn off code-blocks wrapping
Can enable using `typography.code.wrap` theme option, fixes #658
2018-10-05 15:10:53 +03:00
Roman Hotsiy
f39fc98eab
fix: fix panel paddings on small screens 2018-10-05 10:54:15 +03:00
Roman Hotsiy
974bc7ddb0
fix: remove extra-padding caused by empty group sections 2018-10-05 10:49:46 +03:00
Roman Hotsiy
505463f5ab
feat: new theme options spacing-> sectionHorizontal and sectionVertical 2018-10-05 10:49:23 +03:00
Roman Hotsiy
56ad8443b7
docs: add note about peerDependencies
closes #662
2018-10-04 11:15:55 +03:00
Roman Hotsiy
b87cf0d8d5
feat: new option sortPropsAlphabetically 2018-10-04 11:10:37 +03:00
Roman Hotsiy
5924cd7ea2
chore: refactor components parsing in markdown 2018-10-04 10:49:43 +03:00
Roman Hotsiy
aeda21bcd5
chore: upgrade marked to 0.5.1 2018-10-04 10:48:37 +03:00
Roman Hotsiy
3c8d6b623c
chore: fix lint issue + update readme 2018-10-03 11:02:13 +03:00
Ingo Claro
e9610e92d4 feet: add the option to render vendor extensions (#552)
* add the option to render vendor extensions

* refactor Extensions, move Redoc extension list to utils file

* feat: new option showExtensions (support list of extensions)
2018-10-03 10:02:30 +03:00
Roman Hotsiy
fe3383d1a3
fix: allOf inside oneOf overwritten and not rendered
fixes #660
2018-10-01 10:19:26 +03:00
Roman Hotsiy
533733bc7f
chore(cli): redoc-cli v0.6.4 2018-09-28 17:10:51 +03:00
Roman Hotsiy
4ab97c1316
chore(cli): redoc-cli v0.6.3 2018-09-28 16:53:26 +03:00
Roman Hotsiy
2d63fa0ba0
fix(cli): add styled-components to dependencies 2018-09-28 16:52:20 +03:00
Roman Hotsiy
d0c38cd158
chore: inconsistent local and travis, Revert "tests: add basic screenshot test for schema view"
This reverts commit 10ab7dabc0.
2018-09-28 16:49:34 +03:00
Roman Hotsiy
355764dcd4
fix: server overriding didn't work on Path Item object
fixes #656
2018-09-27 18:21:24 +03:00
Roman Hotsiy
10ab7dabc0
tests: add basic screenshot test for schema view 2018-09-27 11:31:08 +03:00
Roman Hotsiy
955be200b8
chore: do not emit declarations for demo build 2018-09-19 10:08:24 +03:00
Roman Hotsiy
5a192dbf74
chore: fix demo on IE
closes #647
2018-09-19 09:59:14 +03:00
Roman Hotsiy
ab98ab0cb2
chore: Release 2.0.0-alpha.39 🔖 2018-09-14 09:59:52 +03:00
Roman Hotsiy
cd981117b0
chore: move styled-components to peerDependencies
fixes #626
2018-09-14 09:58:05 +03:00
Roman Hotsiy
cb79271ae4
chore: render section instead of throw 2018-09-14 09:55:02 +03:00
Roman Hotsiy
cbc9eab00a
chore: minor fix after dense->compact rename 2018-09-10 18:41:36 +03:00
Matthias Mohr
893c83ed07 feat: externalDocumentation rendered for tags, operations and schema fields (#595)
The externalDocs were missing for tags, schemata and operations. Added them with this pull requests. Solves #550.

Additionally, fixes that the URL in External Documentation Object was specified to be optional, which is not correct according to OpenAPI spec.
2018-09-10 18:23:17 +03:00
Fredrik Lengstrand
4b3b5ba974 fix: Increase badge size slightly so that "PATCH" method fits inside (#632) 2018-09-05 09:44:47 +03:00
Roman Hotsiy
822d038190
chore(cli): redoc-cli v0.6.2 2018-08-24 17:35:28 +03:00
Sérgio Ramos
82a038bf61 chore(cli): update cli dependencies (#620) 2018-08-24 17:34:34 +03:00
Roman Hotsiy
f7acc7bb8d
chore: Release 2.0.0-alpha.38 🔖 2018-08-24 13:22:39 +03:00
Roman Hotsiy
0dd1c800c1
chore: update deps + fix deprecation warnings 2018-08-24 12:27:53 +03:00
Roman Hotsiy
81c0df092a
chore: add tests for one of titles 2018-08-24 12:27:53 +03:00
Roman Hotsiy
865f3ced4b
fix: addd indent to array schema internals 2018-08-24 12:27:53 +03:00
Roman Hotsiy
39b930d0ee
fix: fix oneOf/anyOf titles
fixes #618, #621
2018-08-24 12:27:53 +03:00
kmbenitez
a5f9f6b2cc chore: Update readme color customization example (#619)
[ci skip]
2018-08-23 18:58:13 +03:00
Roman Hotsiy
f958571c0a
chore: Release 2.0.0-alpha.37 🔖 2018-08-22 13:23:36 +03:00
Roman Hotsiy
1ba8a4cf7b
chore: remove class active from group items + fix e2e tests 2018-08-22 13:22:58 +03:00
Roman Hotsiy
c8b7eed7f0
chore: add sql-syntax for prism.js 2018-08-22 12:47:35 +03:00
Roman Hotsiy
720e28284c
fix: do not inherit title in allOf
fixes #601
2018-08-22 12:27:13 +03:00
Roman Hotsiy
fb212128f9
fix: fix crash on empty media object
fixes #608
2018-08-22 12:25:02 +03:00
Roman Hotsiy
5d84bd4656
fix: make http badges font-based instead of inline png 2018-08-19 16:50:15 +03:00
Roman Hotsiy
a87440113b
chore: downgrade ts-jest due to broken coverage 2018-08-18 16:31:26 +03:00
Roman Hotsiy
528b8fbebc
chore: prettier all 2018-08-18 16:23:33 +03:00
Roman Hotsiy
93e844c3d0
chore: update babel to latest rc 2018-08-18 16:21:32 +03:00
Roman Hotsiy
0292b77d51
chore: downgrade marked 2018-08-17 17:26:20 +03:00
Roman Hotsiy
3ccc9c4ea6
chore: update to typescript@3 2018-08-17 16:57:32 +03:00
Roman Hotsiy
b9c1b49810
chore: minor fixes after refactor 2018-08-17 15:01:18 +03:00
Roman Hotsiy
43a22f5531
chore: refactor links 2018-08-17 14:54:28 +03:00
Roman Hotsiy
cfddb3afe1
chore: refactor HistoryService 2018-08-17 14:50:58 +03:00
Roman Hotsiy
d3d35189f5
chore: refactor, move allowedMdComponents to options 2018-08-17 14:41:22 +03:00
Roman Hotsiy
f903406c14
fix: use correct parent section for security definition 2018-08-17 14:20:02 +03:00
Roman Hotsiy
4ef4a971ce
chore: unify parsing components in md 2018-08-16 12:37:39 +03:00
Roman Hotsiy
0cf7191144
chore: various small refactorings 2018-08-16 12:36:51 +03:00
Roman Hotsiy
eae11682b8
chore: sections/markdown refactor 2018-08-16 09:56:47 +03:00
Roman Hotsiy
e0d82f4aa8
chore: Release 2.0.0-alpha.36 🔖 2018-08-11 23:16:11 +03:00
Roman Hotsiy
8218a2694d
fix: broken rendering of code blocks with language in markdown 2018-08-11 23:15:05 +03:00
Roman Hotsiy
e660517a2a
fix: broken rendering of headings with regexp characters 2018-08-11 23:14:09 +03:00
Roman Hotsiy
ec8f6dc09e
chore: Release 2.0.0-alpha.35 🔖 2018-08-09 08:54:24 +03:00
Roman Hotsiy
d13fe13eb8
fix: fix auth requirements font size 2018-08-09 08:53:35 +03:00
Roman Hotsiy
58ae668f64
fix: crash on any backticks code block without lang specified 2018-08-09 08:44:01 +03:00
Roman Hotsiy
fc31145b24
chore: Release 2.0.0-alpha.34 🔖 2018-08-08 12:09:29 +03:00
Roman Hotsiy
334f9047a8
fix: download button downloads index.html instead of spec with CLI
fixes #594
2018-08-08 12:03:55 +03:00
Roman Hotsiy
23559fbece
fix: preserve md heading level in description 2018-08-08 11:42:07 +03:00
Roman Hotsiy
97e16208d5
fix: schemes without type: object are not expandable
fixes #599
2018-08-08 11:41:53 +03:00
Roman Hotsiy
597688e720
fix: add some spacing between operation description and parameters 2018-08-07 18:08:43 +03:00
Roman Hotsiy
9e69eedea0
chore: fix lint issues in tests 2018-08-07 18:08:43 +03:00
Roman Hotsiy
90ed717bb5
fix: description is not rendered if doesn't containt markdown headings
fixes #591
2018-08-07 18:08:43 +03:00
Roman Hotsiy
2ecc8bc58e
fix: fix Authentication section is not rendered
fixes #590
2018-08-07 18:08:43 +03:00
Roman Hotsiy
8fb9cd6bac
fix: fix linebreaks in multiparagraph field descriptions 2018-08-07 18:08:43 +03:00
Matthias Mohr
f70ac081fe fix: render additionalProperties set to true (#597)
fixes #596
2018-08-07 13:02:39 +03:00
Sheila Kelly
568ce74077 feat: Add x-logo alt text support (#584)
Fixes #546
2018-08-02 15:27:38 +03:00
Tim Hordern
7d7b405116 chore: Fix minor spelling errors in vendor extensions docs (#589) 2018-08-02 11:20:24 +03:00
Roman Hotsiy
00bd966797
feat: support label for x-code-samples
fixes #586
2018-08-01 10:20:16 +03:00
Roman Hotsiy
99bef64d37
chore: Release 2.0.0-alpha.33 🔖 2018-07-31 17:19:17 +03:00
Roman Hotsiy
7a35a4d0de
chore: tests crash fix after refactor 2018-07-31 16:58:44 +03:00
Roman Hotsiy
ba22b1e352
fix: show examples for response headers
fixes #575
2018-07-31 16:55:06 +03:00
Roman Hotsiy
15dfe44d4e
fix: allow word-break in code strings in md 2018-07-31 16:45:56 +03:00
Roman Hotsiy
d99e9188fd
fix: long endpoint url overflow 2018-07-31 16:14:12 +03:00
Roman Hotsiy
a4f79bf8c2
chore: refactor, separate active and expanded state for menu items 2018-07-31 15:55:35 +03:00
Roman Hotsiy
5ebab5f942
chore: perfect scrollbar wrapper to maintain initial offset 2018-07-31 15:36:30 +03:00
Roman Hotsiy
35ba10f759
chore: refactor, unify markdown headings 2018-07-31 15:35:35 +03:00
Roman Hotsiy
d731518c8c
chore: refactor, rename StoreProvider to StoreBuilder 2018-07-30 12:51:50 +03:00
Roman Hotsiy
dba3995e89
chore: Release 2.0.0-alpha.32 🔖 2018-07-26 18:01:51 +03:00
Roman Hotsiy
873fe05a5d
chore: SideMenu accept className 2018-07-26 18:00:30 +03:00
Roman Hotsiy
d74578dc9b
fix: remove break-all from code samples 2018-07-26 17:51:47 +03:00
Roman Hotsiy
9361ead8c4
chore: refactor, simplify AppStore 2018-07-26 17:51:10 +03:00
Roman Hotsiy
757a92e425
chore: fix markdown in demo 2018-07-25 18:02:21 +03:00
Roman Hotsiy
f96c481b34
fix: wrong display when combining multiple auth requirements
fies #577
2018-07-25 13:11:26 +03:00
Roman Hotsiy
0045958d3b
fix: fix resolving issue by upgrading to json-schema-ref-parser@5.1.1
closes #541
2018-07-25 13:10:29 +03:00
Roman Hotsiy
64fb09cfd4
chore(cli): redoc-cli v0.6.1 2018-07-24 22:35:46 +03:00
Roman Hotsiy
75ced44d7c
fix(cli): add mobx to dependencies 2018-07-24 22:35:24 +03:00
Roman Hotsiy
b5d0aca9ae
chore: fix lint issues 2018-07-23 13:22:24 +03:00
Roman Hotsiy
6ac46933e8
chore: fix tslint and unit tests don't fail CI build 2018-07-23 13:16:13 +03:00
Roman Hotsiy
316d6d63fb
chore: update changelog
[ci skip]
2018-07-23 12:13:05 +03:00
Roman Hotsiy
59e0604da4
chore: Release 2.0.0-alpha.31 🔖 2018-07-23 12:09:11 +03:00
Roman Hotsiy
9d6b30c55a
feat: simple variable substitution support
fixes #565
2018-07-23 12:00:30 +03:00
Roman Hotsiy
59e05fbe75
chore: fix typo SecurityRequirement
fixes #571
2018-07-23 11:20:56 +03:00
Roman Hotsiy
21f34b1e59
chore: minor typings fix 2018-07-23 11:19:13 +03:00
Roman Hotsiy
2ff726649c
chore: run prettier 2018-07-23 11:17:31 +03:00
Roman Hotsiy
b41b181dd0
fix: server url contains spec name if not specified in the spec 2018-07-23 11:16:54 +03:00
Roman Hotsiy
ea2210a3c3
chore: Release 2.0.0-alpha.30 🔖 2018-07-19 20:43:36 +03:00
Roman Hotsiy
6473e6269c
fix: fix usage with CRA by transpiling swagger2openapi deps
fixes #566
2018-07-19 20:42:09 +03:00
Roman Hotsiy
cbfc226fa9
chore: minor css improvements 2018-07-19 17:12:31 +03:00
Roman Hotsiy
8c9304a719
Fix: unify code samples and json styling, stop using injectGlobal for prism
fixes #491
2018-07-19 17:07:11 +03:00
Roman Hotsiy
58bddc8811
feat: big theme update 2018-07-19 14:33:51 +03:00
Roman Hotsiy
c5a352312a
chore(cli): redoc-cli v0.6.0 2018-07-18 13:37:37 +03:00
Roman Hotsiy
a0a1faddb6
chore: Release 2.0.0-alpha.29 🔖 2018-07-18 13:36:24 +03:00
Roman Hotsiy
ec44f00e36
chore: revert: "remove some {force: true} from e2e tests"
tests fails on CI for some reason

This reverts commit d0e037c586.
2018-07-18 13:07:00 +03:00
Roman Hotsiy
7e5b6d9029
fix: properly host oneOf inside allOf
fixes #507
fixes #528
2018-07-18 13:03:42 +03:00
Roman Hotsiy
e0f58dc601
chore: publish cli whenever version changes 2018-07-18 12:01:16 +03:00
Roman Hotsiy
f56322e28c
chore: update npm token for travis deploy 2018-07-18 11:59:33 +03:00
Roman Hotsiy
89aa754063
fix: different output of cli bundle and redoc
fixes #547
2018-07-18 11:51:34 +03:00
Roman Hotsiy
dcca44a92d
fix: fix non-scalar query/path/header params are not expandable
fixes #561
2018-07-17 15:50:14 +03:00
SeungWoon Maz Lee
8817d9c9db fix: use original tag name when slugified one is not valid (#553)
* use original tag name when slugified one is not valid

* use wrapper function when using slugify
2018-07-17 15:21:03 +03:00
Roman Hotsiy
76906eb126
fix(cli): cli output crashes if script closing tag is in the spec
fixes #563
2018-07-17 15:16:06 +03:00
Roman Hotsiy
32df7767fd
chore: move mobx to peerDependencies 2018-07-17 12:38:02 +03:00
Roman Hotsiy
c35925a332
fix: fix Download button url when spec as object was provided
+ do not output huge base64 encoded link when SSR, instead use button handler

fixes #462
related #540
2018-07-17 12:22:27 +03:00
Roman Hotsiy
edc77a2017
chore: update ts and enable noUnusedLocals 2018-07-17 12:15:22 +03:00
Roman Hotsiy
bab3e7dfce
fix: fix broken link in CLI help
fixes #559
2018-07-17 11:12:42 +03:00
Roman Hotsiy
d4ab5adc17
feat: new option disableSearch 2018-07-17 11:07:49 +03:00
Roman Hotsiy
fec4605115
chore: set cypress viewport size to match MBP 15 2018-07-16 19:18:24 +03:00
Roman Hotsiy
d0e037c586
chore: remove some {force: true} from e2e tests 2018-07-16 19:17:53 +03:00
Roman Hotsiy
c7b3e47366
chore: remove unused imports after fix in TS@2.9.1 2018-07-16 18:28:36 +03:00
Roman Hotsiy
58284b3d99
chore: update dependencies 2018-07-16 18:28:11 +03:00
Roman Hotsiy
c0c44bc4fe
fix: regression - broken urls for operations without operationId 2018-07-14 18:16:35 +03:00
Roman Hotsiy
9f0252e12e
chore: update security-requirement ui 2018-07-14 17:11:29 +03:00
Roman Hotsiy
e6ebdb7095
chore: refactor MediaTypesSwitch 2018-07-14 16:37:36 +03:00
Roman Hotsiy
95e3c4ad76
chore: Release 2.0.0-alpha.28 🔖 2018-06-30 00:42:07 +03:00
Roman Hotsiy
e1c9e19fbc
fix: inline markdown regression 2018-06-30 00:41:31 +03:00
Roman Hotsiy
c5e9030d04
chore: Release 2.0.0-alpha.27 🔖 2018-06-29 23:51:05 +03:00
Roman Hotsiy
55bd8535b4
feat: theme hooks experimental hooks 2018-06-29 23:49:53 +03:00
Roman Hotsiy
b2c3c00e8c
chore: update changelog
[ci skip]
2018-06-28 20:48:26 +03:00
Roman Hotsiy
127c863a9a
chore: Release v2.0.0-alpha.26 🔖 2018-06-28 20:31:36 +03:00
Roman Hotsiy
749547f69d
chore: license-chekcer allow BSD license 2018-06-28 20:26:51 +03:00
Roman Hotsiy
c3da0a01d4
chore: minor refactor 2018-06-28 20:26:14 +03:00
Roman Hotsiy
06ef51c08c
feat: experimental temporary support for tags in md 2018-06-28 20:25:12 +03:00
Roman Hotsiy
aaaa8999bf
fix: fix link colors in json samples 2018-06-28 20:25:11 +03:00
Roman Hotsiy
78fa31225a
feat: display Value instead of Enum for one-item enum 2018-06-28 20:25:11 +03:00
Roman Hotsiy
1812775cd0
chore: remove unused EmptyDarkRightPanel 2018-06-28 20:25:11 +03:00
Leonard Ehrenfried
e80881f0a8 chore: update swagger2openapi to 3.1.2 (#549)
This includes the fix for x-discriminator. 

Fixes #496.
2018-06-28 20:21:34 +03:00
Roman Hotsiy
0d45cc26f1
fix: do not uppercase menu items by default 2018-06-26 09:46:16 +03:00
Roman Hotsiy
11947ed68e
fix: change default font weight to 400 2018-06-26 09:36:39 +03:00
Roman Hotsiy
7daa070311
chore(cli): cli v0.5.0 2018-06-25 14:43:58 +03:00
Roman Hotsiy
20191e3e09
chore: Release 2.0.0-alpha.25 🔖 2018-06-25 14:41:32 +03:00
brushmate
723516b089 feat(cli): watch the directory that contains the specified spec instead of the spec itself (#519)
Fixes #514
2018-06-25 14:15:00 +03:00
Zach Pomerantz
cddfb12806 chore: Add Dockerfile for easier deployment (#427) 2018-06-25 14:10:29 +03:00
Roman Hotsiy
a4033747d3
chore: update cypress config 2018-06-25 14:03:45 +03:00
Roman Hotsiy
49feddaa10
chore: update snapshots 2018-06-25 14:00:08 +03:00
Roman Hotsiy
761a2c1251
chore: fix lint issues 2018-06-25 13:59:11 +03:00
Roman Hotsiy
f5c980ab51
docs: update callback and onLoaded docs 2018-06-25 13:56:52 +03:00
Roman Hotsiy
16313b8293
feat: pass error in init callback + onLoaded for RedocStandalone 2018-06-25 13:48:51 +03:00
Roman Hotsiy
637b493b41
chore: refactor StoreProvider to not use componentWillReceiveProps 2018-06-25 12:47:09 +03:00
Roman Hotsiy
f404626802
chore: update deps 2018-06-25 12:45:49 +03:00
Roman Hotsiy
151acaf5ab
chore: update deps 2018-06-25 09:55:35 +03:00
Roman Hotsiy
4e5282e206
fix: default false not displaying
fixes #544
2018-06-25 09:10:44 +03:00
Roman Hotsiy
83fca7d9ff
fix: use pushState instead of hash replace
fixes #542
2018-06-21 13:47:53 +03:00
Jérémy Derussé
4694b6f9ca fix: Use item's title in array definition (#526) 2018-06-21 13:10:10 +03:00
Roman Hotsiy
52adc9378e
chore: update openapi-sampler
related to #541
2018-06-20 20:33:08 +03:00
Roman Hotsiy
4c76d52cc6
fix: fix subsections ids so subsections with the same name are allowed
fixes #529
2018-06-20 19:57:52 +03:00
Roman Hotsiy
c8a5f36f17
fix: fix IE11 crash + remove unused polyfills
fixes #448
2018-06-20 19:57:52 +03:00
Roman Hotsiy
5dae267a54
fix: discriminator field doesn't change in examples
fixes #524
2018-06-20 19:57:52 +03:00
Oleg Vaskevich
133f9f0d12 chore: Add x-code-samples to TS types (#533) 2018-06-20 19:09:16 +03:00
Lev Pachmanov
070dc5c0a8 feat: support for x-discriminator-value for 2.0 as alternative to mapping (#534)
Add vendor extension `x-discriminator-value `used by swagger-codegen for Swagger 2.0 as an alternative to OpenAPI 3.0 mapping feature.
2018-06-20 19:08:19 +03:00
Jérémy Derussé
35f83e491a chore: escape HTML (#527) 2018-06-18 15:58:26 +03:00
Roman Hotsiy
c0b0cd49b5
fix: support wildcard status codes
fixes #531
2018-06-18 15:56:31 +03:00
Roman Hotsiy
d38f2f2a5a
fix: add ReDoc attribution link which was present in 1.x 2018-06-01 19:44:34 +03:00
Roman Hotsiy
9a34f22aff
docs: describe callback param to Redoc.init
fixes #381
2018-06-01 18:37:36 +03:00
Roman Hotsiy
209c6caca0
fix: non-json sample crash in some cases
fixes #456
2018-06-01 18:20:28 +03:00
Roman Hotsiy
63ae2e8e94
feat: support x-summary for response objects
fixes #500
2018-06-01 16:50:07 +03:00
Roman Hotsiy
a8a7593da2
chore: pinpoint babel to version 7.0.0-beta.47 2018-06-01 15:50:39 +03:00
Roman Hotsiy
c56ba17c98
chore: fix slack spec link in demo 2018-06-01 15:41:42 +03:00
Roman Hotsiy
ae3924ac16
chore: Release 2.0.0-alpha.24 🔖 2018-06-01 12:55:33 +03:00
Roman Hotsiy
902f97a5b9
fix: temporary downgrade marked as it introduced breaking changes and a few bugs 2018-06-01 12:54:36 +03:00
Roman Hotsiy
f3b611e76d
chore: Release 2.0.0-alpha.23 🔖 2018-05-31 16:29:04 +03:00
Roman Hotsiy
39f54d0cc6
chore: fix travis build for PRs 2018-05-31 16:18:08 +03:00
Roman Hotsiy
bde08f1283
fix: fix vertical line misaligned in firefox
closes #503
2018-05-31 15:41:57 +03:00
Roman Hotsiy
d957ad762d
fix: fix typings on npm 2018-05-31 15:41:57 +03:00
Jérémy Derussé
47b2177f58 fix: MergeAll takes items into account (#511) 2018-05-31 12:59:55 +03:00
brushmate
370d08aa1a fix(cli): make positional arguments required and handle errors in serve and bundle manually (#518) 2018-05-31 12:56:35 +03:00
Roman Hotsiy
8e7f27b16d
chore: Release 2.0.0-alpha.22 🔖 2018-05-29 19:01:21 +03:00
Roman Hotsiy
2eb1952875
fix: HEAD http verb support in menu badges
fixes #493
2018-05-29 18:58:37 +03:00
Roman Hotsiy
3698598d60
chore: update deps 2018-05-29 18:44:03 +03:00
Roman Hotsiy
3c6de2cafc
fix: more descriptive message for wrong discriminator use
fixes #505
2018-05-29 17:58:57 +03:00
Roman Hotsiy
4b41bb103f
chore(cli): redoc-cli v0.4.0 2018-05-29 17:52:15 +03:00
Roman Hotsiy
aaff311a3e
feat: support x-discriminator for OpenAPI 2
related to #496
2018-05-29 17:51:50 +03:00
Roman Hotsiy
6ea2b7b0e6
fix: fix font-weight inconsistency
fixes #506
2018-05-29 17:51:50 +03:00
Roman Hotsiy
d162babe19
feat: add new experimental option unstable_ignoreMimeParameters 2018-05-29 17:51:50 +03:00
brushmate
720c304484 fix(cli): return 1 as exit code if an error happens in the cli (#516) 2018-05-29 17:51:15 +03:00
brushmate
ac7372be6f fix(cli): create directories when a path is specified in the --output option (#513)
Fixes #512
2018-05-29 12:46:31 +03:00
Roman Hotsiy
bf57c4d14b
chore: Release 2.0.0-alpha.21 🔖 2018-05-28 21:56:36 +03:00
Roman Hotsiy
64801b039f
fix: specify caption-side
fixes #509
2018-05-28 21:54:02 +03:00
Roman Hotsiy
57a32ba116
chore: update deps 2018-05-28 21:50:26 +03:00
Roman Hotsiy
f8b793d2dc
feat: new theme colors: code and codeBg 2018-05-28 21:47:37 +03:00
Roman Hotsiy
782ef77080
feat: new theme option: nestingSpacing 2018-05-28 21:45:34 +03:00
Roman Hotsiy
6b1e8e75b0
fix: replace "oops" with field name 🙈 2018-05-18 17:30:21 +03:00
Roman Hotsiy
ffdb172b62
chore: update deps 2018-05-18 15:14:40 +03:00
Roman Hotsiy
a1fa4b47a8
fix: reduce search index size 2018-05-18 15:13:46 +03:00
Roman Hotsiy
8afae474c7
chore: fix declarations 2018-05-18 15:10:55 +03:00
Roman Hotsiy
e13d172502
chore: allow for children in MenuItemTitle 2018-05-18 15:09:30 +03:00
Roman Hotsiy
59571596c0
refactor: move styled.d.ts patch to typings 2018-05-18 13:47:35 +03:00
Roman Hotsiy
dbacec91ad
chore(cli): redoc-cli v0.3.9 2018-05-17 13:46:14 +03:00
Roman Hotsiy
07b7df8064
chore: update deps 2018-05-17 13:45:27 +03:00
Roman Hotsiy
3ee4210e6f
chore: fix cli lint issues 2018-05-17 11:49:38 +03:00
Roman Hotsiy
50184739c7
fix(cli): escape \u2029 \u2028 characters
see http://www.thespanner.co.uk/2011/07/25/the-json-specification-is-now-wrong/
related to #475
2018-05-17 11:43:53 +03:00
Roman Hotsiy
2654cefd75
refactor: minor refactor 2018-05-17 11:41:51 +03:00
Roman Hotsiy
f7bf0b8912
chore: fix declarations emit 2018-05-17 11:40:47 +03:00
Roman Hotsiy
135651a8a6
chore: emit declarations on CI 2018-05-16 14:01:36 +03:00
Roman Hotsiy
8e1a5cb7a1
fix: add tslib dependency 2018-05-16 13:59:33 +03:00
Roman Hotsiy
08253ee1b1
chore: enable tslint for test files 2018-05-16 13:08:27 +03:00
Roman Hotsiy
9115be8378
feat: export TypeScript typings 2018-05-16 12:44:44 +03:00
Roman Hotsiy
e06f6e83de
docs: remove 'v1.x' from demo link
[ci skip]
2018-05-15 13:40:53 +03:00
Roman Hotsiy
4a0aa17bdd
chore: add cli missing dep
[ci skip]
2018-05-14 13:33:31 +03:00
Roman Hotsiy
08f7bd112d
chore: update deps 2018-05-14 13:24:23 +03:00
Roman Hotsiy
0a9d09d207
chore: cli release v0.3.7 2018-05-14 13:03:43 +03:00
Roman Hotsiy
cd88ebc19b
chore: Release 2.0.0-alpha.20 🔖 2018-05-14 13:02:56 +03:00
Roman Hotsiy
6f85cb195a
fix: fix worker is not defined in lib bundle, fixes #485 2018-05-14 12:58:29 +03:00
Roman Hotsiy
54937b68d5
chore: deploy demo only on tags 2018-05-14 12:00:00 +03:00
Roman Hotsiy
dce93bfc2d
chore: Release 2.0.0-alpha.19 🔖 2018-05-14 11:51:44 +03:00
Roman Hotsiy
0d6deff8c8
feat: display scope description as markdown, fixes #466 2018-05-14 11:48:11 +03:00
Roman Hotsiy
2cf4c3cd7b
fix: path parameters are not correctly override, fixes #481 2018-05-14 11:37:19 +03:00
Roman Hotsiy
6d1a9e589c
fix: limit height of discriminator dropdown, fixes #484 2018-05-14 11:04:56 +03:00
Roman Hotsiy
3829aca046
chore: fix lint issues 2018-05-14 11:00:43 +03:00
Roman Hotsiy
3b274488a8
chore: add license check 2018-05-14 11:00:07 +03:00
Roman Hotsiy
01f575cc73
fix: fix build caused by new babel decorators syntax, fixes #487 2018-05-14 10:38:44 +03:00
Roman Hotsiy
42cf18edb3
fix: fix prism lang dependencies, fixes #467 2018-05-14 09:51:57 +03:00
Roman Hotsiy
afb11d6a4f
fix: fix @observer on PureComponent warning 2018-05-14 09:50:35 +03:00
Roman Hotsiy
a1a01d5a41
chore: update deps 2018-05-14 09:39:03 +03:00
Roman Hotsiy
126c6a689a
fix: change look of additionalProperties 2018-05-14 09:33:09 +03:00
Adam Altman
8376068bfa
Update LICENSE
This was released in 2015.  I believe updates to this were by accident.
2018-05-08 10:23:45 -05:00
Mason Malone
e10b314ba3 docs: Fix a couple typos and a link in README.md (#480) 2018-05-03 11:46:30 +03:00
pengfluf
f3de47738b docs: cli -> README.md typos fixed (#476) 2018-04-26 17:10:37 +03:00
Morgan Terry
64119c44d4 fix: fix spelling in error message (#455) 2018-04-17 08:51:07 +03:00
Roman Hotsiy
1aa7d5d279
tests: add JsonViewer basic unit tests 2018-03-26 23:09:09 +03:00
Roman Hotsiy
04251a581a
tests: move tests to parent folder 2018-03-26 22:33:46 +03:00
Roman Hotsiy
29a7f299a1
tests: workaround perfectscroll importing issue in jest 2018-03-26 22:24:47 +03:00
Roman Hotsiy
83af48112c
tests: add standalone component test 2018-03-26 22:24:39 +03:00
Roman Hotsiy
deffdc548e
chore: remove worker from main bundle for browser/standalone build 2018-03-26 18:24:19 +03:00
Roman Hotsiy
33eaf77dc5
refactor: rename isBrowser to IS_BROWSER + use only it for detection 2018-03-26 18:15:54 +03:00
Roman Hotsiy
040bc239a2
chore: fix hot realoding in playground 2018-03-26 18:13:39 +03:00
Roman Hotsiy
5cab571f78
chore: fix lint issues 2018-03-26 13:58:20 +03:00
Roman Hotsiy
d5286fc5bb
chore: exclude some rarely-used langs for APIs (-4Kb) 2018-03-26 13:57:39 +03:00
Roman Hotsiy
39352e6e4a
chore: ignore some not-used code from node_modules (-9KB) 2018-03-26 13:57:00 +03:00
Roman Hotsiy
c3c46e1713
chore: update deps 2018-03-26 13:18:37 +03:00
Roman Hotsiy
09cbe884b5
fix: disable chrome tap-highlight on mobiile 2018-03-23 16:17:01 +02:00
Roman Hotsiy
fefe571d29
chore: add babel-plugin-styled-components (smaller bundle size) 2018-03-23 16:16:29 +02:00
Roman Hotsiy
8583547f30
chore: Release 2.0.0-alpha.18 🔖 2018-03-23 08:26:53 +02:00
fritz-c
b29c3293fc fix: modify the peerDependencies to reflect the need for react 16.3 2018-03-23 08:18:02 +02:00
Roman Hotsiy
3fabce4d19
chore: disable source-maps for css loader 2018-03-22 18:51:16 +02:00
Roman Hotsiy
384c883bb8
fix: fix logo width 2018-03-22 18:50:31 +02:00
Roman Hotsiy
4b15a1702d
chore: run prettier 2018-03-22 18:23:32 +02:00
Roman Hotsiy
d92ed428f9
chore: fix deme on mobile 2018-03-22 18:22:11 +02:00
Roman Hotsiy
2b52bf2641
chore: enable noEmitHelpers and importHelpers 2018-03-22 18:03:20 +02:00
Roman Hotsiy
d9ee2d0d89
fix(cli): don't wait for content loaded in bundled HTML 2018-03-22 17:49:15 +02:00
Roman Hotsiy
d1d80422a4
fix: scroll to section sooner when SSR + simplify item ids 2018-03-22 17:46:30 +02:00
Roman Hotsiy
28c487d2f1
chore: fix year in LICENSE 2018-03-22 13:08:18 +02:00
Roman Hotsiy
3089cba9f7
chore: fine-tune .npmignore 2018-03-22 13:08:06 +02:00
Roman Hotsiy
a2925988b1
chore: add soical metatags to demo 2018-03-21 20:30:46 +02:00
Roman Hotsiy
de9638443f
chore: update links in README 2018-03-21 20:30:18 +02:00
Roman Hotsiy
de177a0542
chore: Release 2.0.0-alpha.17 🔖 2018-03-21 20:14:42 +02:00
Roman Hotsiy
18d051a82d
chore: add BannerPlugin 2018-03-21 20:08:46 +02:00
Roman Hotsiy
a0845325d9
fix: fix second-level heading in description 2018-03-21 19:59:55 +02:00
Roman Hotsiy
866217667a
chore: demo deployment from CI 2018-03-21 19:59:55 +02:00
Roman Hotsiy
89c62a6b19
chore: copy openapi.yaml to the demo folder 2018-03-21 19:59:55 +02:00
Roman Hotsiy
66dc11bcaa
chore: update gitignore 2018-03-21 19:59:55 +02:00
Roman Hotsiy
cb673f0bd3
chore: Upload redoc-demo.png
[ci skip]
2018-03-21 18:23:41 +02:00
Roman Hotsiy
a3f09ac397
chore: fix .npmignore 2018-03-21 18:02:25 +02:00
Roman Hotsiy
73164560d6
chore: remove cli output 2018-03-21 18:02:11 +02:00
Roman Hotsiy
059b8cddec
docs: improve readme
[ci skip]
2018-03-21 17:58:01 +02:00
Roman Hotsiy
ad0a2b9d3e
docs: fix broken links in README
[ci skip]
2018-03-21 17:52:45 +02:00
Roman Hotsiy
0382034ec2
Merge branch 'react-rewrite' 🎉 2018-03-21 17:47:35 +02:00
Roman Hotsiy
d27e61a1f7
fix: make field type color more dark (closes #439) 2018-03-20 16:18:25 +02:00
Roman Hotsiy
cbce28aec3
feat: add more options to theme 2018-03-20 16:15:36 +02:00
Roman Hotsiy
0703c7fc4f
chore(cli): CLI release 0.3.5 2018-03-20 13:22:59 +02:00
Roman Hotsiy
c9c6bc5255
fix(cli): allow to set url to the spec in SSR mode 2018-03-20 13:22:41 +02:00
Roman Hotsiy
b11679604a
chore(cli): CLI release 0.3.4 2018-03-20 13:02:08 +02:00
Roman Hotsiy
c729c6c75b
fix(cli): fix output option type 2018-03-20 13:01:45 +02:00
Roman Hotsiy
8891f5c97d
fix(cli): fix crash 2018-03-20 12:51:23 +02:00
Roman Hotsiy
06b5a00a8b
fix(cli): rename redoc-cli bin 2018-03-20 12:39:49 +02:00
Roman Hotsiy
5f1e553ef4
chore: fix lint issues 2018-03-20 11:52:08 +02:00
Roman Hotsiy
8ce355d6fb
chore: bump cli version 2018-03-20 11:40:23 +02:00
Roman Hotsiy
3f6e221b4c
docs: add CLI examples 2018-03-20 11:39:53 +02:00
Roman Hotsiy
2732c89316
feat(cli): add options to specify redoc options 2018-03-20 11:31:36 +02:00
Roman Hotsiy
7ee1ab23a8
chore: add handlebars typings 2018-03-20 11:29:38 +02:00
Roman Hotsiy
05403a7aa9
fix: css fix + update theme 2018-03-20 11:17:59 +02:00
Roman Hotsiy
b7afce9481
feat(cli): add --template option 2018-03-20 11:00:45 +02:00
Roman Hotsiy
bb8a6784c2
feat(cli): add title option to bundle 2018-03-20 10:21:05 +02:00
Roman Hotsiy
d3779bfd40
tests: remove failing check 2018-03-19 23:17:12 +02:00
Roman Hotsiy
fee7aeca88
tests: record videos and failure screenshots 2018-03-19 22:58:05 +02:00
Roman Hotsiy
39752fb9f0
tests: enable breaking test to record it 2018-03-19 22:37:41 +02:00
Roman Hotsiy
440e15e773
chore: switch to cy webpack-preprocessor instead of fork 2018-03-19 16:42:37 +02:00
Roman Hotsiy
0fa72a55ce
tests: add more search tests 2018-03-19 16:34:37 +02:00
Roman Hotsiy
5b136c1a2f
tests: prefer attributes over classes in e2e tests 2018-03-19 16:33:26 +02:00
Roman Hotsiy
03cc781b8d
chore: update redoc-cli docs 2018-03-18 17:56:25 +02:00
Roman Hotsiy
f993e9b443
chore: fix redoc standalone path in CLI 2018-03-18 17:49:07 +02:00
Roman Hotsiy
4510311096
chore: add missing package to CLI 2018-03-18 17:28:45 +02:00
Roman Hotsiy
20730c82b4
chore: Release 2.0.0-alpha.16 🔖 2018-03-18 17:16:27 +02:00
Roman Hotsiy
096cbeb4a4
chore: do not fail build on cli publish 2018-03-18 17:15:12 +02:00
Roman Hotsiy
8780f2d474
chore: fix ci-publish from travis 2018-03-18 16:18:29 +02:00
Roman Hotsiy
b3fca14d16
chore: use ci-publish to publish CLI 2018-03-18 14:25:26 +02:00
Roman Hotsiy
4924f2f9ca
chore: try npm publish with --registry 2018-03-18 13:40:26 +02:00
Roman Hotsiy
8f62bf27e6
chore: allow deployment from branch 2018-03-18 11:53:34 +02:00
Roman Hotsiy
cb39a4b6cd
chore: try deploying cli from Travis 2018-03-18 11:40:15 +02:00
Roman Hotsiy
7731f93ac0
chore: try deploying cli from travis 2018-03-18 11:16:04 +02:00
Roman Hotsiy
95c7585628
fix: move cli to a separate npm package 2018-03-18 11:15:17 +02:00
Roman Hotsiy
ed20ac1298
fix: prefer extend of styled to make styles more predictable 2018-03-18 11:13:08 +02:00
Roman Hotsiy
5084780e6d
chore: autotag releases on npm 2018-03-18 11:11:08 +02:00
Roman Hotsiy
020f8fd6a9
chore: yarn cache on travis 2018-03-17 23:25:13 +02:00
Roman Hotsiy
9026795b9f
tests: add MarkerService tests 2018-03-17 23:23:14 +02:00
Roman Hotsiy
fa4578dc04
chore: enable coverage for npm test by default 2018-03-17 22:06:25 +02:00
Roman Hotsiy
e0223494c2
feat: use new Context API for options 2018-03-17 22:04:37 +02:00
Roman Hotsiy
ebb9b7ee52
chore: setup cypress record 2018-03-17 21:09:18 +02:00
Roman Hotsiy
2c320d229b
chore: setup coverage + coveralls 2018-03-17 20:57:45 +02:00
Roman Hotsiy
b0dd7d5cb1
chore: add bundlesize test + update readme 2018-03-17 19:56:08 +02:00
Roman Hotsiy
40a483755f
chore: disable broken e2e test 2018-03-17 19:13:44 +02:00
Roman Hotsiy
e002f2a2a4
chore: update all deps to latest 2018-03-17 18:50:55 +02:00
Roman Hotsiy
6c70d1a345
chore: migrate to webpack 4 2018-03-17 17:58:28 +02:00
Roman Hotsiy
e27d421f8a
chore: migrate to ts-loader 2018-03-17 15:16:56 +02:00
Roman Hotsiy
598b3396ee
chore: do not apply hot-reloading plugin in prod mode 2018-03-17 14:56:45 +02:00
Roman Hotsiy
053248e8ab
chore: update to the latest react-hot-loader@4 2018-03-17 14:17:09 +02:00
Roman Hotsiy
428f02045e
chore: Release 2.0.0-alpha.15 🔖 2018-03-17 00:03:27 +02:00
Roman Hotsiy
d3655161fc
chore: fix lint issues 2018-03-16 23:58:25 +02:00
Roman Hotsiy
6018042180
fix: fix broken css after installing polished 2018-03-16 23:56:53 +02:00
Roman Hotsiy
1df690a964
feat: more advanced theme engine 2018-03-16 17:07:49 +02:00
Roman Hotsiy
ea3c731464
chore: use latest RC of typescript 2018-03-16 17:02:12 +02:00
Roman Hotsiy
bb67c6ceef
chore: Release 2.0.0-alpha.14 🔖 2018-03-15 22:26:48 +02:00
Roman Hotsiy
7769ba84fd
fix: fix CLI crash + build it on travis 2018-03-15 22:26:07 +02:00
Roman Hotsiy
e8609d228a
tests: temporary disable test failing only in Cypress headless 2018-03-15 22:11:20 +02:00
Roman Hotsiy
703664ed0b
chore: Release 2.0.0-alpha.13 🔖 2018-03-15 20:59:59 +02:00
Roman Hotsiy
3bbd358b24
docs: CLI basic docs 2018-03-15 20:56:11 +02:00
Roman Hotsiy
fe3245a7a6
feat: arrow navigation in search results 2018-03-15 20:50:26 +02:00
Roman Hotsiy
e5458c0564
chore: various CLI fixes 2018-03-14 08:24:52 +02:00
David Revay
5dc21af281 fix: A couple minor bug fixes (#436)
* Fix so deref always returns an object.
* Fix SelectOnClick so it does not crash
* chore: fix demo's webpack.config.ts
* Fix space
2018-03-14 08:05:57 +02:00
Roman Hotsiy
390f6c1324
feat: ReDoc CLI 2018-03-13 16:56:38 +02:00
Roman Hotsiy
21447d22a1
chore: fix lint issues 2018-03-13 13:04:55 +02:00
Roman Hotsiy
83eaa5f838
chore: create demo page 2018-03-13 12:58:22 +02:00
Roman Hotsiy
28f239114b
fix: add logo width to the theme 2018-03-13 12:57:38 +02:00
Roman Hotsiy
0cb0af2cae
fix: make ReactStandalone react on props changes 2018-03-09 21:11:28 +02:00
Roman Hotsiy
18ec3ac17b
fix: align logo by center 2018-03-09 21:10:28 +02:00
Roman Hotsiy
49c23c9345
chore: ts-ignore import issue + fix lint errors 2018-03-09 12:10:08 +02:00
Roman Hotsiy
8dbe938195
feat: add hideDownloadButton option 2018-03-07 17:21:17 +02:00
Roman Hotsiy
0658b8ea67
chore: export hydrate from standalone build 2018-03-07 17:14:23 +02:00
Roman Hotsiy
8757fa510a
fix: add extra null-check + warning 2018-03-07 16:43:56 +02:00
Roman Hotsiy
4f7fa87f5a
chore: upload new petstore logo
[ci skip]
2018-03-07 16:22:13 +02:00
Roman Hotsiy
a78f9ab688
fix: fix right-panel blinking when scrolling + css improvements 2018-03-07 13:00:03 +02:00
Roman Hotsiy
4896346998
fix: fix worker import 2018-03-06 14:20:44 +02:00
Roman Hotsiy
29b0846e57
chore: add dead-simple example of SSR 2018-03-06 13:16:03 +02:00
Roman Hotsiy
1428fb52e0
fix: fix search-indexing for SSR 2018-03-06 13:12:14 +02:00
Roman Hotsiy
e94f84283d
feat: serialize search-index 2018-03-06 13:10:08 +02:00
Roman Hotsiy
8e4184b407
chore: update types for mark.js 2018-03-06 11:03:17 +02:00
Roman Hotsiy
61bb79e8b0
chore: fix lint issues 2018-03-05 17:58:19 +02:00
Roman Hotsiy
67e459f0c7
chore: do not prioritize tag elements over operations 2018-03-05 17:55:12 +02:00
Roman Hotsiy
825162e5d7
feat: add clear icon to searchbox 2018-03-05 17:52:50 +02:00
Roman Hotsiy
b797c965b2
fix: various search fixes 2018-03-05 17:48:34 +02:00
Roman Hotsiy
1ff2bd84cc
feat: add marker 2018-03-05 16:21:16 +02:00
Roman Hotsiy
ecf33d2dca
feat: reqired-first sort order for params 2018-03-05 16:18:39 +02:00
Roman Hotsiy
8bd71deebe
chore: update deps 2018-03-05 14:37:42 +02:00
Roman Hotsiy
6df8127e77
fix: skipReadOnly/skipWritOnly not passing down to nested array 2018-03-05 14:37:02 +02:00
Roman Hotsiy
8926dd457c
fix: merge inner properties of allOf 2018-03-05 14:08:27 +02:00
Roman Hotsiy
2462639f76
fix: skipReadOnly/skipWritOnly not passing down to nested OneOf 2018-03-05 13:31:27 +02:00
Roman Hotsiy
02c2413da8
fix: fix overflowing content in JSON samples 2018-03-05 13:14:26 +02:00
Roman Hotsiy
87abdf79d8
fix: writeOnly not respected in response samples 2018-03-05 13:04:49 +02:00
Roman Hotsiy
0f1b6a622e
fix: one-of dropdown not switching 2018-03-05 12:52:47 +02:00
Roman Hotsiy
bcf39dc2cf
fix: discriminator dropdown showing incorrect field if sorted 2018-03-05 12:50:25 +02:00
Roman Hotsiy
0520fe2b2d
chore: release v1.21.2 🔖 2018-02-26 15:43:35 +02:00
Roman Hotsiy
6ce9245c0a
fix: missing properties when using complex allOf (regression)
fixes #422
2018-02-26 15:40:35 +02:00
Cesar Landeros Delgado
3924d3c1be fix: fix the media queries utils so it gets the values from the current theme (#420) 2018-02-25 12:13:42 +02:00
Roman Hotsiy
92ed914701
chore: release v1.21.1 🔖 2018-02-23 15:21:23 +02:00
Roman Hotsiy
b1d928dbd3
fix: fix crash when discriminator is used incorrectly 2018-02-23 15:02:04 +02:00
Roman Hotsiy
0192b70235
chore: fix lint issues 2018-02-23 14:34:57 +02:00
Roman Hotsiy
309cc23de6
fix: avoid endless recursion in schema-walker in some cases
fixes #418, #395
2018-02-23 14:30:52 +02:00
Roman Hotsiy
07d1a7bfc7
chore: release v1.21.0 🔖 2018-02-18 12:38:53 +02:00
Luciano Jr
e0c6086c8e chore: update demo swagger.yaml (#417)
Fix typo
2018-02-18 12:36:56 +02:00
Roman Hotsiy
f30a92be82
chore: fix lint issue 2018-02-18 12:32:02 +02:00
Roman Hotsiy
fe989e2fe9
chore: use node@8 on travis 2018-02-18 11:23:03 +02:00
Roman Hotsiy
b33b9543fa
chore: add a few more integration tests 2018-02-17 21:27:15 +02:00
Roman Hotsiy
454e5bd0e9
feat: new option hide-download-button
resolves #394
2018-02-16 12:45:33 +02:00
Roman Hotsiy
420c51a4ba
fix: null example not used in schema samples
fixes #415
2018-02-16 12:36:38 +02:00
Roman Hotsiy
13165fb8fc
fix: referenced header name is empty 2018-02-12 10:20:24 +02:00
Roman Hotsiy
e1b2065b2e
refactor: switch to simple Tooltip (🗜 yet another 83kB to bundle size) 2018-02-09 13:41:26 +02:00
Roman Hotsiy
213f85b719
refactor: switch to marked (🗜 -81kB to minified bundle size) 2018-02-09 13:30:33 +02:00
Roman Hotsiy
6990cd2f24
feat: basis search 2018-02-08 18:46:32 +02:00
Roman Hotsiy
71e189ffc5
chore: refactor ObjectSchema and Field, less rerenders on expand 2018-02-08 11:40:43 +02:00
Roman Hotsiy
1f7fc44292
fix: fix crash when referencing non-existing security scheme 2018-02-08 10:34:49 +02:00
Roman Hotsiy
73b2126d54
Release 2.0.0-alpha.12 🔖 2018-02-08 01:19:22 +02:00
Roman Hotsiy
1f3701d3a9
fix: fix oneOf title for array 2018-02-08 01:18:04 +02:00
Roman Hotsiy
ff3bb2461a
fix: discriminator fix 2018-02-08 01:11:16 +02:00
Roman Hotsiy
ee822f6ebe
fix: filter out non-existing security schemas + warn 2018-02-08 00:51:00 +02:00
Roman Hotsiy
dead16199f
fix: crash in MarkdownRenderer on non-string 2018-02-08 00:50:26 +02:00
Roman Hotsiy
b95f665526
chore: make TS happy 2018-02-07 23:21:18 +02:00
Roman Hotsiy
7ed5bc1573
chore: update deps 2018-02-07 23:13:54 +02:00
Roman Hotsiy
f31a031a63
chore: fix lint errors and test 2018-02-07 23:06:07 +02:00
Roman Hotsiy
32cd670a89
chore: refactor MarkdownRenderer.extractHeadings 2018-02-07 22:54:55 +02:00
Roman Hotsiy
84d1c7b2f2
fix: resolve menu synchronization issue (use proper throttle) 2018-02-07 22:54:09 +02:00
Roman Hotsiy
29207cf0d2
fix: improve copy tooltip perf 2018-02-07 22:52:13 +02:00
Roman Hotsiy
a3cbb14f74
fix: fix tbody > tr nesting warning 2018-02-05 15:49:12 +02:00
Roman Hotsiy
a7e9254b6c
tests: rewrite test to not use useless snapshot 2018-01-30 16:48:15 +02:00
Roman Hotsiy
a6ae43a136
tests: filter out options object from snapshorts 2018-01-30 16:47:02 +02:00
Roman Hotsiy
3aab2d97d3
feat: responsive side menu 2018-01-30 15:38:16 +02:00
Roman Hotsiy
a29c3ccc2d
fix: basic responsiveness 2018-01-30 15:35:18 +02:00
Roman Hotsiy
a66de6cb58
Release 2.0.0-alpha.11 🔖 2018-01-29 18:45:25 +02:00
Roman Hotsiy
4037e8492d
chore: update benchmark to latest puppeteer 2018-01-29 15:11:44 +02:00
Roman Hotsiy
d8d1cc174d
chore: update deps 2018-01-29 14:32:57 +02:00
Roman Hotsiy
fab4fee726
tests: add tests for md renderer 2018-01-29 13:09:51 +02:00
Roman Hotsiy
a35541ff19
chore: improve basic benchmark 2018-01-29 13:09:38 +02:00
Roman Hotsiy
e9f23f76ae
fix: crash on 2-level md heading at the beginning 2018-01-29 10:51:45 +02:00
Roman Hotsiy
4b5df22fa0
fix: make active tab more clear 2018-01-24 12:32:25 +02:00
Roman Hotsiy
6c71a668f2
fix: wrap text in code samples 2018-01-24 11:53:21 +02:00
Roman Hotsiy
ef4e6d8ae2
tests: add SSR test 2018-01-24 11:52:05 +02:00
Roman Hotsiy
5bb0bdfd29
feat: port "copy to clipboard" / "expand/collapse all" functionality
closes #410
2018-01-23 18:49:45 +02:00
Roman Hotsiy
199f240e7c
fix: perfect scroll not working 2018-01-23 15:31:21 +02:00
Roman Hotsiy
2bae43fd06
chore: add CONTRIBUTING.md 👥
[ci skip]
2018-01-23 15:06:45 +02:00
Roman Hotsiy
f6a36d8df0
chore: update deps 2018-01-23 15:06:27 +02:00
Roman Hotsiy
dc18743df4
chore: add tslint + fix lint issues 2018-01-23 15:04:50 +02:00
Cesar Level
a7c3d622bb chore: Added ReDoc new Logo (#413) 💅 2018-01-23 13:45:18 +02:00
Roman Hotsiy
5ef3c8cebc
Update CHANGELOG.md 2018-01-22 08:43:52 +02:00
Roman Hotsiy
85a5b0712c
chore: fix deployment 2018-01-21 23:42:39 +02:00
Roman Hotsiy
c009d40054
chore: release v1.20.0 🔖 2018-01-21 22:52:03 +02:00
Roman Hotsiy
f9bbbb2d70
chore: speed-up e2e test on apis.guru list 2018-01-21 22:50:43 +02:00
Roman Hotsiy
b9665d5f45
chore: drop bower support 🔥 2018-01-21 22:45:26 +02:00
Roman Hotsiy
3819ad7e6a
chore: update snapshots 2018-01-21 22:00:22 +02:00
Roman Hotsiy
12f79f081a
fix: use array items example
fixes #408
2018-01-21 21:59:17 +02:00
Roman Hotsiy
e6e1be0dfe
chore: try fix chrome headless on travis 2018-01-21 21:57:48 +02:00
Roman Hotsiy
5925431dbf
chore: ignore ts warning for not-found file from ../compiled 2018-01-21 21:52:26 +02:00
Roman Hotsiy
53003fc076
chore: fix typings 2018-01-21 21:51:38 +02:00
Roman Hotsiy
195786e570
chore: update deps 2018-01-21 21:51:13 +02:00
Roman Hotsiy
c406dc5409
fix: Path parameters are not correctly overriden
fixes #400
2018-01-21 21:45:39 +02:00
Roman Hotsiy
e8adb605c3
fix: Use parentNode instead of parentElement to fix IE11 crash
fixes #406
2018-01-21 21:45:39 +02:00
Julian Kühnel
687b75331a chore: Use safer mark.js version (npm) (#407) 2018-01-21 21:39:51 +02:00
Josh Price
96fb7ce436 fix: courier misspelling (#409) 2018-01-21 21:36:37 +02:00
Roman Hotsiy
8df469f7de
Release v2.0.0-alpha.10 2018-01-16 17:29:42 +02:00
Roman Hotsiy
28d1cca2eb
chore: update snapshots 2018-01-16 17:27:07 +02:00
Roman Hotsiy
2d20d06500
fix: readonly/writeonly not respected in nested schemas 2018-01-16 17:11:23 +02:00
Roman Hotsiy
94789e3145
fix: definition name 2018-01-16 17:10:50 +02:00
Roman Hotsiy
1fb6967064
fix: first menu item keeps always selected 2018-01-16 16:33:43 +02:00
Roman Hotsiy
392ac71eb4
Release v2.0.0-alpha.9 2018-01-11 18:17:12 +02:00
Roman Hotsiy
34a8fe4906
fix: handle scrollYOffset in ScrollService 2018-01-11 18:17:02 +02:00
Roman Hotsiy
39d1ac5f22
Release v2.0.0-alpha.8 2018-01-10 19:21:20 +02:00
Roman Hotsiy
0253c5d76d
fix: undo section id + some minor fixes 2018-01-10 19:20:35 +02:00
Roman Hotsiy
b7f0a1a4c4
Release v2.0.0-alpha.7 2018-01-10 18:26:00 +02:00
Roman Hotsiy
33678e647e
fix: crate spec as data/base64 link when ssr 2018-01-10 18:24:55 +02:00
Roman Hotsiy
975636411b
fix: example value is not showed if it is false 2018-01-10 18:23:53 +02:00
Roman Hotsiy
174345399f
fix: add id attr to headers to work before react is loaded if ssr 2018-01-10 18:23:14 +02:00
Roman Hotsiy
7eb477b9de
Release v2.0.0-alpha.6 2018-01-10 16:19:42 +02:00
Roman Hotsiy
480c4a8425
update snapshots 2018-01-10 16:13:28 +02:00
Roman Hotsiy
0b0bc99f73
fix: move title propagation to the correct place 2018-01-10 13:02:32 +02:00
Roman Hotsiy
9d0f2a9273
move required label to the left column 2018-01-10 13:01:20 +02:00
Roman Hotsiy
bfee3ed269
fix: owerwrite text-align to left 2018-01-09 19:01:37 +02:00
Roman Hotsiy
d67852f9c4
do not crashe when used in node (isomorphic) 2018-01-09 19:00:17 +02:00
David Cumps
d083c1631d feat: align parameters to match up (#375) 2017-12-25 15:11:24 +02:00
David J. Felix
6b036ac707 chore: Fix demo link (#398) 2017-12-25 15:08:17 +02:00
Brendan Abbott
4ca40a4217 Make a single request for Google Fonts 2017-12-20 09:51:40 +02:00
Roman Hotsiy
50e2a5868d
feat: initial display security requirements 2017-12-15 12:18:15 +02:00
Roman Hotsiy
9be40718f4
chore: update deps 2017-12-15 12:15:30 +02:00
Roman Hotsiy
87a88c5ee5
chore: update snapshots 2017-12-07 19:37:25 +02:00
Roman Hotsiy
17da7b74db
fix: improve rendering of types 2017-12-07 19:12:34 +02:00
Roman Hotsiy
435cccd72f
fix: allOf and deref exit not only named refs 2017-12-07 18:39:27 +02:00
Roman Hotsiy
14f8408e8d
fix: do not ignore path level parameters 2017-12-07 17:17:23 +02:00
Roman Hotsiy
d27ba74679
🔖 Release v2.0.0-alpha.5 2017-12-07 13:56:43 +02:00
Roman Hotsiy
4ae1574c6c
fix: correct pointer for the schema 2017-12-07 13:54:34 +02:00
Roman Hotsiy
57129d3f58
bundle in reftools in lib build 2017-12-07 13:52:32 +02:00
Roman Hotsiy
ff20838e5a
chore: update deps 2017-12-07 13:52:06 +02:00
Mike Ralphson
b586e5b620 Add note that x-logo SHOULD use absolute URLs
Have seen a number of definitions designed for use with ReDoc using a relative logo URL. This 'breaks' when someone else (e.g. APIs.guru hosts the API definition).
2017-11-28 10:31:55 +02:00
Roman Hotsiy
03ee4d1728
🔖 v2.0.0-alpha.4 2017-11-24 12:03:23 +02:00
Roman Hotsiy
f1377da0d0
chore: update jest snapshots 2017-11-24 12:02:00 +02:00
Roman Hotsiy
c484411171
refactor: rename SecurityDefs to SecuritySchemes 2017-11-24 11:58:55 +02:00
Roman Hotsiy
426e5b67ab
fix: do not auto-append security-definitions if they are not in the spec 2017-11-24 11:58:55 +02:00
Roman Hotsiy
ca81b6dfaf
fix: don't display operations without tags as tag items in menu 2017-11-24 11:58:55 +02:00
Roman Hotsiy
3421be2ea3
fix: add ellipsis for menu items with long words 2017-11-24 11:58:55 +02:00
Roman Hotsiy
335deb983e
fix: crashes on some dereferencing/allOf merging cases 2017-11-24 11:58:47 +02:00
Roman Hotsiy
ce543cf793
v2.0.0-alpha.3 2017-11-23 16:23:14 +02:00
Roman Hotsiy
3d4ccaaf67
chore: setup auto changelog generation 2017-11-23 16:22:38 +02:00
Roman Hotsiy
334a0a07da
fix: make oneOf not skip fields defined alongside 2017-11-23 16:22:02 +02:00
Roman Hotsiy
bdf60794f3
fix: crash when $ref is url encoded
reported by @mikunn
2017-11-23 16:08:39 +02:00
Roman Hotsiy
343f51a867
Fix security schemes representation 2017-11-23 15:40:26 +02:00
Roman Hotsiy
1994002685
Fix nested allOfs 2017-11-23 15:27:50 +02:00
Roman Hotsiy
c1fe2e6899
downgrade cypress 2017-11-23 14:50:45 +02:00
Roman Hotsiy
9f8aee2810
🔖 Release v2.0.0-alpha.2 2017-11-23 14:39:05 +02:00
Roman Hotsiy
b037318c73
Update dependencies 2017-11-23 14:36:52 +02:00
Roman Hotsiy
86a7405ebf
Make conversion process more robust 2017-11-23 13:40:21 +02:00
Roman Hotsiy
11387ede80
🔖 Release v2.0.0-alpha.1 2017-11-23 12:25:59 +02:00
Roman Hotsiy
831c23db0f
Move react and react-dom to peerDependencies 2017-11-23 12:23:46 +02:00
Roman Hotsiy
2380da38ce
Update Changelog 2017-11-23 12:12:09 +02:00
Roman Hotsiy
a1604c609e
📝 Update readme 2017-11-23 11:57:07 +02:00
Roman Hotsiy
359e57d189
Menu items styling update 2017-11-23 11:53:08 +02:00
Roman Hotsiy
14566b3e30
Center logo 2017-11-23 11:38:18 +02:00
Roman Hotsiy
0faa66b6e6
Minor fixes before alpha 2017-11-23 11:28:05 +02:00
Roman Hotsiy
52e7bfb347
remove extra console.log-s 2017-11-22 23:40:19 +02:00
Roman Hotsiy
cec37df7aa
Security Definitions component 2017-11-22 23:38:38 +02:00
Roman Hotsiy
ed13bb0528
Merge theme deeply 2017-11-22 14:00:42 +02:00
Roman Hotsiy
0bd8c66090
Update jest snapshots 2017-11-22 13:27:07 +02:00
Roman Hotsiy
07eef93820
Implement sanitization (aka untrustedSpec option) 2017-11-22 13:26:28 +02:00
Roman Hotsiy
ce1f014f62
Add http-server npm task 2017-11-22 13:03:31 +02:00
Roman Hotsiy
37b6dff94b
Enhance ErrorBoundary component with stacktrace + version info 2017-11-22 13:02:56 +02:00
Roman Hotsiy
63dfdebf6a
Add version and revision to standalone bundle exports 2017-11-22 13:02:15 +02:00
Roman Hotsiy
57c424f6b5
Implement hideLoading + refactor Loading component 2017-11-22 12:42:57 +02:00
Roman Hotsiy
678cd9e536
Implement pathInMiddlePanel option 2017-11-22 10:57:51 +02:00
Roman Hotsiy
028e953f39
Implement nativeScrollbars option 2017-11-21 16:55:20 +02:00
Roman Hotsiy
0ab1c71cb6
Fix crash when content is empty map 2017-11-21 16:42:40 +02:00
Roman Hotsiy
5b3964e55b
minor update in hmr playground 2017-11-21 16:37:31 +02:00
Roman Hotsiy
f58ef3f0c9
fix crash for responses without content but with headers 2017-11-21 16:37:05 +02:00
Roman Hotsiy
f607b98866
Implement noAutoAuth option 2017-11-21 16:33:22 +02:00
Roman Hotsiy
a28e24ec92
Implement requiredPropsFirst opttion 2017-11-21 13:34:18 +02:00
Roman Hotsiy
f52a05a2b5
Implement expandResponses option 2017-11-21 13:00:33 +02:00
Roman Hotsiy
e85718225d
Implement hideHostname option 2017-11-20 22:36:21 +02:00
Roman Hotsiy
95f82b5e87
Fix sticky polyfill after moving it to StickySidebar component 2017-11-20 18:18:44 +02:00
Roman Hotsiy
8d84fa669c
Add validations to RedocStandalone component 2017-11-20 18:14:28 +02:00
Roman Hotsiy
c2f82cdc8b
Implement options and scrollYOffset option 2017-11-20 18:02:49 +02:00
Roman Hotsiy
6fbd47b340
Update Redoc Standalone API 2017-11-20 15:02:35 +02:00
Roman Hotsiy
1dabeebb3d
Do not reload page extra times in e2e tests 2017-11-20 13:55:32 +02:00
Roman Hotsiy
5438770267
Filter readOnly and writeOnly fields from request/response 2017-11-20 12:54:27 +02:00
Roman Hotsiy
f65dd955fa
fix tsconfig includes 2017-11-20 12:44:01 +02:00
Roman Hotsiy
141b9f6551
Add polyfills for IE11 2017-11-20 12:06:10 +02:00
Roman Hotsiy
6d7fd547b1
Fix sticky on Edge + IE11 2017-11-20 12:05:54 +02:00
Roman Hotsiy
c17178f28f
Remove compiled test 2017-11-20 12:04:07 +02:00
Roman Hotsiy
3e3a57402f
sticky sidebar 2017-11-20 02:18:43 +02:00
Roman Hotsiy
092d488a74
Fix setState run before mount 2017-11-20 01:00:43 +02:00
Roman Hotsiy
f0f1e4805b
include style-loader 2017-11-20 01:00:08 +02:00
Roman Hotsiy
64471c649a
Do not minify bundle.lib 2017-11-20 00:59:28 +02:00
Roman Hotsiy
adfc5e58c5
update deps 2017-11-20 00:10:55 +02:00
Roman Hotsiy
418f5cdf51
Fix e2e tests 2017-11-19 23:59:45 +02:00
Roman Hotsiy
bab7ce9f84
Fix bundles 2017-11-19 23:59:25 +02:00
Roman Hotsiy
f7374caf3c
fix webpack config ts issues 2017-11-19 23:26:41 +02:00
Roman Hotsiy
08034dc05f
webpack config in typescript 2017-11-19 22:40:59 +02:00
Roman Hotsiy
77f2a8b48e
clean up .travis.yml + README.md 2017-11-19 22:17:09 +02:00
Roman Hotsiy
7c7294913d
Move playground + fix perf benchmark 2017-11-19 22:11:40 +02:00
Roman Hotsiy
ec45c8582a
umd bundle 2017-11-19 21:37:47 +02:00
Roman Hotsiy
6dae49ac5f
Standalone ReDoc bundle + v1.x basic compatibility 2017-11-19 12:51:59 +02:00
Roman Hotsiy
49695c62c9
chore: release v1.19.3 2017-11-16 15:18:55 +02:00
Roman Hotsiy
d896ebca4d
Clean up 2017-11-15 16:33:02 +02:00
Roman Hotsiy
b79de20b3e
Add --profile to stats task 2017-11-15 16:16:44 +02:00
Roman Hotsiy
bc1e06fe37
Remove crypto hack after swagger2openapi update 2017-11-15 16:16:28 +02:00
Roman Hotsiy
1c5730ca27
Update deps 2017-11-15 16:15:05 +02:00
Roman Hotsiy
fef9ec476c
fix: html characters not escaped in code blocks (fixes #378)
if lang is not specified
2017-11-15 09:46:45 +02:00
Roman Hotsiy
bf255a4118
Add todo to Endpoint component 2017-11-14 23:41:20 +02:00
Roman Hotsiy
8e6b9e8380
Add OpenAPI 2.0 compatibility mode 2017-11-14 23:40:38 +02:00
Roman Hotsiy
71395868ef
Add stats npm task 2017-11-14 18:03:58 +02:00
Roman Hotsiy
9bc44fd1ae
fix bundle hanging 2017-11-14 18:03:40 +02:00
Roman Hotsiy
109d135959
Make ReDoc render sync + separate standalone componenet
- refactored usage of store so now <Redoc> is sync
- other minor refactors
2017-11-14 17:49:56 +02:00
Roman Hotsiy
0061a87496
Fix some tests 2017-11-14 12:54:08 +02:00
Roman Hotsiy
162ad11497
Default response should be error if there is sucessfull response 2017-11-14 12:53:56 +02:00
Roman Hotsiy
a5e4e2aeaa
chore: release v1.16.2 2017-11-10 19:52:57 +02:00
Roman Hotsiy
00aea066f0
fix: response samples doesn't show only text/plain (fixes #371) 2017-11-10 14:07:53 +02:00
Roman Hotsiy
595d5e02a9
chore: update deps 2017-11-08 14:11:28 +02:00
Bohdan Khorolets
dd3c98defa Remove target="_blank" from "Download" button 2017-10-22 09:02:16 -04:00
Roman Hotsiy
d1dbd4363f
chore: update react-dropdown to fix perf issue
Details: https://github.com/fraserxu/react-dropdown/pull/108
2017-10-12 10:46:56 +03:00
Roman Hotsiy
4c3b4aa589
Initial React rewrite 2017-10-12 00:01:37 +03:00
Roman Hotsiy
af81c33c99
v1.19.1 2017-10-02 10:52:19 +03:00
Roman Hotsiy
04e86065e3
fix: snapshot failing on constructor prop 2017-10-02 10:29:24 +03:00
Roman Hotsiy
278e5d7917
v1.19.0 2017-09-21 18:22:24 +03:00
Roman Hotsiy
f2ed92c69e
feat: add native-scrollbars option to workaround scrolling perf issues 2017-09-21 18:04:34 +03:00
Roman Hotsiy
d8b6e022b7
fix: HEAD http verb support
closes #342
2017-09-21 12:39:19 +03:00
Roman Hotsiy
ec64c6c4ad
chore: remove unused .eslintignore 2017-09-21 11:52:37 +03:00
Roman Hotsiy
869daaaca5
chore: use headless 🗡 😑 chrome instead of phantomjs 2017-09-21 11:51:46 +03:00
Roman Hotsiy
d304047139
chore: update deps 2017-09-21 11:48:10 +03:00
Roman Hotsiy
56d62e5ab2
feat: add ignoredHeaderParameters option 2017-09-21 11:36:18 +03:00
Roman Hotsiy
9aac636687
chore: clean non-used entry-point 2017-09-21 01:00:22 +03:00
Roman Hotsiy
d7b2af27a9 chore: downgrade to dropkickjs ~2.1.10
fixes #340
2017-09-19 18:23:13 +03:00
Phil Sturgeon
8d849a63da fix: Clearly label version compatibility
closes #338

Great idea from @ThatBrianDude
2017-09-11 22:10:37 +03:00
Roman Hotsiy
e39bdc244d
v1.18.1 2017-08-28 13:39:55 +03:00
Roman Hotsiy
35176b5f67
fix: crash if contact is not in the spec
closes #332
2017-08-28 13:39:55 +03:00
Roman Hotsiy
dd6dfa1f1a Add links to redoc.ly 🏗
[ci skip]
2017-08-28 12:33:26 +03:00
Roman Hotsiy
111bcdb0b9
v1.18.0 2017-08-28 11:11:40 +03:00
Daniel Chao
b165785064 Add margins around list-items in markdown
They're pretty tightly squeezed in there right now.
2017-08-21 12:16:00 +03:00
Roman Hotsiy
c819bd67ea Add new ReDoc logo to README 🖼, kudos to @cesarlevel 2017-08-17 23:35:34 +03:00
Roman Hotsiy
4516507535 chore: upload logo 2017-08-17 23:32:04 +03:00
Bohdan Khorolets
514fc297c4 fix: Increase padding top for .api-info-wrapper when left sidebar is hiding to avoid header overlaying by top menu. 2017-08-17 23:31:01 +03:00
Bohdan Khorolets
cb3d318e4a Closes #322: Feature request: Clickable logo that points to specific url 2017-08-17 23:31:01 +03:00
Roman Hotsiy
6b61d3aee1
chore: fix .editorconfig 2017-08-17 11:42:58 +03:00
Roman Hotsiy
60e8cb437a
feat: generate download link for specs defined by an object
closes #289
2017-08-17 11:42:12 +03:00
Roman Hotsiy
f792273be8
support x-example for parameters
closes #297
2017-08-17 11:26:02 +03:00
Roman Hotsiy
b84177c157
feat: support text-plain response sample
closes #270
2017-08-17 11:24:06 +03:00
Roman Hotsiy
955ef7101d
chore: remove some dead code 2017-08-17 10:28:22 +03:00
Bohdan Khorolets
86b4db468b Add display: inline-block for .openapi-button (#321) 2017-08-15 10:08:01 +03:00
Roman Hotsiy
d1562d5ff1
v1.17.0 2017-08-02 17:30:48 +03:00
Roman Hotsiy
eb7089b76c
feat: support for xml samples in response when there is no schema in response
closes #307
2017-08-02 17:14:40 +03:00
Roman Hotsiy
2c8953664a
fix: make padding between h2 sections smaller
fixes #291
2017-08-02 17:07:58 +03:00
Roman Hotsiy
be41d6d325
fix: ready-only for nested objects samples
fixes #300
2017-08-02 16:51:36 +03:00
Roman Hotsiy
cd962faba4
fix: copy code-samples included \n\r characters
fixes #296
2017-08-02 15:50:01 +03:00
Roman Hotsiy
8193194e7a
chore: remove analytics from local demo 2017-08-02 15:36:01 +03:00
Roman Hotsiy
2ebca4bb03
feat: add hide-loading option
closes #315
2017-08-02 15:35:26 +03:00
Roman Hotsiy
3009d18b39
chore: fix e2e tests in FF 2017-08-02 14:55:02 +03:00
Roman Hotsiy
2a0f226b73
chore: do not pullute dist folder 2017-08-02 14:55:02 +03:00
Jacob Baskin
86d8179e4f fix: Ioutput dates as ISO 8601 strings in JSON Formatter (#313)
kudos to @jacobbaskin
2017-08-01 19:16:17 +03:00
Roman Hotsiy
da9df29fdd
chore: update deps 2017-08-01 13:20:21 +03:00
Roman Hotsiy
37708009d1
upgrade firefox on saucelabs 2017-08-01 12:09:33 +03:00
Roman Hotsiy
3488a86ac5
chore: add missing ts-helpers dep 2017-07-23 13:48:15 +02:00
Roman Hotsiy
83622a5532
chore: temporarily disable tslint typecheck 2017-07-23 13:24:45 +02:00
Roman Hotsiy
ef5101b1f2
feat: export angular module <not stable yet> 2017-07-22 18:45:19 +02:00
Roman Hotsiy
cb2de97945
chore: fix demo dropdown and stars count 2017-07-22 17:05:18 +02:00
Roman Hotsiy
b9e714fc6f
chore: aot fixes 2017-07-22 17:04:54 +02:00
Roman Hotsiy
c79a301388
chore(packaging): include vendor and polyfills in exported files 2017-07-22 15:53:43 +02:00
Roman Hotsiy
5b49fbce92
chore(build): enable AOT for npm start:prod 2017-07-22 15:51:53 +02:00
Roman Hotsiy
6d423df2e9
chore: organize config files 2017-07-22 15:49:12 +02:00
Roman Hotsiy
5e5db72ea4
fix: handle case where items is array in indexer
fixes #304
2017-07-20 15:48:14 +02:00
George Wilson
6bb3bd8d21 chore: Fix TS issue on mouse event creation (#306) 2017-07-18 17:01:19 +02:00
Phil Sturgeon
039bbdb585 Spacing applied to aaaaalll li's 2017-07-14 11:34:16 +03:00
Roman Hotsiy
5d067d8f45
chore: improve styling of deprecated badge 2017-07-04 10:45:12 +03:00
Peter Golm
2748aac024 feat: Add special rendering for deprecated operations (#290)
* Add special rendering for deprecated operations

* Change styling of deprecated operation header
2017-07-04 10:15:22 +03:00
Roman Hotsiy
87d9abd62b
fix: enum with single value not shown in non-body params
closes #284
2017-07-02 18:54:51 +03:00
Roman Hotsiy
10cdfe59ee
chore: downgrade ff to 45 to fix e2e tests
FF after 45 crashes when selenium tries to get browser logs
2017-06-26 15:59:23 +03:00
Roman Hotsiy
8221cf8204
chore: downgrade FF on Saucelabs 2017-06-26 14:11:13 +03:00
Roman Hotsiy
13854aae56
Update dependencies 2017-06-26 12:52:33 +03:00
Roman Hotsiy
cfc14c8c7a
chore: release v1.16.1 2017-06-14 12:46:40 +03:00
Roman Hotsiy
5cc1208bb1
chore: fix tests 2017-06-14 11:27:50 +03:00
Roman Hotsiy
8e8d9d8995
chore: ts updates 2017-06-14 11:12:49 +03:00
Roman Hotsiy
2c836f8107
fix: sticky sidebar fix 2017-06-14 11:12:07 +03:00
Julien Feltesse
ae720bcf92 chore: use node-sass ^4.5.3, which supports NodeJS 8 (#282) 2017-06-13 23:55:54 +03:00
Roman Hotsiy
cd31c62ff5
fix: array of label on non-trivial fields
fixes #274
2017-06-02 10:14:18 +03:00
Roman Hotsiy
12b91b72ac
fix: Remove fka Swagger text from download button label 2017-06-02 09:41:59 +03:00
Roman Hotsiy
4dd8a0acdf
fix: update fix for #276 to not use className checking 2017-06-02 09:39:26 +03:00
Primož Pincolič
f50bfb1823 fix: (#276) Issue with stick sidebar when there is content above reDoc (#277)
fixes #276
2017-06-02 09:36:55 +03:00
Blake Erickson
75bb68c9ca Update README.md (#279)
fix discourse URL.
2017-06-01 17:19:19 +03:00
Skyler Lewis
a08c3b962e Use a small docker image (600MB savings) (#271) by @alairock
node 7                666 MB
node 7-alpine    59.1 MB
2017-05-24 12:36:23 +03:00
Roman Hotsiy
b4e2e9d47b
fix: links color in json sample 2017-05-24 10:28:40 +03:00
Roman Hotsiy
899419269b
fix: linkify in json formatter
closes #267
2017-05-24 10:24:39 +03:00
Roman Hotsiy
3d1108f447
chore(realease): v1.16.0 📦 2017-05-12 13:04:08 +03:00
Roman Hotsiy
f7b585c4ba
chore(deps): update inscure remarkable 2017-05-12 12:59:31 +03:00
Roman Hotsiy
bbdf1ad991 docs: add a security note 🛡 to README
[skip ci]
2017-05-12 12:51:22 +03:00
Roman Hotsiy
c0698bb215
fix: prevent possible xss using untrusted-spec option 2017-05-12 12:42:24 +03:00
Roman Hotsiy
7a5d315e09
fix: do not show discriminator dropdown if it is empty 2017-05-12 12:30:45 +03:00
Roman Hotsiy
131b437478
fix: URL changes so fast
fixes #252
2017-05-12 11:21:50 +03:00
Roman Hotsiy
cb106cc668
feat: display xml examples if present in response examples 2017-05-12 11:03:14 +03:00
Roman Hotsiy
d2c790fa14
chore: remove unused package 2017-05-08 14:11:38 +03:00
Roman Hotsiy
128b1fc1e2
chore(release): release v1.15.0 2017-05-05 13:51:16 +03:00
Roman Hotsiy
c08b0a9994
chore: revert "Replace david-dm badge with gemnasium"
[ci-skip]

This reverts commit fed2f378df.
2017-05-05 13:33:19 +03:00
Roman Hotsiy
50acb986f1
fix: (second chance) firefox and IE scroll sync after deps update 2017-05-05 13:31:24 +03:00
Roman Hotsiy
df4bb0a17f
tests: do not print warnings to console 2017-05-05 13:30:28 +03:00
Roman Hotsiy
ad04636073
fix: firefox and IE scroll sync after deps update 2017-05-05 13:07:11 +03:00
Roman Hotsiy
9f636cc411
chore: fix lint issues 2017-05-05 12:45:26 +03:00
Roman Hotsiy
60169f2193
chore: update deps 2017-05-05 12:45:26 +03:00
Roman Hotsiy
1eedbfeb98
fix: sample unavailable when no schema in response object 2017-05-05 12:45:26 +03:00
Roman Hotsiy
bb00dc3426
fix: menu service subscription leak + minor refactor 2017-05-05 12:45:26 +03:00
Roman Hotsiy
9ea672d921
refactor: remove not-needed animations 2017-05-05 12:45:25 +03:00
Roman Hotsiy
ef1b2bd19e
fix: menu items not full-width when short item names 2017-05-05 12:45:25 +03:00
Roman Hotsiy
e7130d2d04
feat: add triangle icon for expandable menu items 2017-05-05 12:45:25 +03:00
Roman Hotsiy
583c5719db
fix: openapi button add download attribute 2017-05-05 12:45:25 +03:00
Joe Honzawa
6edbbe7b0c fix: Slugifying non-ascii headers make duplicate permalinks (#264) 2017-05-03 11:01:53 +03:00
Roman Hotsiy
0341db4559
feat: clear button (x) in search box 2017-04-25 10:41:09 +03:00
Roman Hotsiy
6b363a5f44
fix: typo in download button classname (thanks @dwilding) 2017-04-25 10:36:35 +03:00
Roman Hotsiy
87de7d7180
build: finish script for CDN releases
closes #87, [skip ci]
2017-04-23 19:23:41 +03:00
Roman Hotsiy
71752aea02
v1.14.0 🎁 2017-04-23 19:16:09 +03:00
Roman Hotsiy
c6f351ea36
chore: export more from redoc.module 2017-04-23 18:01:24 +03:00
Roman Hotsiy
2d6ab83f70
chore: fix lint 2017-04-23 18:00:36 +03:00
Roman Hotsiy
e6f2e2eafb
chore: add perfect-scrollbar dependency 2017-04-23 17:43:18 +03:00
Roman Hotsiy
f7affbfb39
docs: add docs for path-in-middle-panel 2017-04-23 17:42:26 +03:00
Roman Hotsiy
cbce5c49ce
refactor: minor html cleanup 2017-04-23 16:12:00 +03:00
Roman Hotsiy
cdeee6740d
feat: add perfect-scrollbar for side menu 2017-04-23 16:10:32 +03:00
Roman Hotsiy
8a49fb30de
feat: SideMenu to support items template as a parameter 2017-04-23 15:44:41 +03:00
Roman Hotsiy
838f23380c
fix: subscription leak in side-menu 2017-04-23 15:43:56 +03:00
Roman Hotsiy
2409577e2f
refactor: minor css cleanup 2017-04-23 15:43:08 +03:00
Roman Hotsiy
328ae639d7
refactor: change hardcoded value with variable 2017-04-23 15:42:01 +03:00
Roman Hotsiy
74a319393c
feat: new option path-in-middle-panel 2017-04-23 15:39:36 +03:00
Roman Hotsiy
1a29784200
refactor: add type heading to menu items 2017-04-23 15:36:00 +03:00
Roman Hotsiy
c77e1a28f7
fix: ReDoc removes path if site is using history API
closes #257
2017-04-23 15:31:08 +03:00
Roman Hotsiy
388b3d48d5
feat: emphasize path with primary color in servers dropdown 2017-04-23 15:28:57 +03:00
Roman Hotsiy
9248cc2490
fix: endpoint link doesn't expand when click on arrow 2017-04-23 15:27:38 +03:00
Roman Hotsiy
2760a3410b
fix: remove trailing slash from url when use x-servers 2017-04-23 15:26:15 +03:00
Roman Hotsiy
bb3667d5d6
feat: add GH-like anchors to h1 and h2 headings in md 2017-04-23 15:23:20 +03:00
Roman Hotsiy
476d6c44fe
fix: don't show download button if initialized with an object 2017-04-23 15:22:04 +03:00
Roman Hotsiy
0f6f0359d9
fix: markdown block text color 💅
closes #255
2017-04-20 18:24:11 +03:00
Roman Hotsiy
f00b4f8695
chore: update changelog 🗞
[skip ci], closes #253
2017-04-19 17:02:49 +03:00
Roman Hotsiy
99811d9eed
v1.13.0 🎁 2017-04-19 14:22:58 +03:00
Roman Hotsiy
61fd42698d
new: http verb badges in search results 2017-04-19 13:43:17 +03:00
Roman Hotsiy
9c4bc5944f
chore: uncomment uglify + fix lint 2017-04-19 12:46:51 +03:00
Roman Hotsiy
c41f56d33c
chore: fix tests 2017-04-19 12:42:42 +03:00
Roman Hotsiy
7e36a9ba12
chored: add missing variables 2017-04-19 12:42:42 +03:00
Roman Hotsiy
7a09b4ac11
chore: disable authentication auto adding (part 2) 2017-04-19 12:42:42 +03:00
Roman Hotsiy
b265e85927
chore: add exports 2017-04-19 12:42:09 +03:00
Roman Hotsiy
4839b3ce69
chore: operation list minor refactor 2017-04-19 12:42:09 +03:00
Roman Hotsiy
6077cc6afd
fix: don't show contact if it is empty object 2017-04-19 12:42:09 +03:00
Roman Hotsiy
00b304a4be
new: option to disable authentication auto adding 2017-04-19 12:42:09 +03:00
Roman Hotsiy
0ee1476590
MenuService refactoring 2017-04-19 12:42:09 +03:00
Roman Hotsiy
92eec250e6
new: Add verbs badges (implements #61) 2017-04-19 12:42:09 +03:00
Roman Hotsiy
3f48357e39
chore: module build + export services 2017-04-19 12:42:09 +03:00
Vincent Giersch
303b49e918 fix: ul missing css 2017-04-18 11:56:19 +03:00
Khoa Tran
585b9cfb56 fix issue with loading https spec. See https://github.com/Rebilly/ReDoc/issues/243 2017-04-10 11:19:04 +03:00
Roman Hotsiy
8af268e69b
chore: release v1.12.1 2017-03-31 19:55:44 +03:00
Roman Hotsiy
4f4e7489ce
fix: use replace state instead of pushState
fixes #244
2017-03-31 19:53:03 +03:00
Roman Hotsiy
b9740bfe55
refactor: renamve Method to Operation 2017-03-30 15:18:26 +03:00
Roman Hotsiy
36a81ed662
Release v1.12.0 2017-03-29 17:47:35 +03:00
Roman Hotsiy
91cc74b793
chore: update dependencies 2017-03-29 13:37:20 +03:00
Roman Hotsiy
aaac434ebb
fix: add safeguard for undefined
closes #236
2017-03-29 13:30:55 +03:00
Roman Hotsiy
6aa3a7d863
fix: view errors were not reported 2017-03-29 13:29:54 +03:00
Roman Hotsiy
a9cad1994b
fix: code block formatting in markdown list
closes #242
2017-03-29 11:29:54 +03:00
Roman Hotsiy
2d7d4d3409
fix: fix anchor links accidentally broken 2017-03-29 11:25:30 +03:00
Roman Hotsiy
d52c7ef8a0
fix: update content-projector to latest ng4 2017-03-29 10:55:51 +03:00
Roman Hotsiy
2c8b2ce326
chore: simplify manual typings 2017-03-29 10:55:26 +03:00
Roman Hotsiy
34defb0d74
tests: remove crashing test 2017-03-27 10:39:33 +03:00
Roman Hotsiy
552c9b693c
chore: Update dependencies 2017-03-27 10:28:09 +03:00
Roman Hotsiy
6a283d484f
chore: return back removed uglify plugin 2017-03-27 10:27:48 +03:00
Roman Hotsiy
abae4c03c3
chore: fix tests 2017-03-15 17:53:25 +02:00
Roman Hotsiy
631dfc17dc
build: fix build with ng4 2017-03-15 17:53:25 +02:00
Roman Hotsiy
fb629fa7d7
chore: update yarn.lock 2017-03-15 17:53:25 +02:00
Roman Hotsiy
bed15dddc6
chore: upgrade to angular 4.x 2017-03-15 17:53:25 +02:00
Roman Hotsiy
9e0283849a Merge pull request #227 from brendo/support-x-examples-request
Support x-examples vendor extension for requests
2017-03-13 09:15:57 +02:00
Brendan Abbott
34390359b6 Merge branch 'development' into support-x-examples-request 2017-03-10 10:49:19 +10:00
Roman Hotsiy
7106838bb4
chore: update changelog 🗞
[skip ci]
2017-03-10 01:16:13 +02:00
Roman Hotsiy
afa5511973
Release v1.11.0 2017-03-10 00:38:15 +02:00
Roman Hotsiy
17fb7bad27
fix: support discriminator with parent type
closes #220
2017-03-10 00:34:08 +02:00
Roman Hotsiy
e4f5388076
fix: do not hang when swagger doesn't contain any paths
closes #216
2017-03-09 23:04:15 +02:00
Roman Hotsiy
3e09b0588a
fix: broken search after previous fixes 2017-03-09 22:37:17 +02:00
Roman Hotsiy
d99f2562ac
feat: support for OpenAPI object as a parameter for init
closes #224
2017-03-09 21:00:45 +02:00
Roman Hotsiy
1e96f88ea8
fix: redoc hangs when indexing recursive discriminator-based definitions
closes: #228
2017-03-09 19:59:59 +02:00
Roman Hotsiy
64e5741f67
fix: optimize and support inherited discriminator 2017-03-09 19:59:49 +02:00
Roman Hotsiy
193f4bfb44
fix: wrong warnings for $ref not single
closes #221
2017-03-09 19:58:13 +02:00
Roman Hotsiy
4899f3e08f
fix: x-extendedDiscriminator not working
closes #217
2017-03-09 19:57:55 +02:00
Roman Hotsiy
e99d66d9dd
feat: copy pretty-printed JSON
closes #219
2017-03-09 18:42:39 +02:00
Brendan Abbott
3c569cde6e Support x-examples vendor extension for requests 2017-03-09 20:55:23 +10:00
Brendan Abbott
6d73e2441a Merge pull request #1 from brendo/allow-json-like-examples-to-be-viewed
Allow JSON-like examples to be shown, which supports things like JSON API
2017-03-08 12:27:16 +10:00
Brendan Abbott
e72471feab Allow JSON-like examples to be shown, which supports things like JSON API 2017-03-06 17:54:52 +10:00
Roman Hotsiy
9ccfd52640
release: v1.10.2 2017-03-01 00:35:29 +02:00
Roman Hotsiy
8da0f7ed82
build: get rid of unused replacement plugin 2017-03-01 00:07:04 +02:00
Roman Hotsiy
929740ab28
fix: clear page fragment when scroll to the beginning 2017-03-01 00:01:42 +02:00
Roman Hotsiy
7b19417497
docs: update docs for x-tagGroup, add warning #215 2017-02-28 22:04:24 +02:00
Roman Hotsiy
fb3ca07d6e
fix: show warning for non-used in tagGroup tags
closes #215
2017-02-28 22:03:03 +02:00
Roman Hotsiy
387635b7a1
chore: update changelog 2017-02-27 18:50:53 +02:00
Roman Hotsiy
2bcff3a760
release: v1.10.1 2017-02-27 18:49:30 +02:00
Roman Hotsiy
69c7d983fb
fix: improve x-servers dropdown animation performance 2017-02-27 18:37:38 +02:00
Roman Hotsiy
258009b1f7
chore: update sample index.html with utf meta (credits @sarus) #213 2017-02-27 18:00:55 +02:00
Roman Hotsiy
53cef70cdc
chore: skip tab-sync e2e-test as it braks with no reason on IE 2017-02-27 17:53:37 +02:00
Roman Hotsiy
423b8754f2
chore: try to fix e2e tests on IE 2017-02-27 16:50:27 +02:00
Roman Hotsiy
6643d09a3a
fix: code samples language sync broken 2017-02-27 16:27:57 +02:00
Roman Hotsiy
c1dbb81aac
fix: broken code samples tabs in IE 2017-02-27 16:06:05 +02:00
Roman Hotsiy
c5b6ac47ac
chore: remove console.log 2017-02-27 16:05:33 +02:00
Roman Hotsiy
b2d4d7d4a4
release: v1.10.0 🎉 2017-02-27 13:34:02 +02:00
Roman Hotsiy
66c06b30b9
feat: update fragment while scrolling and on menu clicks
closes #138, #202
2017-02-27 13:13:38 +02:00
Roman Hotsiy
c724df48f4
feat: new option required-props-first
closes #191
2017-02-27 13:12:53 +02:00
Roman Hotsiy
ffcedeeb8e
docs: docs for 2017-02-27 08:49:57 +02:00
Roman Hotsiy
fa9b634126
Revert "fix: remove unused hide-hostname option"
This reverts commit 7031176330.
2017-02-26 01:59:18 +02:00
Roman Hotsiy
0323551ca1
update CHANGELOG 2017-02-26 01:53:50 +02:00
Roman Hotsiy
d1b9cb1a63
v1.9.0 2017-02-26 01:26:30 +02:00
Roman Hotsiy
8472045945
fix: long paths break EndpointLink ui 2017-02-26 01:25:53 +02:00
Roman Hotsiy
7031176330
fix: remove unused hide-hostname option
(unused since eba219e)
2017-02-26 01:00:23 +02:00
Roman Hotsiy
accd01659d
fix: do not crash if version is not string
closes #208
2017-02-26 01:00:23 +02:00
Roman Hotsiy
9d0dd25f30
feat: Color of "default" Response depends on other successful responses are specified
closes #197
2017-02-26 01:00:22 +02:00
Roman Hotsiy
d175a4d6ae
feat: show type string with minLength 1 as "non-empty"
closes #192
2017-02-26 01:00:17 +02:00
Roman Hotsiy
e76bcc3329
feat: improved type string with minLength == maxLength
closes #212
2017-02-26 01:00:17 +02:00
Roman Hotsiy
a1aefa4123
docs: docs for x-servers 2017-02-26 01:00:08 +02:00
Roman Hotsiy
fd49082db2
feat: Add support for x-servers 2017-02-26 00:59:49 +02:00
Roman Hotsiy
dcb97a5b96
build: exclude rxjs operators and testing from resulting bundle 2017-02-25 23:37:04 +02:00
Roman Hotsiy
f1bd4a7a82
chore: update yarn.lock 2017-02-25 23:31:36 +02:00
Roman Hotsiy
1b72557e02
chore: update changelog 2017-02-23 11:06:52 +02:00
Roman Hotsiy
942cd5dc53
v1.8.1 2017-02-22 17:51:37 +02:00
Roman Hotsiy
305a7c0669
chore: update dependencies 2017-02-22 17:50:33 +02:00
Roman Hotsiy
23e7847a67
fix: use items description if not present on top level
fixes: #206
2017-02-15 16:00:39 +02:00
Roman Hotsiy
b43a87d627
feat: autoscroll menu
implements #88
2017-02-14 14:39:03 +02:00
Roman Hotsiy
4d14c01e02
docs: Add real-life usages to README 2017-02-14 12:18:34 +02:00
Roman Hotsiy
a40d8d7dfe
chore: fix build on windows by specifying typesRoot
relates to #200
2017-02-14 12:17:14 +02:00
Roman Hotsiy
088dad8dca
chore: update dependencies 2017-02-14 12:01:09 +02:00
Roman Hotsiy
12289e5814
chore: move all peer and dependencies to devDependencies
related to #169
2017-02-14 11:26:10 +02:00
Roman Hotsiy
4acfc11148
fix: response samples - render description as markdown
fixes #190
2017-02-14 11:18:59 +02:00
Roman Hotsiy
77bc3c44fc
fix: take snapshot of schema to not overwrite inlined references
fixes #203
2017-02-14 10:49:42 +02:00
Roman Hotsiy
a5c03abbe4
fix: Fix extra slash if basePath is not present
fixes #201
2017-02-14 09:49:58 +02:00
Roman Hotsiy
defef011eb
Fix build: replace types node with webpack (#200) 2017-02-09 17:58:29 +02:00
Roman Hotsiy
a460dfa6ec
Tick next item in roadmap 2017-02-09 15:34:20 +02:00
Roman Hotsiy
5f909cac47
Add safe guards array without items (fixes #199) 2017-02-09 15:31:28 +02:00
Roman Hotsiy
ee36392164
Fix toggle icon width on IE (fixes #198) 2017-02-07 23:24:13 +02:00
Roman Hotsiy
8f44f25eda
Update changelog 2017-02-03 00:42:24 +02:00
Roman Hotsiy
8df06dcc19
v1.8.0 🚀 2017-02-02 23:47:07 +02:00
Roman Hotsiy
6fcee29b54
Fix crash trying to index empty tags list 2017-02-02 23:35:06 +02:00
Roman Hotsiy
05be7561f0
Undeprecate x-traitTag 2017-02-02 23:24:00 +02:00
Roman Hotsiy
8c5251688f
Upgrade to latest deps
This reverts commit 5dbf413706.
2017-02-02 23:22:41 +02:00
Roman Hotsiy
a2d355a981
Fix tests 2017-02-02 23:13:41 +02:00
Roman Hotsiy
076fca15a4
Render externalDocs (resolves #103) 2017-02-02 23:13:41 +02:00
Roman Hotsiy
a93cd49123
Fix wrapping problem (fixes #185) 2017-02-02 23:13:41 +02:00
Roman Hotsiy
3daeffc452
Add subcategory to demo spec 2017-02-02 23:13:41 +02:00
Roman Hotsiy
9b6a97fc64
Fix latest empty menu-items not getting active (#194) 2017-02-02 23:13:41 +02:00
Roman Hotsiy
555767feb5
Search fixes 2017-02-02 23:13:40 +02:00
Roman Hotsiy
82575d6a77
Fix tests + don't crash on non-existing menu-items 2017-02-02 23:13:40 +02:00
jsmartfo
d9bec1bd6a
fix(heading): fix for headings render making failsafe, adding test, adjusting some commentary and spelling/typos 2017-02-02 23:13:40 +02:00
Roman Hotsiy
c4f25cc53d
Index description 2017-02-02 23:13:40 +02:00
Roman Hotsiy
7fa850b41d
Refactor markdown headings parsing 2017-02-02 23:13:40 +02:00
Roman Hotsiy
1ff87ce665
More Swagger Typings + index headers 2017-02-02 23:13:40 +02:00
Roman Hotsiy
71edfafae2
Minor redoc-search ui-fixes 2017-02-02 23:13:40 +02:00
Roman Hotsiy
072ab15cae
Redoc search styling 2017-02-02 23:13:40 +02:00
Roman Hotsiy
18fe4bd748
install swagger spec typings 2017-02-02 23:13:40 +02:00
Roman Hotsiy
b8a96e25fe
fix tests 2017-02-02 23:13:40 +02:00
Roman Hotsiy
1aee332a90
Add new libs to yarn.lock 2017-02-02 23:13:40 +02:00
Roman Hotsiy
68a2430da4
Fix using old Zippy option 2017-02-02 23:13:40 +02:00
Roman Hotsiy
c205e3beae
minimal node version 6.9.x 2017-02-02 23:13:40 +02:00
Roman Hotsiy
c52703f1ed
Fix search inside circular discriminators 2017-02-02 23:13:40 +02:00
Roman Hotsiy
6e13acbc64
Index and search inside discriminator 2017-02-02 23:13:40 +02:00
Roman Hotsiy
86f3a895a3
Index parameters 2017-02-02 23:13:40 +02:00
Roman Hotsiy
e1ce5ea316
Basic Indexing + search 2017-02-02 23:13:40 +02:00
Roman Hotsiy
21a3ab0b1f
minor fix in maker serivce 2017-02-02 23:13:40 +02:00
Roman Hotsiy
e164590fca
Expanding nested schemas by absolute pointer 2017-02-02 23:13:40 +02:00
Roman Hotsiy
46f6b29547
Lazy search highlight + basic search 2017-02-02 23:13:39 +02:00
Roman Hotsiy
fed2f378df
Replace david-dm badge with gemnasium [ci skip] 2017-02-02 10:50:39 +02:00
Roman Hotsiy
60c9ef59bc Update README.md 2017-01-31 12:18:28 +02:00
Roman Hotsiy
8fa5f99b0c
Update code-samples gif 2017-01-31 12:14:06 +02:00
Roman Hotsiy
c6b1fc8e72
Enhance README 2017-01-31 12:09:46 +02:00
Roman Hotsiy
5bbdc1e2a8
fix demo 2017-01-31 11:00:17 +02:00
Roman Hotsiy
5dbf413706
Temporeraly revert upgrade to protractor 5
Until https://github.com/angular/protractor/pull/3963 is merged

This reverts commit 117d5bf9ec.
2017-01-28 21:23:38 +02:00
Roman Hotsiy
8762ea4647
Enable cache for yan on travis 2017-01-28 14:45:00 +02:00
Roman Hotsiy
6b0b217355
Remove uncompatible v8-lazy-parse-plugin 2017-01-28 14:06:25 +02:00
Roman Hotsiy
43e64a9fe6
Use yarn 2017-01-28 13:27:36 +02:00
Roman Hotsiy
dd3597c8bc
Upgrade to latest angular 2017-01-28 13:27:10 +02:00
Roman Hotsiy
117d5bf9ec
Upgrade to protractor 5 2017-01-28 13:26:45 +02:00
Roman Hotsiy
ce9d9b5ff0
fix protractor tests 2017-01-12 17:05:11 +02:00
Roman Hotsiy
0a07aedc1f
update string-replace-webpack-plugin (fix peerDep warning) 2017-01-12 17:01:44 +02:00
Roman Hotsiy
024e5f61ba
Update minimum node version 2017-01-12 15:47:08 +02:00
Roman Hotsiy
c90731512b
Update stream-http to the latest version (fixes 178) 2017-01-12 15:30:47 +02:00
Roman Hotsiy
9de94cbb23
Update dev dependencies 2017-01-12 15:28:57 +02:00
Roman Hotsiy
58ccf3938d
Move some templates + css into separate files 2017-01-07 18:23:08 +02:00
Roman Hotsiy
899c2b8398
Add a few tests + remove unused code 2017-01-07 18:05:08 +02:00
Roman Hotsiy
12c3e31f64
Don't build module + update package.json scripts 2017-01-06 23:01:20 +02:00
Roman Hotsiy
049094f179
Development tools refactor
- common webpack config
  - use latest karma-coverage + remap-istanbul
  - use webpack-ngc instead of ngc buildstep
  - update dev dependencies
  - use V8LazyParseWebpackPlugin
2017-01-06 21:38:04 +02:00
Roman Hotsiy
ec7803eecf
Fix e2e test 2017-01-06 14:56:42 +02:00
Roman Hotsiy
2a6085daf2
Update CHANGELOG 2017-01-06 14:46:53 +02:00
Roman Hotsiy
0a794f4996
Update CHANGELOG 2017-01-06 14:42:46 +02:00
Roman Hotsiy
90252fa0e1
v1.7.0 2017-01-06 14:06:08 +02:00
Roman Hotsiy
ab14bf4dc9
Fix right panel overlaps site-footer 2017-01-06 13:22:38 +02:00
Roman Hotsiy
067a847716
Bring back side-menu animations 2017-01-06 13:14:47 +02:00
Roman Hotsiy
177bffb1c3
Merge branch 'menu-refactor' 2017-01-06 12:58:15 +02:00
Roman Hotsiy
3c0d7301c8
Minor fix in menu 2017-01-06 12:56:24 +02:00
Roman Hotsiy
1d7e0b0e90
do not capitalize method summuary in level-1 menu 2017-01-06 12:56:24 +02:00
Roman Hotsiy
658a3b9ae3
Add groups to demo spec 2017-01-06 12:56:24 +02:00
Roman Hotsiy
0d3580e21f
Add warnings for non-used or non-existing tags in groups 2017-01-06 12:56:24 +02:00
Roman Hotsiy
73bfb18282
Fix response list for shared schemas (fixes #177) 2017-01-04 14:49:49 +02:00
Roman Hotsiy
dd188d6fe0 Merge pull request #175 from jaingaurav/menu-refactor
Add support for second-level headings from Markdown docs
2017-01-04 12:13:34 +02:00
Gaurav Jain
3eeeb6a3fb Add support for second-level headings from Markdown docs 2016-12-30 13:20:16 -08:00
Roman Hotsiy
77877381a8
v1.6.4 2016-12-28 15:12:42 +02:00
Roman Hotsiy
892d4f0082
disable cors for dev demopage 2016-12-28 15:11:43 +02:00
Roman Hotsiy
86c0dcbfe1
Support inherited discriminator (only one at the moment) 2016-12-28 14:15:05 +02:00
Roman Hotsiy
f902abd5f1
add x-tagGroups docs 2016-12-25 23:47:33 +02:00
Roman Hotsiy
779a3a2db2
disable webpack perf warnings for tests 2016-12-25 19:15:40 +02:00
Roman Hotsiy
84f3aee681
Update tests after refactoring 2016-12-25 19:15:24 +02:00
Roman Hotsiy
cd066904d7
fix lint warnings 2016-12-25 17:16:33 +02:00
Roman Hotsiy
6a7f0238d3
Update safari workaround 2016-12-25 17:15:01 +02:00
Roman Hotsiy
90ae0448eb
Add support for grouping items in menu 2016-12-25 17:14:31 +02:00
Roman Hotsiy
c41ffe8209
Continue menu refactor 2016-12-25 14:24:58 +02:00
Roman Hotsiy
97949a17f9
Adapt menu service and lazy-tasks to new menu strcuture 2016-12-24 11:18:25 +02:00
Roman Hotsiy
398aa60a46
Update Method list to work with new menu structure 2016-12-24 11:18:25 +02:00
Roman Hotsiy
ac0681c8a9
Update side menu to work with new menu structure 2016-12-24 11:18:25 +02:00
Roman Hotsiy
de00c7868a
Split menu generation in two stages 2016-12-24 11:18:24 +02:00
Roman Hotsiy
d3af2e6867
Fix minor issue in webpack dev config 2016-12-23 00:40:41 +02:00
Roman Hotsiy
17fd100da4
Uncomment animation after upgrage to latest ng2 (resolves #162) 2016-12-22 01:36:04 +02:00
Roman Hotsiy
1c5ef2e2b3
update dependecies 2016-12-22 01:36:04 +02:00
Roman Hotsiy
4e1fe68abb
update .gitignore 2016-12-22 01:36:04 +02:00
Roman Hotsiy
d050ccf4e8 Merge pull request #170 from agallou/patch-1
fix version number in changelog
2016-12-20 11:51:15 +02:00
Adrien Gallou
0c8f5d5c21 fix version number in changelog 2016-12-20 10:09:55 +01:00
Roman Hotsiy
ab002ba113
Fix crash on MS Edge (fixes #166) 2016-12-20 00:32:29 +02:00
Roman Hotsiy
1f855f7bb9
Update changelogs 2016-12-20 00:28:39 +02:00
Roman Hotsiy
f3a92450ec
v1.6.3 2016-12-19 23:13:14 +02:00
Roman Hotsiy
dbf39d3d51
Update angular and deps 2016-12-19 22:58:39 +02:00
Roman Hotsiy
8cd4e86371
Update webpack and stick to ts@2.0.9 (fixes #36) 2016-12-19 22:43:16 +02:00
Roman Hotsiy
cc8e0f6ba5
Fix linting errors 2016-12-19 17:36:44 +02:00
Roman Hotsiy
104bcb9cef
Fix leaks (fixes #167) 2016-12-19 17:13:39 +02:00
Roman Hotsiy
95f2da8b97
add expand-responses option 2016-12-14 14:49:02 +02:00
Roman Hotsiy
03e779c0d1
provide static APP_ID 2016-12-13 08:10:18 +02:00
Roman Hotsiy
bba35337e6
Use markdown for response description (fixes #158) 2016-12-13 08:09:27 +02:00
Roman Hotsiy
a3786847d2
Disable side-menu animation (workaround for #162) 2016-12-12 15:46:36 +02:00
Roman Hotsiy
06adadef2e Update README.md [skip ci] 2016-12-11 22:57:22 +02:00
Roman Hotsiy
8a23ac67f1 Update CHANGELOG.md 2016-12-11 22:54:09 +02:00
Roman Hotsiy
cfc5c04e20
v1.6.2 2016-12-11 21:00:30 +02:00
Roman Hotsiy
6b2cc6d4ff Merge pull request #159 from Jean-Daniel/patch-1
Fix typo in vendor extension doc.
2016-12-08 11:43:27 +02:00
Jean-Daniel
e18cd4bca8 Fix typo 2016-12-08 10:40:00 +01:00
Roman Hotsiy
16aa286c25
Use markdown in responses description (closes #158) 2016-12-07 19:27:13 +02:00
Ben Firshman
82b52bf6ef Add display name for tags
In go-swagger, the name of the tag determines the directory that
generated files end up in. Also, we want the tag names to be
consistent with operationIds.

Unfortunately, these make bad names for menu items, so we want
to have a way of specifying human-friendly names for the menu.
2016-12-05 20:58:53 +02:00
Ben Firshman
ab5c3ecf55 Fix typo in filename 2016-12-05 20:58:53 +02:00
Roman Hotsiy
7b42507c0b Update CHANGELOG 2016-12-02 13:20:40 +02:00
Roman Hotsiy
82f4598a5b
Activate first menu item if first cat is headless 2016-12-02 12:53:47 +02:00
Roman Hotsiy
8731adf2a3
Fix regression: side panel overlaps footer 2016-12-02 12:53:09 +02:00
Roman Hotsiy
00703e0ed0
v1.6.1 2016-12-02 12:25:58 +02:00
Roman Hotsiy
d63ca7de03
disable tsc no-unused checks 2016-12-02 12:11:17 +02:00
Roman Hotsiy
370b164b5f
Remove some unused declarations 2016-12-02 12:11:17 +02:00
Roman Hotsiy
7d9503d67d
Fix only the first instance of schema was rendered (fixes #150) 2016-12-02 12:11:17 +02:00
Roman Hotsiy
f8df377d56
Fix ng animation crash after angular upgrade 2016-12-02 12:11:17 +02:00
Roman Hotsiy
cc4688fd5d
Don't show error screen for runtimes after render finished 2016-12-02 12:11:17 +02:00
Roman Hotsiy
1855d2bd38
Fix linter/tsc errors 2016-12-02 12:11:17 +02:00
Roman Hotsiy
14074856b6
Enable more strict checks for linter/tsc 2016-12-02 12:11:16 +02:00
Roman Hotsiy
5c6d57ab2c
Fix content projector after angular2 update 2016-12-02 12:11:16 +02:00
Roman Hotsiy
73ec40072d
Update deps 2016-12-02 12:11:16 +02:00
Roman Hotsiy
0e8402aa0a Update README.md 2016-12-02 08:00:14 +02:00
Roman Hotsiy
b29da8cb1b Update CHANGELOG.md 2016-12-01 07:40:40 +02:00
Roman Hotsiy
937c2a10ba
v1.6.0 🙌 2016-11-30 18:41:27 +02:00
Roman Hotsiy
71a48e0de8
UI: Improve paramters spacing 2016-11-30 18:25:52 +02:00
Roman Hotsiy
ad1e1ac272
Fix mmobile menu z-index 2016-11-30 18:17:33 +02:00
Roman Hotsiy
6bb521e1d8
Merge branch 'performance-fix'🎉 2016-11-30 18:06:10 +02:00
Roman Hotsiy
98f36daff8
Enable lazyRendering for demo-pages 2016-11-30 13:26:56 +02:00
Roman Hotsiy
fc46931551
Add lazyRendering option 2016-11-30 13:23:24 +02:00
Roman Hotsiy
e50055286b
Uncomment debug mode 2016-11-30 11:55:38 +02:00
Roman Hotsiy
833f98167a
Activate virtual and emtpy menu items 2016-11-30 11:55:38 +02:00
Roman Hotsiy
932b2c95c9
Fix styling 2016-11-30 11:55:38 +02:00
Roman Hotsiy
a8b96e8bd1
Fix lint err + enable test 2016-11-30 11:55:38 +02:00
Roman Hotsiy
c0e33bff61
Disable menu items until corresponding content is rendered 2016-11-30 11:55:38 +02:00
Roman Hotsiy
4f79d4950a
Don't initial scroll if hash is empty 2016-11-30 11:55:37 +02:00
Roman Hotsiy
0f580eeed0
Fix tests + other minor fixes 2016-11-30 11:55:37 +02:00
Roman Hotsiy
4208660a6f
Perfromance fix (tests still failing) 2016-11-30 11:55:37 +02:00
Roman Hotsiy
5bd0ac2d11
Fix read-only fields appear in request samples (fixes #142) 2016-11-29 21:54:37 +02:00
Roman Hotsiy
878d3191f9 README: Add button link to yeoman-generator 2016-11-29 19:11:39 +02:00
Roman Hotsiy
7e7db9f36e
Enable cors-proxy 2016-11-29 17:54:21 +02:00
Roman Hotsiy
a8285b2652
Update webpack to the latest beta 2016-11-29 09:20:11 +02:00
Roman Hotsiy
aef4039949
Update changelog with the new versions 🎉 (closes #148) 2016-11-29 09:01:19 +02:00
Roman Hotsiy
a5c14e36ef
Add links to changelog 2016-11-29 09:00:33 +02:00
Roman Hotsiy
0ad7f4fdc9
v1.5.2 2016-11-28 20:08:58 +02:00
Roman Hotsiy
c281c62b36
Fix object to become an array (#146) 2016-11-28 20:03:01 +02:00
Roman Hotsiy
19bc9227f4
Wrap api version in span with class (fixes #145) 2016-11-28 16:18:54 +02:00
Roman Hotsiy
d8f08be770
Add support for collectionFormat 2016-11-28 16:15:09 +02:00
Roman Hotsiy
28ebb5c649
Lock ng to minor version 2016-11-28 15:29:47 +02:00
Roman Hotsiy
31373bd965
Fix reference resolution from external files (fixes #96) 2016-11-08 11:02:36 +02:00
Roman Hotsiy
8e074c6319
Update openapi-sampler to 0.3.3 (fixes #137) 2016-11-08 10:03:15 +02:00
Roman Hotsiy
e00dd87921
fix build 2016-11-05 16:25:59 +02:00
Roman Hotsiy
efcb811151
Fix allOf withing array items (fixes #136) 2016-11-05 16:08:39 +02:00
Roman Hotsiy
d1862ecea0
typo fix 2016-11-02 13:59:42 +02:00
Roman Hotsiy
2756b4bebf
Add new badges 2016-11-02 13:57:49 +02:00
Roman Hotsiy
0a939d1548
Fix crashing on array without items (fixes #104) 2016-11-02 13:39:01 +02:00
Roman Hotsiy
2ac8b3af3c
v1.5.1 2016-11-02 12:37:46 +02:00
Roman Hotsiy
9e661c4a7d
build module + bundle only on tags: now working 2016-11-02 12:27:02 +02:00
Roman Hotsiy
ee1c6a934f
build module + bundle only on tags 2016-11-02 12:18:11 +02:00
Roman Hotsiy
1f64346584
Fix content scrolling on language switch (#130) 2016-11-02 11:37:33 +02:00
Roman Hotsiy
1eb1d2aa7b
fix unit tests 2016-11-02 10:40:06 +02:00
Roman Hotsiy
1db46b4501
Fix syntax error 2016-11-02 09:05:00 +02:00
Roman Hotsiy
fe53a3d7d0
add comments 2016-11-02 00:20:01 +02:00
Roman Hotsiy
4b6cc2ea79 Merge pull request #132 from bfirsh/docker-development-environment
Add Docker development environment
2016-11-01 23:32:40 +02:00
Roman Hotsiy
88362bd16c Merge pull request #131 from bfirsh/add-hide-hostname-option
Add option to hide hostname in method definition
2016-11-01 23:32:06 +02:00
Ben Firshman
c1de34703a
Add Docker development environment 2016-11-01 11:56:06 -07:00
Ben Firshman
2453ffb11b
Add option to hide hostname in method definition
This allows ReDoc to be used for self-hosted tools where the
hostname may not be known.
2016-11-01 11:44:22 -07:00
Roman Hotsiy
6b2186ba9a
remove too big spec from e2e test 2016-11-01 17:23:51 +02:00
Roman Hotsiy
77eeb53a48
Render pattern property (#42) 2016-11-01 17:21:32 +02:00
Roman Hotsiy
9d4a903ef2
Start refactoring css + minor UI improvements 2016-11-01 17:00:52 +02:00
Roman Hotsiy
22494e125f
remove unused import from webpack config 2016-11-01 16:59:29 +02:00
Roman Hotsiy
93e7ed04f7
Remove codeclimate 2016-11-01 16:59:06 +02:00
Roman Hotsiy
e31e7c6798
update dependencies 2016-11-01 16:58:48 +02:00
Roman Hotsiy
f89bf8fd60
Add description for securityDefinitions 2016-11-01 10:08:54 +02:00
Roman Hotsiy
8a5804f311
Fix sourcemaps after livereload 2016-11-01 09:57:06 +02:00
Roman Hotsiy
cf6b03c2ae
v1.5.0 2016-10-31 21:13:26 +02:00
Roman Hotsiy
1e152f96f0
fix build 2016-10-31 21:09:55 +02:00
Roman Hotsiy
27aab501a9
Update angular to the latest version 2016-10-31 20:16:11 +02:00
Roman Hotsiy
1aa9c4a3f2
Fix e2e and unit tests 2016-10-31 20:15:56 +02:00
Roman Hotsiy
4aa212547f
Replace :host from non-angular stylesheet 2016-10-31 20:15:13 +02:00
Roman Hotsiy
5b17dc36cf
Enable noEmitHelpers in tsconfig 2016-10-31 19:27:59 +02:00
Roman Hotsiy
cef8631b89
Exclude too big spec from e2e 2016-10-31 19:26:58 +02:00
Roman Hotsiy
a0771d12c0
Enable markdown for securitydefinition description 2016-10-31 19:23:34 +02:00
Roman Hotsiy
ca654511ae
Fix side menu items wrong sync with description headers 2016-10-31 13:34:42 +02:00
Roman Hotsiy
9955cb8fec
Security definitions docs 2016-10-31 12:32:17 +02:00
Roman Hotsiy
9e7ba0ea8d
Deprecate x-traitTag 2016-10-31 12:32:03 +02:00
Roman Hotsiy
84349a451a
Fix dev servers and scss files (fixes #97) 2016-10-31 11:03:15 +02:00
Roman Hotsiy
0a2bede7a9
Fix e2e 2016-10-31 10:15:15 +02:00
Roman Hotsiy
9389d7dc15
Fix unit tests 2016-10-31 10:15:04 +02:00
Roman Hotsiy
a94afe5f2d
Fix error handler 2016-10-31 09:16:39 +02:00
Roman Hotsiy
b8b3bf328e
Security Definitions + other 2016-10-30 17:58:06 +02:00
Roman Hotsiy
f786955442
Dynamic component instantiator from html 2016-10-30 17:57:26 +02:00
Roman Hotsiy
c39166266c
Refactor markdown renderer 2016-10-30 17:56:24 +02:00
Roman Hotsiy
44cd7784aa
Redoc error handler refactor 2016-10-30 17:55:36 +02:00
Roman Hotsiy
c95755718f
Get rid of facade/lang deps (fixes #129) 2016-10-29 12:31:56 +03:00
Roman Hotsiy
f3b7c13ae0
Fix npm2 peer/deps issue (#127) 2016-10-23 20:36:55 +03:00
Roman Hotsiy
5583c8a313
Enabled a few codelyzer rules 2016-10-23 20:36:34 +03:00
Roman Hotsiy
17e7bf9fd8
Refactor + minor fixes/optimizations 2016-10-23 20:18:42 +03:00
Roman Hotsiy
76035c84d7
Merge branch 'amanganiello90-master' 2016-10-20 11:38:28 +03:00
Roman Hotsiy
caec0f0beb
Merge branch 'master' of https://github.com/amanganiello90/ReDoc into amanganiello90-master 2016-10-20 11:37:45 +03:00
Roman Hotsiy
221fd7bf7b
separate RedocModule from AppModule 2016-10-20 11:34:48 +03:00
Roman Hotsiy
5978c8dc5b
rename external jquery for module build 2016-10-18 17:46:41 +03:00
Roman Hotsiy
22c9a5ba8e
remove TS_RULE customization 2016-10-18 17:44:54 +03:00
Roman Hotsiy
4cff1fa67b
try fix build again 2016-10-18 17:34:18 +03:00
Roman Hotsiy
3d64a536e7
fix build 2016-10-18 17:21:25 +03:00
Roman Hotsiy
027408fc81
v1.4.1 2016-10-18 17:06:28 +03:00
Roman Hotsiy
ae6f4567a1
Emit helpers for module build 2016-10-18 17:06:00 +03:00
Roman Hotsiy
7045591ad6
update openapi-sampler 2016-10-18 16:37:21 +03:00
Roman Hotsiy
d8c91659cc
Update CHANGELOG 2016-10-14 13:20:17 +03:00
Roman Hotsiy
0fc80429ac
v1.4.0 2016-10-14 12:41:35 +03:00
Roman Hotsiy
ad7b236ef7
fix lint 2016-10-14 12:34:44 +03:00
Roman Hotsiy
7fee427ba2
build module before npm publish 2016-10-14 12:19:53 +03:00
Roman Hotsiy
b3de9f98ae
Add peers to devDeps 2016-10-14 12:15:32 +03:00
Roman Hotsiy
04d56f59e1
Fix minimum/maximum zero not rendered (fixes #123) 2016-10-14 12:00:08 +03:00
Roman Hotsiy
02b061cbd8
Build and publish angular2 module (fixes #126) 2016-10-14 11:44:48 +03:00
Roman Hotsiy
5597a58846
Do spec load after bootstrap 2016-10-14 11:44:18 +03:00
Roman Hotsiy
f9a3e42f15
Fix destroy/reinit 2016-10-12 23:05:30 +03:00
Roman Hotsiy
59a3ddf2d0
v1.3.3 2016-09-28 09:55:59 +03:00
Roman Hotsiy
0678c4c595
implemented x-extendedDiscriminator to workaround name clashes in big specs 2016-09-28 09:36:21 +03:00
Roman Hotsiy
3ab25b9ff8
Add engines to package.json, fixes #83 2016-09-28 09:33:56 +03:00
Roman Hotsiy
79693e1b27
Fix npm start on windows, fixes #119, #118 2016-09-28 00:30:33 +03:00
Roman Hotsiy
f02a23b280
Update webpack to latest beta 2016-09-27 09:03:04 +03:00
Roman Hotsiy
546fccb796
Update angular to 2.0.1 2016-09-27 09:02:49 +03:00
amanganiello
0c7357ac13 test linux fix issue #116 2016-09-22 09:57:44 +02:00
amanganiello
c1f1944cae fix issue #116 2016-09-22 09:13:29 +02:00
Roman Hotsiy
6cc525e594 Update local dev steps (fixes #114) 2016-09-20 18:28:42 -04:00
Roman Hotsiy
6a5e03cab9
Update openapi-sampler lib (#111) 2016-09-17 09:52:57 -04:00
Roman Hotsiy
476272224a
v1.3.2 2016-09-13 01:35:34 +03:00
Roman Hotsiy
6f16592680
fix v1.x.x deployment 2016-09-13 01:35:00 +03:00
Roman Hotsiy
2da84ec20d
Fix broken tabs styling for response samples 2016-09-13 01:34:24 +03:00
Roman Hotsiy
822d84c9f8
v1.3.1 2016-09-13 00:09:23 +03:00
Roman Hotsiy
39db6e8462
Fix schema collapse after change discriminator 2016-09-12 23:54:35 +03:00
Roman Hotsiy
c768512913
Fix default value for falsy values is not displayed (#109) 2016-09-12 23:54:35 +03:00
Roman Hotsiy
511415ca06
Fix default hostname #108 2016-09-12 23:54:35 +03:00
Roman Hotsiy
38944193dd Merge pull request #107 from MikeRalphson/patch-1
Typo s/IGNORRED/IGNORED
2016-09-08 22:08:10 +03:00
Mike Ralphson
fb0defa04c Typo s/IGNORRED/IGNORED 2016-09-08 19:31:17 +01:00
Roman Hotsiy
7809b5d282 Merge pull request #106 from bennyn/patch-1
Fixed indentation
2016-09-08 14:16:42 +03:00
Benny Neugebauer
96dd49e27b Fixed indentation 2016-09-08 12:19:33 +02:00
Roman Hotsiy
2b364d2697 Merge pull request #105 from adamd/patch-1
Just a little typo
2016-09-08 00:48:38 +03:00
Adam DuVander
553ee8091f Just a little typo 2016-09-07 14:41:10 -07:00
Roman Hotsiy
8a395d268c Merge pull request #102 from LeFnord/master
Makes basePath optional
2016-09-06 12:07:15 +03:00
LeFnord
719dfbfa13 makes basePath optional 2016-09-06 10:52:31 +02:00
Roman Hotsiy
28fb22827f
Updated deps 2016-09-02 23:26:33 +03:00
Roman Hotsiy
52c2233534
Smaller bundle size by removing esprima dep from bundle 2016-09-02 23:24:51 +03:00
Roman Hotsiy
a14bde334b
Update to latest Angular RC.6 2016-09-02 23:18:43 +03:00
Roman Hotsiy
dedf81caa0
Update CHANGELOG 2016-09-01 11:54:25 +03:00
Roman Hotsiy
dd68600476
v1.3.0 2016-09-01 10:08:17 +03:00
Roman Hotsiy
d3ef8f003c
Fix e2e tests + minor refactoring 2016-09-01 09:54:28 +03:00
Roman Hotsiy
34d8230f8b
Revert "Not run extra prod build on simple CI run" - npm runs prebublish on install :(
This reverts commit 74d384086f.
2016-08-31 23:56:26 +03:00
Roman Hotsiy
74d384086f
Not run extra prod build on simple CI run 2016-08-31 23:52:54 +03:00
Roman Hotsiy
4066362ab9
Add + fix tests 2016-08-31 23:51:56 +03:00
Roman Hotsiy
a8d98b127b
Fixed side menu overlapped site footer (#75) 2016-08-31 23:34:14 +03:00
Roman Hotsiy
b649d52c39
x-nullable support for non-object schemas 2016-08-31 22:45:59 +03:00
Roman Hotsiy
40c40cd327
Add x-nullable to the docs 2016-08-31 22:45:34 +03:00
Roman Hotsiy
b2cd855aa8
Make e2e less verbose + minor fixes 2016-08-31 22:04:37 +03:00
Roman Hotsiy
acaf54b28f
Fix code samples are not shown for operations without body param (#93) 2016-08-31 22:04:37 +03:00
Roman Hotsiy
3d3bcbe27f Merge pull request #95 from kedashoe/x-nullable
support "x-nullable" property
2016-08-31 22:02:52 +03:00
kedashoe
027cdc19c8 support "x-nullable" property 2016-08-31 11:36:18 -07:00
Roman Hotsiy
22eff033e3 Merge pull request #94 from kedashoe/ts-string-vs-String
give type "string" for pipe transforms
2016-08-31 21:30:55 +03:00
kedashoe
1f53d94053 give type "string" for pipe transforms 2016-08-31 11:23:06 -07:00
Roman Hotsiy
2be02c5aa1
Fix broken order in discriminator dropdowns 2016-08-30 21:29:56 +03:00
Roman Hotsiy
f66b194e3d
Updated README and CHANGELOG 2016-08-30 21:29:22 +03:00
Roman Hotsiy
8d2f72a55b
v1.2.0 2016-08-30 20:16:26 +03:00
Roman Hotsiy
9f83c1c3ad
Fix version render issue 2016-08-30 20:16:06 +03:00
Roman Hotsiy
30bcad450f
Fix deployment 2016-08-30 20:15:52 +03:00
Roman Hotsiy
a7a4a349f0
Fix tests 2016-08-30 20:05:21 +03:00
Roman Hotsiy
7f3bdd1603
Update webpack configs + add banner (fixes #89) 2016-08-30 19:53:06 +03:00
Roman Hotsiy
a01f9f41a4
Fix sticky sidebar (#75) 2016-08-30 19:35:07 +03:00
Roman Hotsiy
2bc729ea23
Fix array inside objects if referenced directly (fixes #84) 2016-08-30 18:49:08 +03:00
Roman Hotsiy
4f746a19e3
fix warnings changedetection 2016-08-30 18:38:13 +03:00
Roman Hotsiy
1b6c858ab7
Fix minor css issues 2016-08-30 18:24:37 +03:00
Roman Hotsiy
c384163be0
ChangeDetectionStrategy.OnPush for components 2016-08-30 17:07:54 +03:00
Roman Hotsiy
919f0c380d
Fix additionalProperties was broken 2016-08-30 15:50:53 +03:00
Roman Hotsiy
bff4b80845
Change the way discriminator is rendered 2016-08-30 13:51:14 +03:00
Roman Hotsiy
158bd29b9b
default value for options 2016-08-30 13:40:26 +03:00
Roman Hotsiy
3a175d47fb
remove log 2016-08-30 13:39:31 +03:00
Roman Hotsiy
039f5fdb83
Add missing webpack-dev-server 2016-08-29 18:25:55 +03:00
Roman Hotsiy
e680aeaacf
remove unused file 2016-08-29 18:24:50 +03:00
Roman Hotsiy
d297ac475d
Ignore changes (watcher) during tests 2016-08-29 12:05:44 +03:00
Roman Hotsiy
e6efe35595
Creating CDN major release 1.x.x (#87) 2016-08-29 09:38:07 +03:00
Roman Hotsiy
34db52cd91
less verbose output for tests 2016-08-29 07:43:59 +03:00
Roman Hotsiy
1f4f688bc4
Update webpack configs 2016-08-29 07:36:25 +03:00
Roman Hotsiy
803410da40
Suppress FF warnings in e2e 2016-08-29 07:34:44 +03:00
Roman Hotsiy
f9885c01e8
Separate file for gh demo 2016-08-29 07:34:08 +03:00
Roman Hotsiy
66684c192b
Remove unused files 2016-08-29 07:33:29 +03:00
Roman Hotsiy
27197ffb46
Propagate external options 2016-08-29 07:30:49 +03:00
Roman Hotsiy
50f65f7cfd
fix IE detection in protractor 2016-08-29 01:05:34 +03:00
Roman Hotsiy
0d2c557ebe
reduce webpack output during tests 2016-08-29 00:46:59 +03:00
Roman Hotsiy
2429fd21ac
more missed deps... 2016-08-28 23:48:20 +03:00
Roman Hotsiy
d1579bbee7
build sass before test 2016-08-28 23:42:04 +03:00
Roman Hotsiy
ba233d896d
Add missing deps 2016-08-28 23:09:14 +03:00
Roman Hotsiy
236ceafd8b
Update to npm@3 on travis 2016-08-28 22:51:35 +03:00
Roman Hotsiy
798869944f
clean package.json 2016-08-28 22:45:53 +03:00
Roman Hotsiy
a65ecfa442
Move to webpack + AoT compilation 2016-08-28 21:46:10 +03:00
Roman Hotsiy
3aa586cced
Migrate to typescript 2.0 and get rid of typings (fixes #80, #81) 2016-08-28 21:44:11 +03:00
Roman Hotsiy
c7e1c14ce7
Updated README to avoid confusions (#83) 2016-08-23 01:04:10 +03:00
Roman Hotsiy
65e720b90f
revert removed line 2016-08-22 23:10:43 +03:00
Roman Hotsiy
27752909d4
temporarily disable mangling 2016-08-22 22:41:28 +03:00
Roman Hotsiy
1f1eb9852a
Fix systemjs-builder and jspm version 2016-08-22 17:03:20 +03:00
Roman Hotsiy
e78d8845c7
Update zone.js to 0.6.15 2016-08-22 13:11:50 +03:00
Roman Hotsiy
5efbd97f3e
Throttle scroll event 2016-08-22 12:18:56 +03:00
Roman Hotsiy
379870a1b3
Migrate to angular rc.5 2016-08-22 12:12:13 +03:00
Roman Hotsiy
fc0b6230db
update changelog 2016-08-21 17:51:18 +03:00
Roman Hotsiy
cfd728355e
v1.1.2 2016-08-21 17:48:05 +03:00
Roman Hotsiy
2e9285e0f0
Revert markdown newlines to become breaks (related to SP-82) 2016-08-21 17:47:33 +03:00
Roman Hotsiy
b77e3c8843
Move license and contact info above description 2016-08-21 17:43:42 +03:00
Roman Hotsiy
0e3d506277
Fix link on demo 2016-08-21 17:42:13 +03:00
Roman Hotsiy
ea0d242bfe
v1.1.1 2016-08-21 11:48:21 +03:00
Roman Hotsiy
b463258170
Remove wrong commited files 2016-08-21 11:14:57 +03:00
Roman Hotsiy
7b16a13427
Fix markdown code blocks in api description 2016-08-21 10:56:29 +03:00
Roman Hotsiy
40a3102934
Fix dropdown on demo 2016-08-21 10:49:53 +03:00
Roman Hotsiy
eb0beda4e6
Fix markdown newlines to be gfm (fixes #82) 2016-08-21 10:17:41 +03:00
Roman Hotsiy
a3c11d184b
Add changelog 2016-08-13 02:33:06 +03:00
Roman Hotsiy
cde5eb534a
Add special representation for enum with one value (fixes #70) 2016-08-12 20:42:41 +03:00
Roman Hotsiy
0b46186585
Render valid JSON in samples (quoted object keys) 2016-08-12 20:42:41 +03:00
Roman Hotsiy
9aea9bc683
Fix API descriptioin width on mobile 2016-08-12 20:42:41 +03:00
Roman Hotsiy
d3d223a344
Refactor schema template 2016-08-12 20:42:41 +03:00
Roman Hotsiy
92f745d10f
Add Tuple support 2016-08-12 20:42:41 +03:00
Roman Hotsiy
2364250e96
Add GA to demo page 2016-08-12 20:42:41 +03:00
Roman Hotsiy
9abd2691f7 Update README.md 2016-08-04 19:14:50 +03:00
Roman Hotsiy
f65c4b3de3
add features to readme 2016-08-01 08:15:52 +03:00
Roman Hotsiy
5111abf1d4
v1.0.1 2016-08-01 07:23:09 +03:00
Roman Hotsiy
ce41ac1380
move initial styles import to the top 2016-08-01 07:23:01 +03:00
Roman Hotsiy
8300aa6055
Fix tests failure on PR 2016-08-01 07:22:49 +03:00
Roman Hotsiy
c24668938e Merge pull request #74 from mikestead/fix/host-substitution
Use api host if schema host is undefined
2016-08-01 06:58:05 +03:00
Mike Stead
e8f090604c Validate that api scheme is used correctly 2016-08-01 10:26:10 +10:00
Mike Stead
190b5e79f6 Replace const with let to conform to coding style 2016-08-01 09:57:06 +10:00
Mike Stead
51965f94b5 Use api host if schema host is undefined 2016-08-01 09:46:34 +10:00
Roman Hotsiy
bc47b40466 Update README.md 2016-07-29 18:20:38 +03:00
Roman Hotsiy
5f044b900f
v1.0.0 🎆 2016-07-29 13:44:23 +03:00
Roman Hotsiy
c076b5ebbc
Enhance demo (fixes #49) 2016-07-29 13:44:23 +03:00
Roman Hotsiy
7166fd6322
polish README 2016-07-29 13:44:23 +03:00
Roman Hotsiy
972e77fd79 Update README.md 2016-07-28 21:54:58 +03:00
Roman Hotsiy
9093932639 Update README.md 2016-07-28 21:36:43 +03:00
Roman Hotsiy
0493f62f0b
README updates 2016-07-28 20:17:56 +03:00
Roman Hotsiy
d3bbfbf163
Load fonts erlier 2016-07-28 20:17:45 +03:00
Roman Hotsiy
0e354afd20
Fix e2e tests timeouts 2016-07-28 19:59:42 +03:00
Roman Hotsiy
167b272d3e
CSS fixes 2016-07-28 19:59:02 +03:00
Roman Hotsiy
2f3e8a0f1e
Enhance Readme 2016-07-28 19:58:04 +03:00
Roman Hotsiy
c0f43a3d15
Fix warnings show criteria 2016-07-28 15:57:37 +03:00
Roman Hotsiy
0f2189622e
Fix tag links 2016-07-28 15:57:13 +03:00
Roman Hotsiy
d5651a2cb7
Move Download Swagger button 2016-07-28 15:56:29 +03:00
Roman Hotsiy
9e2fab9108
Make roboto/montserrat fonts part of ReDoc (until styling feature is done) 2016-07-28 15:56:14 +03:00
Roman Hotsiy
c92a743ea8
Remove console.log 2016-07-28 08:57:10 +03:00
Roman Hotsiy
46fa6c9686
Fix discriminator/allOf merging issue 2016-07-28 07:51:22 +03:00
Roman Hotsiy
f98cb9a3fe
Render json-schema constrains for headers (fixes #47) 2016-07-28 07:24:12 +03:00
Roman Hotsiy
4b61357be0
Warnings on the top of page (fixes #48) 2016-07-27 18:57:23 +03:00
Roman Hotsiy
2872ffbcf9
If API supports both HTTP and HTTPS use HTTPS (fixes #72) 2016-07-26 14:51:59 +03:00
Roman Hotsiy
ae0b0f5f14
Deduce type value from validation keywords (fixes #71) 2016-07-26 14:07:25 +03:00
Roman Hotsiy
a5959bdf55
Refactor menu 2016-07-26 12:33:55 +03:00
Roman Hotsiy
08a46846bc
install slugify 2016-07-26 11:57:33 +03:00
Roman Hotsiy
205aa6211c
Pull markdown headers from description into side menu 2016-07-21 13:52:56 +03:00
Roman Hotsiy
82f1be1d11
Get rid of prepareModel method. Use init instead 2016-07-20 11:07:08 +03:00
Roman Hotsiy
d75e9921c2
Pull better demo spec 2016-07-18 23:50:32 +03:00
Ivan Goncharov
d629644c94 Improve headings for vendor extensions 2016-07-17 21:48:56 +03:00
Ivan Goncharov
319ae2a6b9 Merge pull request #68 from Rebilly/fix-links
Fix internal links inside docs.
2016-07-17 20:31:31 +03:00
Roman Hotsiy
7967833254
Minor rendering perf improvements 2016-07-17 19:44:58 +03:00
Ivan Goncharov
5cfc0b4479
Fix internal links inside docs. 2016-07-17 19:02:27 +03:00
Roman Hotsiy
1e60b7abd4
Fix sauce maxDuration values 2016-07-17 18:24:01 +03:00
Roman Hotsiy
671f68acad
Cleanup unused code 2016-07-17 18:16:09 +03:00
Roman Hotsiy
7a7f3af697
v0.16.0 2016-07-17 18:12:05 +03:00
Roman Hotsiy
6c2bfd8dee
Implement Copy/Expand/Collapse buttons 2016-07-17 18:07:51 +03:00
Roman Hotsiy
c6e093ec75
increase tests max duration 2016-07-17 18:07:12 +03:00
Roman Hotsiy
41dcaaafd0
v0.15.3 2016-07-15 23:53:39 +03:00
Roman Hotsiy
da9b4ab0b1
Dropdown overflow fix 2016-07-15 23:44:42 +03:00
Roman Hotsiy
8b20b083ea
Fix dropdown UI issue (fixes #64) 2016-07-15 23:28:51 +03:00
Roman Hotsiy
d0d4efa0a7
Update openapi-sampler: new formats and additionalProperties support (fixes #66) 2016-07-15 22:35:06 +03:00
Roman Hotsiy
7bf8c1e852
Minor ui fix: space between range and requird 2016-07-15 20:20:24 +03:00
Roman Hotsiy
3f7c3fb40d
Fix crash on methods with no summary, description and operationId 2016-07-15 17:43:23 +03:00
Roman Hotsiy
dcd43e4fc6
Discriminator support for examples (fixes #65) 2016-07-15 17:43:01 +03:00
Roman Hotsiy
efa7811e74
Remove unused config 2016-07-12 15:11:44 +03:00
Roman Hotsiy
17dc1c46df
fix tests 2016-07-10 16:05:28 +03:00
Roman Hotsiy
186ce7ab6f
Update Powered by redoc badge 2016-07-10 15:43:17 +03:00
Roman Hotsiy
b4a8c35be6
Minor perf optimizations 2016-07-10 14:47:34 +03:00
Roman Hotsiy
31e38ac7ec
Fix crash on Firefox 2016-07-10 14:46:24 +03:00
Roman Hotsiy
ad678925f5
Add Response Schema label 2016-07-10 14:45:06 +03:00
Roman Hotsiy
4cf11dceee
Fix borders rendering issues 2016-07-10 14:44:22 +03:00
Roman Hotsiy
135bdbe12f
Expand shevron: make clickable 2016-07-10 14:42:49 +03:00
Roman Hotsiy
7618507cda
Auto expand schema with one element 2016-07-10 14:28:05 +03:00
Roman Hotsiy
ed2a5b46e1
Zippy performance optimization 2016-07-10 13:15:36 +03:00
Roman Hotsiy
a2beb2432d
v0.15.2 2016-07-01 18:33:54 +03:00
Roman Hotsiy
ac6c203f24
fix tests 2016-07-01 18:33:42 +03:00
Roman Hotsiy
060119673f
Fix menutree building 2016-07-01 18:10:13 +03:00
Roman Hotsiy
f0fe212c24
Update file produces/consumes look 2016-07-01 18:10:01 +03:00
Roman Hotsiy
6a8f1e6e21
prepend v to api version 2016-07-01 18:09:42 +03:00
Roman Hotsiy
2d54a67c2c
Make baseUrl darker 2016-07-01 17:26:10 +03:00
Roman Hotsiy
b22b8d2122
Refactor menu generation + handle methods without tags 2016-07-01 17:24:59 +03:00
Roman Hotsiy
4a475677f7
Clean up tests 2016-07-01 16:30:57 +03:00
Roman Hotsiy
81d06316ed
Add trackBy to tags 2016-07-01 16:30:35 +03:00
Roman Hotsiy
a671d2f005
update to the latest angular 2016-07-01 15:53:16 +03:00
Roman Hotsiy
ad52726b90
Fix various JsonSchema rendering bugs 2016-06-30 16:45:53 +03:00
Roman Hotsiy
f0a4534400 Add info about CDN to README
fixes #50
2016-06-30 11:34:39 +03:00
Roman Hotsiy
af5c2250e8
Uncomment 'star-me' on demo-page 🌟 2016-06-29 22:43:45 +03:00
Roman Hotsiy
9396514998
v0.15.0 2016-06-29 22:40:53 +03:00
Roman Hotsiy
8d039af839
Fix additionalProperties: true crash 2016-06-29 22:29:05 +03:00
Roman Hotsiy
46a44f3f6c
Attach controler to schemas with subschemas 2016-06-29 19:07:18 +03:00
Roman Hotsiy
7a73ba2ce5
Fix LazySchema tests 2016-06-29 19:06:49 +03:00
Roman Hotsiy
44e52febc6
Zippy UI enhancement 2016-06-29 18:02:29 +03:00
Roman Hotsiy
0b0f28cd4a
Implement expanding subschemas (fixes #56) 2016-06-29 18:02:19 +03:00
Roman Hotsiy
9e1d7768d7
test for transitive dereferencing 2016-06-25 13:58:03 +03:00
Roman Hotsiy
434f0927c1
Fix watch-rebuild 2016-06-25 13:02:27 +03:00
Roman Hotsiy
afe9020021
Fix dereferencing 2016-06-25 13:02:13 +03:00
Roman Hotsiy
003fba8651
Refactoring
Rename schemaMgr to specMgr
fix error logs in tests
2016-06-23 17:46:10 +03:00
Roman Hotsiy
85d72d64e3 Update and clean up deps 2016-06-23 11:36:58 +03:00
Roman Hotsiy
53b4f55876 Refactor 2016-06-22 21:53:11 +03:00
Roman Hotsiy
1e97ea655e Refactor + perf optimizations 2016-06-22 19:13:57 +03:00
Roman Hotsiy
9341d4904e Minor demo update 2016-06-22 12:49:30 +03:00
Roman Hotsiy
43a0872530 bypass sanitization for markdown 2016-06-22 12:45:03 +03:00
Roman Hotsiy
b65370c8ac Replace marked with remarkable 2016-06-22 12:42:24 +03:00
Roman Hotsiy
791355c60a Add simple animations 2016-06-19 17:51:06 +03:00
Roman Hotsiy
a482c0b29e Remove second tsc task from build 2016-06-19 17:40:45 +03:00
Roman Hotsiy
016ad7e0ad Update angular to the latest RC 2016-06-19 17:40:09 +03:00
Roman Hotsiy
7a9ff72922 v0.14.0 2016-06-18 21:04:36 +03:00
Roman Hotsiy
233f493d1a update branch-release dependency 2016-06-18 21:04:04 +03:00
Roman Hotsiy
54184b9f35 Don't show readOnly fields in request samples (fixes #59) 2016-06-18 21:02:01 +03:00
Roman Hotsiy
d57b96666b fix minor bug ater ts migration 2016-06-18 20:58:50 +03:00
Roman Hotsiy
e9b95eac96 Fix e2e (regression) 2016-06-18 12:43:00 +03:00
Roman Hotsiy
5c6ee7cc63 Deps cleanup 2016-06-18 12:41:03 +03:00
Roman Hotsiy
636f8df664 Merge branch 'typescript-migrate' (fixes #57) 2016-06-17 13:24:59 +03:00
Roman Hotsiy
a95b014e9a Fix coveralls report 2016-06-17 12:49:00 +03:00
Roman Hotsiy
76f06b1992 Fix coverage 2016-06-16 15:44:14 +03:00
Roman Hotsiy
99cf070520 remove es6 overrides from angular deps 2016-06-16 00:33:06 +03:00
Roman Hotsiy
81701d3cb5 Fix json-schema-ref-parser importing 2016-06-15 23:33:57 +03:00
Roman Hotsiy
0a5c1bf609 Add missing package 2016-06-15 22:52:37 +03:00
Roman Hotsiy
cc1e7d6e1e try to fix npm install 2016-06-15 22:45:49 +03:00
Roman Hotsiy
854c831154 Fix lint erorrs, fix typescript version 2016-06-15 21:48:04 +03:00
Roman Hotsiy
1fafa5e334 Update package json 2016-06-15 21:08:02 +03:00
Roman Hotsiy
4f39ab9edc Add tslint 2016-06-13 20:54:24 +03:00
Roman Hotsiy
4498884f62 Migrate tests to TypeScript 2016-06-12 20:44:34 +03:00
Ivan Goncharov
006e1341d6 Merge pull request #58 from APIs-guru/master
Update APIs.guru URLs in README
2016-06-11 14:59:07 +03:00
Ivan Goncharov
bf0f44303b Switch to APIs.guru API v2 2016-06-09 20:40:54 +03:00
Ivan Goncharov
43756f168d Update APIs.guru URLs in README 2016-06-09 20:39:52 +03:00
Roman Hotsiy
3629e34a5a Continue migrating to TS 2016-06-06 19:32:20 +03:00
Roman Hotsiy
40b03e993c Simplified deployment 2016-05-29 20:47:38 +03:00
Roman Hotsiy
9df1c450e8 v0.13.0 2016-05-29 20:31:39 +03:00
Roman Hotsiy
4005d8f61b Proper examples generation: fixes #43 2016-05-29 20:26:20 +03:00
Roman Hotsiy
65bc8ef4e5 Migrate to Typescript (not finished yet) 2016-05-25 18:34:31 +03:00
Roman Hotsiy
61d9a42477 bump version (v0.12.0) 2016-05-20 23:04:11 +03:00
Roman Hotsiy
37bbd7f405 fix broken unit tests 2016-05-20 22:56:10 +03:00
Roman Hotsiy
1ec5f9d12d fix unit tests: add version.json to karma serveed 2016-05-20 22:45:12 +03:00
Roman Hotsiy
82060357c7 Get rid of bash 2016-05-20 22:37:36 +03:00
Roman Hotsiy
f2b1ba8cda Add gulp copydebug task 2016-05-20 20:51:31 +03:00
Roman Hotsiy
6f8ea60da7 Add version getter to ReDoc runtime 2016-05-20 20:36:26 +03:00
Roman Hotsiy
c80f13738f Use prod build on demo 2016-05-20 20:14:18 +03:00
Roman Hotsiy
8e6ce26ea6 use json-schema-ref-parser instead of SwaggerParser (fixes #46) 2016-05-20 20:13:39 +03:00
Roman Hotsiy
ed69beb2bc disable sourcemaps for prod build 2016-05-20 20:12:54 +03:00
Roman Hotsiy
bdbf7e0ab1 Fixed e2e tests (button was not clickable) 2016-05-20 19:51:57 +03:00
Roman Hotsiy
9c5d002eda Add basic error message (part of #48) 2016-05-20 19:51:25 +03:00
Roman Hotsiy
1d0579f114 Remove debug log messages 2016-05-20 19:29:12 +03:00
Roman Hotsiy
18c3f605a0 Minor refactoring in json-schema-lazy 2016-05-20 19:28:16 +03:00
Roman Hotsiy
c40de56a71 Fix mixed deps for prod and dev build 2016-05-20 19:27:47 +03:00
Roman Hotsiy
2252596063 minor bump version (v0.11.1) 2016-05-19 10:05:28 +03:00
Roman Hotsiy
1eb38a8701 Enhance loading animation 2016-05-19 10:04:54 +03:00
Roman Hotsiy
a2c91be5a3 Fix reload gulp task 2016-05-19 10:03:57 +03:00
Roman Hotsiy
02149be9df bump version (v0.11.0) 2016-05-18 22:55:02 +03:00
Roman Hotsiy
dbd90b6c73 Fix watch task 2016-05-18 22:39:21 +03:00
Roman Hotsiy
a8cd9e3c14 Add Header for response schema 2016-05-18 22:39:09 +03:00
Roman Hotsiy
269f535d7f Default values (only for primitive types) 2016-05-18 22:24:34 +03:00
Roman Hotsiy
fde3dccf62 Update build tasks 2016-05-18 22:18:06 +03:00
Roman Hotsiy
a43d725256 Minor UI fix: scroll for too long endpoint url 2016-05-18 22:12:41 +03:00
Roman Hotsiy
57b96a6eda Add more e2e tests 2016-05-18 17:44:58 +03:00
Roman Hotsiy
b9bc3f2eab Change detection optimizations 2016-05-18 17:16:29 +03:00
Roman Hotsiy
7380f89482 fix mobile nav 2016-05-17 19:38:12 +03:00
Roman Hotsiy
547cf0ceab Add type:file support for payloads 2016-05-16 23:02:34 +03:00
Roman Hotsiy
3f725056ed Add tested on APIs.guru badge 2016-05-11 15:41:35 +03:00
Roman Hotsiy
7278110e58 minor fix deploy to gh-pages 2016-05-10 12:32:54 +03:00
Roman Hotsiy
fb61b49ec9 bump verstion v0.9.0 2016-05-10 11:29:55 +03:00
Roman Hotsiy
cc422559fe include basic e2e to the tescases needed for deployment 2016-05-10 11:02:47 +03:00
Roman Hotsiy
c228c5473c remove whitespace between root path and method path (fixes #44) 2016-05-10 10:15:16 +03:00
Roman Hotsiy
b2db144c6b separate general e2e test from apis.guru 2016-05-10 10:04:43 +03:00
Roman Hotsiy
50a378f3ea Fix changeDetection in Safari 2016-05-10 09:44:44 +03:00
Roman Hotsiy
a1a1739508 Fixed resolving additional properties inside of array 2016-05-10 09:44:26 +03:00
Roman Hotsiy
bd4a0d136c Sauce IE fix 2016-05-10 09:43:05 +03:00
Roman Hotsiy
1134b84f12 Fixed deps 2016-05-09 23:01:20 +03:00
Roman Hotsiy
ed20f784db Update tests 2016-05-09 22:55:16 +03:00
Roman Hotsiy
96fc22d90b moved logick to services 2016-05-07 10:54:44 +03:00
Roman Hotsiy
68e77f9350 more refactor 2016-05-06 12:46:41 +03:00
Roman Hotsiy
d2eca9fcde updated angular to rc + refactor 2016-05-06 00:48:41 +03:00
Roman Hotsiy
a272dacc95 Update angular to the rc 2016-05-05 11:05:02 +03:00
Roman Hotsiy
6aa1bbc6c6 fix prepare_deploy fail 2016-05-01 16:17:16 +03:00
Roman Hotsiy
a8e36de953 bump version 2016-04-30 23:42:53 +03:00
Roman Hotsiy
da2ef67a66 Enable mangling in uglify 2016-04-30 23:42:25 +03:00
Roman Hotsiy
3405e07d31 Fix deployment script 2016-04-30 23:41:54 +03:00
Roman Hotsiy
d1005e018d bump version 2016-04-30 22:59:38 +03:00
Roman Hotsiy
cca833633a try releases to github pages 2016-04-30 22:55:29 +03:00
Roman Hotsiy
93ac1516c4 Merge branch 'dropdown-style' 2016-04-30 21:29:37 +03:00
Roman Hotsiy
044b2d57f8 Override http module for json-schema-ref-parser, fixed using incorrect port 2016-04-30 21:25:52 +03:00
Roman Hotsiy
e8716ab69d Updated tests after angular update 2016-04-30 00:45:53 +03:00
Roman Hotsiy
9d13b702b3 Update agnular to the latest beta 2016-04-29 22:57:24 +03:00
Roman Hotsiy
a7c6309d1d update tests to use prismjs bundle 2016-04-28 22:40:57 +03:00
Roman Hotsiy
68ea1576a8 Fix periodical build fails: bundle prism.js to one file in correct order 2016-04-28 22:21:08 +03:00
Roman Hotsiy
e5e8c5ecd9 Update deps 2016-04-28 21:38:32 +03:00
Roman Hotsiy
b65d8c96e5 Handle additional properties (fixes #4) 2016-04-28 20:17:38 +03:00
Roman Hotsiy
9cc251e4a7 bump version 2016-04-28 10:20:21 +03:00
Roman Hotsiy
95d257d404 Fix discriminator ui issue 2016-04-28 10:19:39 +03:00
Roman Hotsiy
84e702aa7a bump version 2016-04-27 23:10:45 +03:00
Roman Hotsiy
4bde2f7894 Render max/minCharacters (#42) 2016-04-27 23:07:06 +03:00
Roman Hotsiy
4c923682ba Omit readonly properties in request schemas (part of #42) 2016-04-27 22:34:41 +03:00
Cesar
7612c1694a DropdownStyle: Revert 80 after .io 2016-04-25 15:42:16 -04:00
Cesar
594d8539a5 DropdownStyle: Added new dropdown sass style 2016-04-25 15:41:08 -04:00
Ivan Goncharov
900ecaa2cc fix backgroundColor in samples 2016-04-22 16:33:27 +03:00
Roman Hotsiy
6b4f1b564e Sort discriminator buttons according to the enum order, fixes #39 2016-04-20 22:04:42 +03:00
Roman Hotsiy
b92ebe388b joinAllOf fix: ref and inline schema case 2016-04-20 19:56:20 +03:00
Roman Hotsiy
21788c282d Fix link, fixes #40 2016-04-20 12:27:30 +03:00
Roman Hotsiy
44acba7c72 Add github star button 2016-04-20 02:48:06 +03:00
Roman Hotsiy
4f2e1a29e6 Use dropdown instead of buttons for discriminator switch 2016-04-19 18:56:42 +03:00
Roman Hotsiy
4c450e56b5 Add Dropdown Element 2016-04-19 18:56:42 +03:00
Roman Hotsiy
61646df40c Update x-logo.backgroundColor vendor extention spec 2016-04-16 14:34:19 +03:00
Roman Hotsiy
d6a994c54e bump version 2016-04-13 15:47:04 +03:00
Roman Hotsiy
823c0e60c5 Hanlde empty discriminator 2016-04-13 15:46:41 +03:00
Roman Hotsiy
6d2a49fb13 Minor font-weight fix 2016-04-13 14:26:59 +03:00
Roman Hotsiy
7562bc41f0 Nested schema ui minor fix 2016-04-13 14:23:58 +03:00
Roman Hotsiy
b097f1fdfa Don't show enum info for discriminator field 2016-04-13 14:22:32 +03:00
Roman Hotsiy
fc86c93d87 Fix discriminator end-less recursion 2016-04-13 14:21:56 +03:00
Roman Hotsiy
fdb485fa91 Add missing script 2016-04-09 02:53:41 +03:00
Roman Hotsiy
9b41e377e7 bump version 2016-04-09 02:37:55 +03:00
Roman Hotsiy
27409bdcde Add github releases deploy 2016-04-09 02:30:01 +03:00
Roman Hotsiy
6af848d0f4 fix dist file is empty sometimes + minor config refactor 2016-04-09 02:28:21 +03:00
Roman Hotsiy
06e9dd3a0f Fix nested schemas styling (fixes #32) 2016-04-07 21:00:34 +03:00
Roman Hotsiy
6be67940f5 Fix markdown headings 2016-04-07 18:44:41 +03:00
Roman Hotsiy
b8206e2994 Bump version 2016-03-31 19:42:02 +03:00
Roman Hotsiy
dbcef5698c Add openapi button simple styling 2016-03-31 19:41:37 +03:00
Roman Hotsiy
46ed1ae16b fix e2e test 2016-03-31 19:41:17 +03:00
Roman Hotsiy
84a9a5c520 resotre image and use yml instead of json 2016-03-31 19:40:32 +03:00
Roman Hotsiy
cd52d81b46 fix test 2016-03-31 01:15:54 +03:00
Roman Hotsiy
d141f67559 Use spec and image from SwaggerTmplRepo 2016-03-31 01:08:13 +03:00
Roman Hotsiy
dcd9983ce8 Add download swagger button (#1) 2016-03-31 00:20:31 +03:00
Roman Hotsiy
544e24a524 Bump version 2016-03-28 00:55:01 +03:00
Roman Hotsiy
6004fb0132 Add help messages for different types of parameters (fixes #26) 2016-03-28 00:54:43 +03:00
Roman Hotsiy
ae0ce4ac52 fix test 2016-03-27 20:31:07 +03:00
Roman Hotsiy
b6a711b25d Fix change-detection on Safari/IE 2016-03-27 20:17:28 +03:00
Roman Hotsiy
a23008e839 Update dev dependencies 2016-03-27 19:06:16 +03:00
Roman Hotsiy
4ca1bdb5de updated angular2 to the latest beta (beta.12) 2016-03-27 18:25:46 +03:00
Roman Hotsiy
36034d4d1a Minor fix joinAllOf 2016-03-27 13:35:06 +03:00
Roman Hotsiy
e50d59ef6b bump version to fix build 2016-03-27 13:10:10 +03:00
Roman Hotsiy
771bf2a98d Bump version 2016-03-27 00:45:50 +02:00
Roman Hotsiy
422ef513a2 UI fix: extra line at the last object property 2016-03-27 00:45:28 +02:00
Roman Hotsiy
6032355664 Refactor JsonSchema component + improve merging allOf 2016-03-27 00:44:34 +02:00
Roman Hotsiy
8b30653fb0 Fix caching schemas with discriminator 2016-03-27 00:37:56 +02:00
Roman Hotsiy
2cbb516059 url parameter for demo page (fixes #22) 2016-03-23 23:16:30 +02:00
Roman Hotsiy
f5ca1e04f0 bump version 2016-03-22 19:27:01 +02:00
Roman Hotsiy
cfcfb95e58 Revert "Adding style for rebilly api logo"
This reverts commit 5818f171f7.
2016-03-22 19:26:36 +02:00
Cesar
cfffc19d4f Merge with master 2016-03-22 13:12:35 -04:00
Cesar
592e44e759 Remove rebilly api tag 2016-03-22 13:11:27 -04:00
Roman Hotsiy
35e388583c remove padding from api-logo 2016-03-22 00:43:40 +02:00
Roman Hotsiy
824d790478 Fix allOf referencing array schema 2016-03-22 00:27:59 +02:00
Cesar
a58836c42a Resolve conflic 2016-03-18 09:12:15 -04:00
Cesar
1af0d8e54e Discriminator styling 2016-03-18 09:10:29 -04:00
Cesar
5decc3ceb5 merge with origin 2016-03-18 09:06:22 -04:00
Cesar
5818f171f7 Adding style for rebilly api logo 2016-03-17 15:22:34 -04:00
Roman Hotsiy
c954142861 discriminator ui update 2016-03-17 20:30:50 +02:00
Cesar
a87ba13806 Fixes in JSONSchema treem and descriminator 2016-03-17 10:27:45 -04:00
Roman Hotsiy
13286558d0 Add minimum and maximum information for numeric fields (fixes #33) 2016-03-17 01:27:09 +02:00
Roman Hotsiy
ac7116ad04 big refactoring of injectPropertyData method 2016-03-17 00:43:23 +02:00
Roman Hotsiy
0d3d9213de exclude pushpay.com spec from e2e test 2016-03-15 16:14:39 +02:00
Roman Hotsiy
8945f1d643 v0.7.3 2016-03-15 16:11:43 +02:00
Roman Hotsiy
95cef711b2 Fix footer and <strong> element styling 2016-03-15 16:10:33 +02:00
Roman Hotsiy
3a6e2c14c4 Nested allOf handling 2016-03-15 16:09:42 +02:00
Roman Hotsiy
e957a92346 allOf merging fixes (fixes #31) 2016-03-15 16:09:16 +02:00
Roman Hotsiy
9e10fa4a55 bump version to fix broken release 2016-03-14 23:40:45 +02:00
Roman Hotsiy
6e4c88e4be change order of deploy scripts 2016-03-14 23:29:13 +02:00
Roman Hotsiy
c498517a23 minor responsiveness fix 2016-03-14 23:25:57 +02:00
Roman Hotsiy
cac8594f1c fonts improvements 2016-03-14 23:15:32 +02:00
Roman Hotsiy
1686d3da43 fix css import in demo 2016-03-14 22:48:35 +02:00
Roman Hotsiy
6817737589 v0.7.0 2016-03-14 22:41:02 +02:00
Roman Hotsiy
f4ee0fa343 minor fixes 2016-03-14 22:36:32 +02:00
Roman Hotsiy
617d398dee move importing external css files outside the redoc 2016-03-14 22:27:45 +02:00
Roman Hotsiy
ca2c01b8ac Make right panel fill all page 2016-03-14 22:27:07 +02:00
Cesar
a0a209820f JSONSchema tree and table 2016-03-14 15:29:27 -04:00
Roman Hotsiy
2e53b9fa50 Merge branch 'master' into css-changes 2016-03-13 02:49:15 +02:00
Roman Hotsiy
f1347e8811 Fix link in README 2016-03-13 02:48:17 +02:00
Roman Hotsiy
6965e69c8c fix regression 2016-03-13 02:32:57 +02:00
Roman Hotsiy
328fb647b3 v0.6.6 2016-03-13 02:24:00 +02:00
Roman Hotsiy
aef4c2f567 Update branch-release package 2016-03-13 02:23:27 +02:00
Roman Hotsiy
cf2816987a change look of fields with hint 2016-03-13 01:56:33 +02:00
Roman Hotsiy
9860e31049 JsonSchema: display object without properties as a simple type 2016-03-13 01:56:24 +02:00
Roman Hotsiy
da5224e3e2 add accidentally missed changes 2016-03-09 22:05:22 +02:00
Roman Hotsiy
a496e907ea Fix operation links 2016-03-09 21:54:43 +02:00
Roman Hotsiy
94f5d00a24 v0.6.3 2016-03-09 20:49:54 +02:00
Roman Hotsiy
7d7877da2e Fix links with spaces 2016-03-09 20:44:20 +02:00
Roman Hotsiy
0a8440f44b Fix treating refereced schemas with simple types (string, integer) as nested 2016-03-09 20:32:10 +02:00
Roman Hotsiy
8afa4d6c32 Fix treating refereced schemas with simple types (string, integer) as nested 2016-03-09 00:28:55 +02:00
Roman Hotsiy
bfa10bca83 Restyle JSONSchema component 2016-03-09 00:27:19 +02:00
Cesar
8828043eb3 Changes in fonts and definitions 2016-03-08 15:03:05 -05:00
Cesar
06cba79383 Global styles and Menu style 2016-03-02 14:48:55 -05:00
Roman Hotsiy
3f698caabe Fix required for JsonSchema component (fixes #28) 2016-03-02 08:56:09 +04:00
Cesar
d07e2f0026 Work on Request and Response Samples and overall padding 2016-03-01 13:08:02 -05:00
Cesar
2a8ea8f669 First Commit 2016-02-29 17:18:00 -05:00
Roman Hotsiy
b054e62e0a v0.6.2 2016-02-27 23:32:26 +02:00
Roman Hotsiy
8c52af3829 Fix hardcoded column witdth 2016-02-27 23:32:26 +02:00
Roman Hotsiy
32ca51a3c0 Merge pull request #25 from APIs-guru/master
Add additional keywords
2016-02-24 18:29:27 +02:00
Ivan Goncharov
d0ac9667c5 Add additional keywords 2016-02-24 18:25:49 +02:00
Roman Hotsiy
bea8421329 Clean up bower package (fixes #24) 2016-02-24 17:18:59 +02:00
Roman Hotsiy
e944de6a1c v0.6.1 2016-02-23 13:36:23 +02:00
Roman Hotsiy
07b1b6325c Fix lint error 2016-02-23 13:09:31 +02:00
Roman Hotsiy
97e38b3a95 Group operation parameters by type (fixes #23) 2016-02-23 13:05:59 +02:00
Roman Hotsiy
0133e6234e use deploy-to-gh-pages module 2016-02-23 11:35:32 +02:00
Roman Hotsiy
f3d344fd37 Exclude incorrect spec from e2e tests 2016-02-22 16:12:17 +02:00
Roman Hotsiy
267b0a0338 v0.6.0 2016-02-22 15:25:31 +02:00
Roman Hotsiy
b87883607e Remove extra use-strict from browser-update 2016-02-19 17:10:11 +02:00
Roman Hotsiy
518321bfd4 Remove test flag from browser-update script 2016-02-18 15:05:45 +02:00
Roman Hotsiy
ce5306f1de Add unsupported browser bar (fixes #17) 2016-02-17 23:45:27 +02:00
Roman Hotsiy
2656aa1501 Merge branch 'waffle-iron-master' 2016-02-17 11:44:41 +02:00
Roman Hotsiy
b7d68b7a9e updated waffle badge position 2016-02-17 11:44:30 +02:00
Roman Hotsiy
03b6fd46a1 Merge branch 'master' of https://github.com/waffle-iron/ReDoc into waffle-iron-master 2016-02-17 11:43:02 +02:00
Roman Hotsiy
5697564032 Disable mangle (due to ng2 minification issue) 2016-02-17 11:22:46 +02:00
Roman Hotsiy
d03fdd43d9 Add before_script to .travis.yml 2016-02-16 22:22:37 +02:00
Roman Hotsiy
328a3323e0 fix npm prepublish issue 2016-02-16 22:08:30 +02:00
Roman Hotsiy
659566234e reinstall angular beta.6 due to failing build on travis 2016-02-16 20:20:11 +02:00
Roman Hotsiy
503cbab2f0 Updated angular to beta.6 + fix test 2016-02-16 15:31:12 +02:00
Making GitHub Delicious
791f6e1b64 add waffle.io badge 2016-02-13 09:08:51 -07:00
Roman Hotsiy
a7913dec59 Upgrade to Angular 2.0.0-beta.3 + refactoring 2016-02-11 13:38:44 +02:00
Roman Hotsiy
9744cddb16 Update tests after refactoring 2016-02-10 17:18:36 +02:00
Roman Hotsiy
5485df84fe Various refactoring
- renam DOM elements variables to start from $
- use DI for OptionsManager
- move loading styles into separate CSS file
- minor other refactors
2016-02-10 15:48:07 +02:00
Roman Hotsiy
e68054553d Fix build 2016-02-10 13:36:10 +02:00
Roman Hotsiy
3fa43e72cf minor styles update 2016-02-10 13:22:40 +02:00
Roman Hotsiy
db7f500ba0 IE10, IE9 Fixes
Use Reflect.metadate decorator instead of Class.parameters
Add fallback old syntax of flexbox
Other minor styling fixes
2016-02-10 13:19:50 +02:00
Roman Hotsiy
f723240145 Fix tests 2016-02-07 16:59:41 +02:00
Roman Hotsiy
7e4d56c405 IE/Edge ui fixes 2016-02-07 16:55:53 +02:00
Roman Hotsiy
4acae04d96 Animate loading message 2016-02-07 16:11:58 +02:00
Roman Hotsiy
ea6df01bfd Cache same schema views 2016-02-07 16:11:15 +02:00
Roman Hotsiy
fa81187e10 Use operationId in links; fixes #14 2016-02-07 16:10:32 +02:00
Roman Hotsiy
7f57558225 fixed #12: schema representation on Safari 2016-02-06 18:02:10 +02:00
Roman Hotsiy
e861ae9add Display enums info 2016-02-06 17:00:36 +02:00
Roman Hotsiy
fae59c7917 Fix path params rendering 2016-02-04 11:49:00 +02:00
424 changed files with 101112 additions and 9291 deletions

View File

@ -1,12 +0,0 @@
engines:
eslint:
enabled: true
scss-lint:
enabled: true
fixme:
enabled: true
ratings:
paths:
- "lib/**"
exclude_paths:
- "**.spec.js"

12
.dockerignore Normal file
View File

@ -0,0 +1,12 @@
*
!src/
!config
!demo/favicon.png
!custom.d.ts
!typings/styled-patch.d.ts
!tsconfig.json
!webpack.config.ts
!package.json
!package-lock.json

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

View File

@ -1,5 +0,0 @@
build/
gulpfile.js
*.conf.js
*.config.js
demo/

View File

@ -1,31 +0,0 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"browser": true,
"jasmine": true
},
// currently eslint doesn't support extension-typed configs
"globals": {
"should": true,
"expect": true,
"sinon": true
},
"rules": {
"quotes": [2, "single"],
"no-console": 0,
"comma-spacing": 2,
"comma-style": [2, "last"],
"consistent-return": 2,
"strict": [2, "global"],
"eqeqeq": [2, "smart"],
"curly": [2, "multi-line"],
"semi-spacing": [2, {"before": false, "after": true}],
"semi": [2, "always"],
"no-extra-semi": 2,
"comma-dangle": [2, "never"],
"no-sequences": 2,
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"]
}
}

54
.eslintrc.js Normal file
View File

@ -0,0 +1,54 @@
module.exports = {
env: {
browser: true,
},
parser: '@typescript-eslint/parser',
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
createDefaultProgram: true,
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
plugins: ['react', 'react-hooks', '@typescript-eslint', 'import'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-types': ['error', { types: { object: false }, extendDefaults: true }],
'@typescript-eslint/no-var-requires': 'off',
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/no-extraneous-dependencies': 'error',
'import/no-internal-modules': [
'error',
{
allow: [
'prismjs/**',
'perfect-scrollbar/**',
'react-dom/*',
'core-js/**',
'memoize-one/**',
'unfetch/**',
'raf/polyfill',
'**/fixtures/**', // for tests
],
},
],
},
};

2
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,2 @@
* @Redocly/keyboard-warriors
/docs/ @Redocly/technical-writers

98
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,98 @@
# Redoc Contributing Guide
Hi! We're really excited that you are interested in contributing to Redoc. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
- [Redoc Contributing Guide](#redoc-contributing-guide)
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Commonly used NPM scripts](#commonly-used-npm-scripts)
- [Project Structure](#project-structure)
## Issue Reporting Guidelines
- Before filing a new issue, try to make sure your problem doesnt already exist.
- The best way to get your bug fixed is to provide a reduced test case.
## Pull Request Guidelines
Before submitting a pull request, please make sure the following is done:
1. Fork the repository and create your branch from main.
2. Run `npm install` in the repository root.
3. If youve fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`npm test`). Tip: `npm test -- --watch TestName` is helpful in development.
5. Format your code with prettier (`npm run prettier`).
## Development Setup
You need [Node.js](http://nodejs.org) at `v12.0.0+`.
After cloning the repo, run:
```bash
$ npm install # or npm
```
### Commonly used NPM scripts
``` bash
# dev-server, watch and auto reload playground
$ npm start
# start playground app in production environment
$ npm run start:prod
# runt tslint
$ npm run lint
# try autofix tslint issues
$ npm run lint -- --fix
# run unit tests
$ npm run unit
# run e2e tests
$ npm run e2e
# Make sure you have created bundle before running e2e test
# E.g. run `npm run bundle` and wait for the finishing process.
# open cypress UI to debug e2e test
$ npm run cy:open
# run the unit tests (includes linting and license checks)
$ npm test
# prepare bundles
$ npm run bundle
# format the code using prettier
$ npm run prettier
# auto-generate changelog
$ npm run changelog
```
There are some other scripts available in the `scripts` section of the `package.json` file.
## Project Structure
- **`benchmark`**: contains basic perf benchmark. Not fully ready yet
- **`demo`**: contains project demo with demo specs and HMR playground used in development
- `demo/playground`: HMR Playground used in development
- **`docs`**: contains extra docs (linked from README.md)
- **`e2e`**: contains e2e tests. The e2e tests are written and run with [Cypress](https://www.cypress.io/).
- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [MobX](https://github.com/mobxjs/mobx)
- **`src/common-elements`**: contains common Styled elements or components used in multiple places
- **`src/components`**: contains main visual components
- **`src/services`**: contains different services used by Redoc including MobX stores
- **`src/services/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc)
- **`src/types`**: contains extra typescript typings including OpenAPI doc typings
- **`src/utils`**: utility functions
- **`src/styled-components.ts`**: - reexports styled-components with proper typescript annotations using theme
- **`src/theme.ts`**: - default theme (colors, fonts, etc) used by all the components

22
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Type: Bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Minimal reproducible OpenAPI snippet(if possible)**
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'Type: Enhancement'
assignees: ''
---
**Describe the problem to be solved**
A clear and concise description of what problem to be solved
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

13
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,13 @@
## What/Why/How?
## Reference
## Tests
## Screenshots (optional)
## Check yourself
- [ ] Code is linted
- [ ] Tested
- [ ] All new/updated code is covered with tests

110
.github/styles/Rules/BritishEnglish.yml vendored Normal file
View File

@ -0,0 +1,110 @@
extends: substitution
message: 'Use the US spelling "%s" instead of British "%s".'
link: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words
level: error
ignorecase: true
swap:
aeon: eon
aeroplane: airplane
ageing: aging
aluminium: aluminum
anaemia: anemia
anaesthesia: anesthesia
analyse: analyze
annexe: annex
apologise: apologize
behaviour: behavior
busses: buses
calibre: caliber
cancelled: canceled
cancellation: cancelation
catalogue: catalog
categorise: categorize
categorised: categorized
categorises: categorizes
categorising: categorizing
centre: center
cheque: check
civilisation: civilization
civilise: civilize
colour: color
cosy: cozy
cypher: cipher
dependant: dependent
defence: defense
distil: distill
draught: draft
encyclopaedia: encyclopedia
enquiry: inquiry
enrol: enroll
enrolment: enrollment
enthral: enthrall
expiry: expiration
favourite: favorite
fibre: fiber
fillet: filet
flavour: flavor
furore: furor
fulfil: fulfill
gaol: jail
grey: gray
humour: humor
honour: honor
initialled: initialed
initialling: initialing
instil: instill
jewellery: jewelry
labelling: labeling
labelled: labeled
labour: labor
libellous: libelous
licence: license
likeable: likable
liveable: livable
lustre: luster
manoeuvre: maneuver
marvellous: marvelous
matt: matte
meagre: meager
metre: meter
modelling: modeling
moustache: mustache
neighbour: neighbor
normalise: normalize
offence: offense
organise: organize
organisation: organization
orientated: oriented
paralyse: paralyze
plough: plow
pretence: pretense
programme: program
pyjamas: pajamas
rateable: ratable
realise: realize
recognise: recognize
reconnoitre: reconnoiter
rumour: rumor
sabre: saber
saleable: salable
saltpetre: saltpeter
sceptic: skeptic
sepulchre: sepulcher
signalling: signaling
sizeable: sizable
skilful: skillful
sombre: somber
smoulder: smolder
speciality: specialty
spectre: specter
splendour: splendor
standardise: standardize
standardised: standardized
sulphur: sulfur
theatre: theater
travelled: traveled
traveller: traveler
travelling: traveling
unshakeable: unshakable
wilful: willful
yoghurt: yogurt

10
.github/styles/Rules/FutureTense.yml vendored Normal file
View File

@ -0,0 +1,10 @@
extends: existence
message: 'Avoid using future tense: "%s". Use present tense instead.'
link: https://intranet.redoc.ly/contributing/documentation-style-guide/#tone-and-audience
ignorecase: true
level: error
raw:
- "(going to( |\n|[[:punct:]])[a-zA-Z]*|"
- "will( |\n|[[:punct:]])[a-zA-Z]*|"
- "won't( |\n|[[:punct:]])[a-zA-Z]*|"
- "[a-zA-Z]*'ll( |\n|[[:punct:]])[a-zA-Z]*)"

11
.github/styles/Rules/HeaderGerunds.yml vendored Normal file
View File

@ -0,0 +1,11 @@
extends: existence
message: 'Do not start headings with with a gerund (ing word). Use an imperative verb instead.'
link: https://intranet.redoc.ly/contributing/documentation-style-guide/#content-organization
level: error
scope: heading
tokens:
- '^\w*ing.*'
exceptions:
- expandSingleSchemaField
- hideLoading
- hideSingleRequestSampleTab

View File

@ -0,0 +1,16 @@
extends: substitution
message: 'Use inclusive language. Consider "%s" instead of "%s".'
link: https://intranet.redoc.ly/contributing/documentation-style-guide/#grammar-and-syntax
level: error
ignorecase: true
swap:
he: they
his: their
she: they
hers: their
blacklist(?:ed|ing|s)?: blocklist
whitelist(?:ed|ing|s)?: allowlist
master: primary, main
slave: replica
he/she: they
s/he: they

8
.github/styles/Rules/OxfordComma.yml vendored Normal file
View File

@ -0,0 +1,8 @@
extends: existence
message: "Use the Oxford comma in '%s'."
link: https://docs.microsoft.com/en-us/style-guide/punctuation/commas
scope: sentence
level: error
nonword: true
tokens:
- '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]'

View File

@ -0,0 +1,150 @@
[Aa]nsible
[Aa]utostart
[Bb]locklist
[Bb]locklists
[Bb]oolean
[Bb]reakpoint
[B]reakpoints
[Cc]ancelation
[Cc]lassloading
[Cc]hargeback
[Cc]hargebacks
[Cc]he
[Cc]rypto
[Cc]ryptocurrency
[Dd]evfile|[Dd]evfiles
[Dd]ownstream
[Dd]ownstreaming
[Ff]actories|[Ff]actory
[Gg]it
[Gg]rafana
[Hh]eatmap
[Hh]elm
[Hh]ostname
[Ii]tem
[Jj]etbrains
[Kk]eycloak
[Ll]iveness
[Ll]ombok
[Ll]oopback
[Mm]aven
[Mm]inikube
[Mm]inishift
[Mm]ixin|[Mm]ixins
[Mm]odularization
[Mm]ulticluster
[Mm]ultihost
[Mm]ultinode
[Mm]ultitenant
[Mm]ultiuser
[Mm]ultizone
[Nn]amespace|[Nn]amespaces
[Nn]etcoredebug[Oo]utput
[Nn]ginx
[Oo]nboarding
[Pp]podman
[Pp]reconfigured
[Rr]eadonly
[Rr]epresentment
[Rr]ollout|[Rr]ollouts
[Rr]untime|[Rr]untimes
[Ss]erializer
[Ss]erverless
[Ss]ubnetwork
[Ss]ubpath|[Ss]ubpaths
[Tt]heia
[Tt]olerations
[Tt]ruststore
[Uu]ninstallation
[Uu]nstaged
[Uu]ntrusted
[Ww]orkspace|[Ww]orkspaces
[Yy]eoman
\.NET
adoc
Antora
API
Apigee
AsciiDoc
AWS|aws
Azure
Bierner
Bitbucket
btn
Btrfs
CentOS
Ceph
Che-Theia
CLI
ConfigMap|ConfigMaps
Ctrl
DaemonSet
Dev Workspace
Developer Perspective
DNS
Docker
Dockerfile
Dotnet
Endevor
endif
GitHub|github
GitLab
Gluster
Gradle
Grafana
GUI
HTTPS|https
I/O
IDE|ide|IDEs
Intelephense
IntelliJ IDEA
Java
Java Lombok
JSON|json
JVM|jvm
kbd
Kubespray
Laravel
Let\'s Encrypt
Mattermost
mebibytes
Microsoft Azure
millicores
Mulesoft
MySQL
Netlify
Node.js
npm
NuGet
OAuth
ocp
OmniSharp
OpenShift
OpenTracing
Operator
OperatorHub
OpenAPI
osd
PHP
PostgreSQL
Quarkus
Rebilly
Redoc
Redocly
Redocly-cli
SCM
Sharding
SonarLint
Spring Boot
SVG
Uber
URI|URIs
URL|url|URLs
Velero
Vercel
Visual Studio Code
vsix
Webview|Webviews
Woopra
YAML|yaml
Zowe

View File

37
.github/workflows/docs-tests.yaml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Documentation tests
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v15
with:
config: .markdownlint.yaml
globs: |
docs/**/*.md
README.md
vale:
name: vale action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
with:
files: '["README.md", "docs"]'
filter_mode: file
linkcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Markup Link Checker (mlc)
uses: becheran/mlc@v0.16.1
with:
args: ./docs

12
.github/workflows/e2e-tests.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: Tests e2e
on: [push]
jobs:
build-and-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run bundle
- run: npm run e2e

39
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
dockerhub:
name: Publish redoc image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: redocly/redoc
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./config/docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

132
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,132 @@
name: Publish
on:
push:
branches: [main]
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ hashFiles('package-lock.json') }}
npm-
- run: npm ci
- run: npm run bundle
- name: Store bundle artifact
uses: actions/upload-artifact@v4
with:
name: bundles
path: bundles
retention-days: 1
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm test
e2e-tests:
needs: [bundle]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- name: Download bundled artifact
uses: actions/download-artifact@v4
with:
name: bundles
path: bundles
- run: npm run e2e
check-version:
name: Check Version
runs-on: ubuntu-latest
needs: [bundle, unit-tests, e2e-tests]
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2.0.1
with:
file-url: https://cdn.jsdelivr.net/npm/redoc/package.json
static-checking: localIsNew
publish:
name: Publish to NPM
needs: [check-version]
if: needs.check-version.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v3
- name: Download bundled artifacts
uses: actions/download-artifact@v4
with:
name: bundles
path: bundles
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ hashFiles('package-lock.json') }}
npm-
- name: Before deploy
run: npm ci && npm run declarations
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-cdn:
name: Publish to CDN
needs: [check-version]
if: needs.check-version.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download all artifact
uses: actions/download-artifact@v4
- name: Publish to S3
run: npm run publish-cdn
invalidate-cache:
name: Clear cache
runs-on: ubuntu-latest
needs: [check-version, publish, publish-cdn]
if: needs.check-version.outputs.changed == 'true'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Invalidate cache
run: ./scripts/invalidate-cache.sh
shell: bash
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}

12
.github/workflows/unit-tests.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: Unit Tests
on: [push]
jobs:
build-and-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run bundle
- run: npm test

20
.gitignore vendored
View File

@ -9,6 +9,7 @@
# Linux trash folder which might appear on any partition or disk
.Trash-*
demo/dist/
### Node ###
# Logs
@ -20,10 +21,19 @@ npm-debug.log*
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules
#jspm
jspm_packages
lib/
stats.json
cypress/
bundles/
typings/*
!typings/styled-patch.d.ts
/benchmark/revisions
/dist
/demo/build
.tmp
/coverage
.ghpages-tmp
stats.json
yarn.lock
.idea
.vscode
.eslintcache

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run pre-commit

54
.markdownlint.yaml Normal file
View File

@ -0,0 +1,54 @@
---
# Default rules: https://github.com/github/super-linter/blob/master/TEMPLATES/.markdown-lint.yml
# Rules by id
# Unordered list style
MD004: false
# Unordered list indentation
MD007:
indent: 2
MD013:
# TODO: Consider to decrease allowed line length
line_length: 800
tables: false
## Allow same headers in siblings
MD024:
siblings_only: true
# Multiple top level headings in the same document
MD025:
front_matter_title: ''
# Trailing punctuation in heading
MD026:
punctuation: '.,;:。,;:'
# Ordered list item prefix
MD029: false
# Unordered lists inside of ordered lists
MD030: false
# Inline HTML
MD033: false
# No bare urls
MD034: false
# Emphasis used instead of a heading
MD036: false
# Disable "First line in file should be a top level heading"
# We use uncommon format to add metadata.
# TODO: Consider to use "YAML front matter".
MD041: false
# Rules by tags
blank_lines: false
MD046: false
# code-block-style

4
.mlc.toml Normal file
View File

@ -0,0 +1,4 @@
# Ignore these links, we can't check them from this subproject
ignore-links=["../*", "/docs/*"]
# Path to the root folder used to resolve all relative paths
root-dir="./docs"

View File

@ -1,12 +1,6 @@
.DS_Store
**/.*
.tmp
node_modules
jspm_packages
tests
lib
demo
build
coverage
*
!bundles/*
!typings/**/*
!package.json
!README.md
!LICENSE

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
*.md

View File

@ -1,53 +0,0 @@
language: node_js
node_js:
- '4.0'
branches:
except:
- releases
matrix:
include:
- env: JOB=e2e
fast_finish: true
allow_failures:
- env: JOB=e2e
env:
global:
- GH_REF: github.com/Rebilly/ReDoc.git
- GIT_AUTHOR_EMAIL: redoc-bot@users.noreply.github.com
- GIT_AUTHOR_NAME: RedocBot
- SAUCE_USERNAME: redoc
- secure: OgYIXlyF3tvHVrMjqIMR7UPhNvMzNZRkKE++LsQPUT4aoUmHoeukjgE9tKCZac3Z+PcAlgHQ6dPUqjqij2d/emYBIrCx4ABvTOnxQYHbk+8GriwPvQjV33MCfKvRQAf3XPNcga02aOO/EEGejrtY/i5sz86XPZFXap4scxbvnF0rzOwGU9/A40JLsvKjtfdRxJ3aC2QBnUHP9JkfBOzbs3jjwEWYN7HdUBqtYU+wiUwvHhpEPQ8BVNF5ETp5OxxkTdqJlMRf3azC4U/Rl8dhUXZP2l1ZBdpgahDvSkx1zXPwKRg1jos88jahqH/v8DLHtXNuYQy4S48nKWZfaRtQegG/XsYAftYPtYage7L9D0nFQW9YZI0vwUBEzh2YTf+QNpVwUSyZhVuS1oS+scTb8RU8BVVZd6hRpJiaI2YiPM6ZFN7a69deV0cASov3yI7GSfeq4MmB4hu72Le+GhemQMLRxNgtr32c18XW1XoHEnpV7s0eKXnZrevnM06tW/nX9TQXGloaMUeQzoZY0AuF00zmrHDaNgwT63ULjY0W591Ey1Ztfq4ixdCoi6IPAtl49vTnNMMMqatI7Si/haI6hGyTy+H0xK1GlUpBCe5CGusXDSKUqrlKS5Izreepfj1G+12391ixiapkwV3SbYdQEhcDt7HWupyI4Zfkvg8EwwE=
- secure: H2GClDJ7TEQaWgnk8d2fIVDpLwG3rTmN8TalUzrCqXGoG6ylCVmlwzKLgfPPWrVgSA7QTdfNV0ab7c2KyPoZBinHmeGMSuKNLVbhOXRc2VFxTBntBTuyJhfCgQEpUKvJesJUuv5RuBn//wC7VZcVVNc06TZDEe8+aDVYQuCRMXZJ4X3e6nSZ64QX2veyVcr+TjnRsZPkeBVcK9hngvuaxLb/hbJ85CvjiseZRt47PGIcrEpMn9n2GMw1m0fNnPoN+MBTSCnIklTmdjPG7t4GUSLmD6H0lNLdXuehYqmQAHgYrLec1aiFlV57QaDoDZrq2hSf4vDmCB/FVydGhD5JunI67pujoV2OnD1V80eUZhYNWOYsJ2Nfp4NxgXsPUcE6zWLYsLfktMPZADhOXInQRACt1cnx8zMYKLnch1RY/ZqjSg0nPtRjLzQ0lNsw5leixvBdBnMjxYHVyAWVwg8WiJMaLO9vog2Qnxg1NTacHO2CsOmm2rw6stpg7ndp/+nOleRlfUKggjt0Tn3FjwCIXeGup2P2EBa+WW2YMAaoMFofYviR5vRlKBgdKo9fsAruaO1r6nm2EdAjOlniyw92bEfU/qOey1nVp/oK2S82uT5In8KB7vl6rF3ak7WAsT9Q5vZUhsrG+eE4PVyIyWNBhs4A7pSwZGHDR/MYtp0E2ug=
- secure: QiSLFxMS0fNLQAuG081Oi22OkL8BqCDnZVGk0a69azNzl5vv3PCcYO2Sjbloe48gPVH3p5AonDTtDEtnUbMcCJjtrhggqs5gSilO+UVgDb+4LfrYDnJ8ffaeVGIugay9wl2aJVz3iNbnIovGP7Nw+M/OWtLc2xq6zE1rIJkdRJ4K55PYfO8EMDvzI7hjZxSZ+Kgglcdl/wdBSKXy/qG0atALQU9ilJnk/DcobCjaUjgH/v0HXTSO8K3TNso6Zo4HOO6xWXHDZnJ2sLNltW1jveBpfCr/ZlccgPASU03nIudJyKvX8V4fXQ+2Z2Rj3JtR0x95SSH3M7ixx3s4teiXNFe9HPMfN1NLh/zf8UmgWIN1uwyYecsjRVzz+ZsfnrNBjGyXdEJg5c6SZGIa/UMSxaQFdRzEA419qw2eJ9qcmfNPyIvijugEBupJsxK6MW+mrD8qaGKQDzEP1dD7PUlr1BBckFNI8SZKD0gEaqM/ibebxrMS2IcGE5Nk7qLdaOAdB1plXAhMl+PGNaPx4+cniUqIIpgDTX8hlmd/Qk8ThyN5Z4aQyWI2WfH1BSqwg8dQfB5B6WNUDbJh/4Z6AX7e7ACiMLKoRkBTWpQ1FIwEJh5j8X/mtMBjf4+HSf8kfnAWFCmPTpRcYz9i4ZUDfa/9QKMoumCjokfItU7Ue2UE5v4=
- secure: apiavCfCQngL9Een1m7MIXMf3bqO3rY4YY59TMBl/yFKi80CEsHPHhgVUkl6hC+aM5PeBt/vgjh37rHMX31j/pcSZ4Z8SO/4Bwr36iHfhSxSEuAQog8P07qWqH7wYYWGIVmF682stgl0fYF+GN92sx/6edFVzsWVECf2G7imtICKSTbhKGm3Dhn2JwGnhD7eyfgZ33omgiaswumdu0xABoXDfqSZR+16fC4Ap5rhv3fXO9ndvRNy1STn376nT+my6e86UrQL4aS/S+HNHgIe1BUs+5cOp6Jgw6t0ie7phY0EAiECsRxy9K4e3Dctv9m6+Wma4+vy65MS0zGyrqey6oyV4l827sCOjrD1qcqc9bX6FlMSouVoNfE4ZjINNAbgigTaiLSoDSPcf5I5smkkM2ezzFOMSZwZxNdaNL2LKb97vc8m/ZUkv0sKZyT7oqVL7aJweEivsSHj5l2KR8Z7XrVB1y2eI6GvyTSa/d+CL4dSRzjh8+IRN047YBrdTKD5IkdT0upfoBu14WPUfFmLKxX+iMCslXRWb6kwojhrWNYmZvL65KRAzJ6+eIPDG/W5QUOpYyYT77bLlBQjVo6NmVvl9v3HMECq9CHH0ivKFBGPiKMOx7cJkTax3FuyznOW2WCXB9kTb5Zk9toaiNlSp9L6ll/h2Eyxa6n6sWUgmmM=
addons:
sauce_connect: true
cache:
directories:
- node_modules
- jspm_packages
before_install:
- travis_retry npm install jspm
- jspm config registries.github.auth $JSPM_GITHUB_AUTH_TOKEN
before_deploy:
- npm run build-dist
deploy:
- skip_cleanup: true
provider: script
script: ./build/deploy_gh_pages.sh
on:
branch: master
condition: $JOB != e2e
- skip_cleanup: true
provider: script
script: npm run branch-release
on:
branch: master
condition: $JOB != e2e
- provider: npm
skip_cleanup: true
email: gotsijroman@gmail.com
api_key:
secure: PuhWLERrCEFmXmdFpw2OVFlqpOIVDmgwk5JUJOYaFdVCh/smp0+jZCQ4vrdFpuG96rnDVirD+A8xvW6NgsNNaRthLgOB/LRdFN69rU6Gvn3At6wlnC55t5dlhxPvCfnzJcHVBLXX4EmMkjnZqDg2uczXTzPodr3FnQJNuXmP8B33fzDVLyHccvXZ90abwXWVrgRIXPU28niqCR8DOC2OTzs7wqz+BLNkYDRRbyYXsg62HWuD33x5iof5IqBmhzBt3usCGmF3QGcgHrXHdZw3sZnit8+Bua++3KrXR0x6HGXXN1AoXVmCAkCa5OTQ5R3tCRxiJN3P2KLnvWeZR74sTFkovJB/6pGCvbJ/c7Wnuw6sD7SgOUBD359ULB6lAf5OnxBLoNebX4JxxVXF+zA4E3Bl44VxkzDpPWc15xqBPMB5vBREzMVmJ5mExn2s5cmLQjADbl9h0y6gZnhnNJ+iTmqtrVyM0ZkF2rPrzrTdGD+ULmRIlTMkdD1bh+/TJ3RdXT3P4/zNUJmiNnvgnnJVYYvsGaXWF+7uCVHT/8k2RsoSHqgkqh0gkDqGSwVix55y5mC7T2Vk9lMBhm6MvFJXaonOX0kxJS4EDQ3plPd6/ybG+TLhwggYnQ8o9msU5Nt6FpUShKiezjKurIhbQZdwlVivX3tahjW2QjNDO58xGgY=
on:
tags: true

48
.vale.ini Normal file
View File

@ -0,0 +1,48 @@
# Vale configuration file.
# See: https://docs.errata.ai/vale/config
# The relative path to the folder containing linting rules (styles).
StylesPath = .github/styles
# Vocab define the exceptions to use in *all* `BasedOnStyles`.
# spelling-exceptions.txt triggers `Vale.Terms`
# reject.txt triggers `Vale.Avoid`
# See: https://docs.errata.ai/vale/vocab
Vocab = Rules
# Minimum alert level
# -------------------
# The minimum alert level in the output (suggestion, warning, or error).
# If integrated into CI, builds fail by default on error-level alerts, unless you run Vale with the --no-exit flag
MinAlertLevel = suggestion
# IgnoredScopes specifies inline-level HTML tags to ignore.
# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still won't raise any alerts.
# Default: ignore `code` and `tt`.
IgnoredScopes = code, tt, img, url, a, body.id
# SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes.
# Default: ignore `script`, `style`, `pre`, and `figure`.
# For AsciiDoc: by default, listingblock, and literalblock.
SkippedScopes = script, style, pre, figure, code, tt, listingblock, literalblock
# Rules for matching file types. See: https://docs.errata.ai/vale/scoping
[formats]
properties = md
mdx = md
# Rules for .MD, .MDX
[*.{md,mdx}]
BasedOnStyles = Rules
# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs.
TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[)
Vale.Repetition = NO
Vale.SentenceSpacing = NO
Vale.Spelling = NO
# /End of rules for .MD, .MDX
# Process .ini files
[*.ini]

2339
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015, Rebilly, Inc.
Copyright (c) 2015-present, Rebilly, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

209
README.md
View File

@ -1,113 +1,144 @@
# ReDoc
[![Build Status](https://travis-ci.org/Rebilly/ReDoc.svg?branch=master)](https://travis-ci.org/Rebilly/ReDoc) [![Coverage Status](https://coveralls.io/repos/Rebilly/ReDoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Rebilly/ReDoc?branch=master) [![Code Climate](https://codeclimate.com/github/Rebilly/ReDoc/badges/gpa.svg)](https://codeclimate.com/github/Rebilly/ReDoc) [![David](https://david-dm.org/Rebilly/ReDoc/dev-status.svg)](https://david-dm.org/Rebilly/ReDoc#info=devDependencies)
<div align="center">
<img alt="Redoc logo" src="https://raw.githubusercontent.com/Redocly/redoc/main//docs/images/redoc.png" width="400px" />
[![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/swagger-parser) [![Bower](http://img.shields.io/bower/v/redoc.svg)](http://bower.io/) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Rebilly/ReDoc/blob/master/LICENSE)
# Generate beautiful API documentation from OpenAPI
[![Browser Compatibility](https://saucelabs.com/browser-matrix/redoc.svg)](https://saucelabs.com/u/redoc)
[![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/main/LICENSE)
Swagger-generated API Reference Documentation
[![bundle size](http://img.badgesize.io/https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![jsDelivr status](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc)
</div>
[Live demo](http://rebilly.github.io/ReDoc/)
## Deployment
## About Redoc
#### tl;dr
```html
<!DOCTYPE html>
<html>
<head>
<title>ReDoc</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
Redoc is an open source tool for generating documentation from OpenAPI (formerly Swagger) definitions.
<!--
ReDoc uses font options from the parent element
So override default browser styles
-->
<style>
body {
margin: 0;
padding: 0;
font-family: Verdana, Geneva, sans-serif;
font-size: 14px;
color: #333;
}
</style>
</head>
<body>
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'>
</redoc>
<script src="bower_components/redoc/dist/redoc.min.js"> </script>
</body>
</html>
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/main/demo/redoc-demo.png)
## Live demo
If you want to see how Redoc renders 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 features
- Responsive three-panel design with menu/scrolling synchronization
- Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0
- Ability to integrate your API introduction into the side menu
- High-level grouping in side menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension
- [Simple integration with `create-react-app`](https://redocly.com/docs/redoc/quickstart/react/)
- Code samples support (with vendor extension) <br>
![code samples in action](docs/images/code-samples-demo.gif)
## Usage
Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.
### Generate documentation from the CLI
If you have Node installed, quickly generate documentation using `npx`:
```bash
npx @redocly/cli build-docs openapi.yaml
```
#### 1. Install redoc
Install using [bower](bower.io):
The tool outputs by default to a file named `redoc-static.html` that you can open in your browser.
bower install redoc
> [Redocly CLI](https://github.com/Redocly/redocly-cli/) does more than docs; check it out and add linting, bundling, and more to your API workflow.
or using [npm](https://docs.npmjs.com/getting-started/what-is-npm):
### Add an HTML element to the page
npm install redoc --save
Create an HTML page, or edit an existing one, and add the following within the body tags:
Alternatively you can just download [`redoc.min.js`](https://raw.githubusercontent.com/Rebilly/ReDoc/releases/dist/redoc.min.js).
#### 2. Reference redoc script in HTML
Then reference [`redoc.min.js`](https://raw.githubusercontent.com/Rebilly/ReDoc/releases/dist/redoc.min.js) in your HTML page:
```html
<script src="bower_components/redoc/dist/redoc.min.js"> </script>
```
For npm:
```html
<script src="node_modules/redoc/dist/redoc.min.js"> </script>
<redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
```
#### 3. Add `<redoc>` element to your page
```html
<redoc spec-url="<url to your spec>"></redoc>
```
Open the HTML file in your browser, and your API documentation is shown on the page.
#### 4. Enjoy :smile:
Add your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.
### More usage options
Check out the [deployment documentation](./docs/deployment/intro.md) for more options, and detailed documentation for each.
## Redoc vs. Redocly API Reference
Redoc is Redocly's community-edition product. Looking for something more?
We also offer [hosted API reference documentation](https://redocly.com/docs/api-registry/guides/api-registry-quickstart/)
with additional features including:
* Try-it console
* Automated code samples
* Pagination
* Extra theme options
### Documentation and resources
- [Reference docs](https://redocly.com/docs/api-reference-docs/getting-started/) - we take care of the hosting
- [Redoc](https://redocly.com/docs/redoc/) - detailed documentation for this open source project (also in the `docs/` folder)
- [Command-line interface to bundle your docs into a web-ready HTML file](https://redocly.com/docs/cli/commands/build-docs/)
- API linting, bundling, and much more with open source [Redocly CLI](https://redocly.com/docs/cli)
## Showcase
A sample of the organizations using Redocly tools in the wild:
- [Rebilly](https://api-reference.rebilly.com/)
- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)
- [Zuora](https://www.zuora.com/developer/api-reference/)
- [Discourse](http://docs.discourse.org)
- [Commbox](https://www.commbox.io/api/)
- [APIs.guru](https://apis.guru/api-doc/)
- [BoxKnight](https://www.docs.boxknight.com/)
- [Quaderno API](https://developers.quaderno.io/api)
_Pull requests to add your own API page to the list are welcome_
## Configuration
#### Swagger vendor extensions
ReDoc makes use of the following [vendor extensions](http://swagger.io/specification/#vendorExtensions):
Redoc is highly configurable, see the [configuration documentation](docs/config.md) for details.
### OpenAPI specification extensions
Redoc uses the following [specification extensions](https://redocly.com/docs/api-reference-docs/spec-extensions/):
* [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo
* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for handling out common things like Pagination, Rate-Limits, etc
* [`x-code-samples`](docs/redoc-vendor-extensions.md#x-code-samples) - specify operation code samples
* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for tags that refer to non-navigation properties like Pagination, Rate-Limits, etc
* [`x-codeSamples`](docs/redoc-vendor-extensions.md#x-codeSamples) - specify operation code samples
* [`x-badges`](docs/redoc-vendor-extensions.md#x-badges) - specify operation badges
* [`x-examples`](docs/redoc-vendor-extensions.md#x-examples) - specify JSON example for requests
* [`x-nullable`](docs/redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable
* [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories
* [`x-tagGroups`](docs/redoc-vendor-extensions.md#x-tagGroups) - group tags by categories in the side menu
* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
* [`x-additionalPropertiesName`](docs/redoc-vendor-extensions.md#x-additionalPropertiesName) - ability to supply a descriptive name for the additional property keys
* [`x-summary`](docs/redoc-vendor-extensions.md#x-summary) - for Response object, use as the response button text, with description rendered under the button
* [`x-explicitMappingOnly`](docs/redoc-vendor-extensions.md#x-explicitMappingOnly) - in Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object
#### Options
* `spec-url` - relative or absolute url to your spec file
* `scroll-y-offset` - If set, specifies a vertical scroll-offset. This is often useful when there are fixed positioned elements at the top of the page, such as navbars, headers etc.
`scroll-y-offset` can be specified in various ways:
* **number**: A fixed number of pixels to be used as offset
* **selector**: selector of the element to be used for specifying the offset. The distance from the top of the page to the element's bottom will be used as offset.
* **function**: A getter function. Must return a number representing the offset (in pixels).
## Releases
## Advanced usage
Instead of adding `spec-url` attribute to the `<redoc>` element you can initialize ReDoc via globally exposed `Redoc` object:
```js
Redoc.init(specUrl, options)
```
**The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch.**
`options` is javascript object with camel-cased version of options names as the keys. For example:
```js
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
scrollYOffset: 50
})
```
-----------
## Running locally
1. Clone repository
`git clone https://github.com/Rebilly/ReDoc.git`
2. Go to the project folder
`cd ReDoc`
3. Install node modules and front-end dependencies
`npm install`
`npm run jspm-install`
4. _(optional)_ Replace `demo/swagger.json` with your own schema
5. Start the server
`npm start`
6. Open `http://localhost:9000`
All the 2.x releases are deployed to npm and can be used with Redocly-cdn:
- particular release, for example, `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js
- `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**:
- 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 - points to latest 1.x.x release since 2.x releases are not hosted on this CDN but on unpkg.
## Development
see [CONTRIBUTING.md](.github/CONTRIBUTING.md)

125
benchmark/benchmark.js Normal file
View File

@ -0,0 +1,125 @@
const beautifyBenchmark = require('beautify-benchmark');
const sh = require('shelljs');
const fs = require('fs');
const pathJoin = require('path').join;
const spawn = require('child_process').spawn;
const puppeteer = require('puppeteer');
const args = process.argv.slice(2);
args[0] = args[0] || 'HEAD';
args[1] = args[1] || 'local';
let started = false;
console.log('Benchmarking revisions: ' + args.join(', '));
const localDistDir = './benchmark/revisions/local/bundles';
sh.rm('-rf', localDistDir);
console.log(`Building local dist: ${localDistDir}`);
sh.mkdir('-p', localDistDir);
exec(`npm run bundle:lib --output-path ${localDistDir}`);
const revisions = [];
for (const arg of args) {
revisions.push({ name: arg, path: buildRevisionDist(arg) });
}
const configFile = `
export const revisions = [ ${revisions.map(rev => JSON.stringify(rev)).join(', ')} ];
`;
const configDir = './benchmark/revisions/config.js';
console.log(`Writing config "${configDir}"`);
fs.writeFileSync(configDir, configFile);
console.log('Starting benchmark server');
const proc = spawn('npm', ['run', 'start:benchmark']);
proc.stdout.on('data', data => {
if (data.toString().indexOf('Compiled successfully') > -1) {
console.log('Server started');
startBenchmark();
}
});
proc.stderr.on('data', data => {
console.error(data.toString());
});
proc.on('close', code => {
console.log(`Benchmark server stopped with code ${code}`);
});
async function runPuppeteer() {
return await puppeteer
.launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] })
.then(async browser => {
const page = await browser.newPage();
let resolve;
const prom = new Promise(_resolve => {
resolve = _resolve;
});
page.on('console', async msg => {
const args = msg.args();
const obj = args.length > 0 && (await args[0].jsonValue());
if (!obj) return;
if (obj.done) {
beautifyBenchmark.log();
// resolve(obj);
} else if (obj.cycle) {
beautifyBenchmark.add(obj.cycle);
} else if (obj.allDone) {
resolve();
} else {
console.log(obj);
}
});
await page.goto('http://127.0.0.1:9090', { timeout: 0 });
const res = await prom;
await browser.close();
return res;
});
}
async function startBenchmark() {
if (started) return;
started = true;
console.log('Starting benchmarks');
await runPuppeteer();
console.log('Killing benchmark server');
proc.kill('SIGINT');
}
function exec(command) {
const { code, stdout, stderr } = sh.exec(command, { silent: true });
if (code !== 0) {
console.error(stdout);
console.error(stderr);
sh.exit(code);
}
return stdout.trim();
}
function buildRevisionDist(revision) {
if (revision === 'local') {
return localDistDir;
}
const hash = exec(`git log -1 --format=%h "${revision}"`);
const buildDir = './benchmark/revisions/' + hash;
const distDir = buildDir + '/bundles';
if (sh.test('-d', distDir)) {
console.log(`Using prebuilt "${revision}"(${hash}) revision: ${buildDir}`);
return distDir;
}
console.log(`Building "${revision}"(${hash}) revision: ${buildDir}`);
sh.mkdir('-p', buildDir);
exec(`git archive "${hash}" | tar -xC "${buildDir}"`);
const pwd = sh.pwd();
sh.cd(buildDir);
exec('npm uninstall cypress puppeteer && npm install && npm run bundle:lib');
sh.cd(pwd);
return distDir;
}

28
benchmark/index.html Normal file
View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>ReDoc</title>
<style>
body {
margin: 0;
padding: 0;
}
redoc {
display: block;
}
</style>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
</head>
<body>
<redoc id="example"></redoc>
<!-- <redoc spec-url="./openapi.yaml"></redoc> -->
<script src="https://unpkg.com/lodash@4.17.4/lodash.js"></script>
<script src="https://unpkg.com/benchmark@2.1.4/benchmark.js"></script>
<!-- <script src="../bundles/redoc.standalone.js"></script> -->
</body>
</html>

128
benchmark/index.tsx Normal file
View File

@ -0,0 +1,128 @@
import * as React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { Redoc, RedocProps } from '../src/components';
import { loadAndBundleSpec } from '../src/utils';
import { revisions } from './revisions/config';
import { configure } from 'mobx';
declare var Benchmark;
configure({
isolateGlobalState: true,
});
const node = document.getElementById('example');
const renderRoot = (Component: typeof Redoc, props: RedocProps) =>
render(<Component {...props} />, node!);
async function importRedocs() {
return Promise.all(
revisions.map(rev => {
return import('./' + rev.path.substring(12) + '/redoc.lib.js');
}),
);
}
function startFullTime(redocs, resolvedSpec) {
return new Promise(async resolve => {
const suite = new Benchmark.Suite('Full time', {
maxTime: 20,
initCount: 2,
onStart(event) {
console.log(' ⏱️ ' + event.currentTarget.name);
},
onCycle(event) {
console.log({ cycle: event.target });
},
onComplete() {
console.log({ done: true });
setTimeout(() => resolve(), 10);
},
});
revisions.forEach((rev, idx) => {
const redoc = redocs[idx];
suite.add(rev.name, () => {
const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');
renderRoot(redoc.Redoc, { store });
unmountComponentAtNode(node!);
});
});
suite.run({ async: true });
});
}
function startInitStore(redocs, resolvedSpec) {
return new Promise(async resolve => {
const suite = new Benchmark.Suite('Create Store Time', {
maxTime: 20,
initCount: 2,
onStart(event) {
console.log(' ⏱️ ' + event.currentTarget.name);
},
onCycle(event) {
console.log({ cycle: event.target });
},
onComplete() {
console.log({ done: true });
setTimeout(() => resolve(), 10);
},
});
revisions.forEach((rev, idx) => {
const redoc = redocs[idx];
suite.add(rev.name, () => {
const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');
store.dispose();
});
});
suite.run({ async: true });
});
}
function startRenderTime(redocs, resolvedSpec) {
return new Promise(async resolve => {
const suite = new Benchmark.Suite('Render time', {
maxTime: 20,
initCount: 2,
onStart(event) {
console.log(' ⏱️ ' + event.currentTarget.name);
},
onCycle(event) {
console.log({ cycle: event.target });
unmountComponentAtNode(node!);
},
onComplete() {
console.log({ done: true });
setTimeout(() => resolve(), 10);
},
});
revisions.forEach((rev, idx) => {
const redoc = redocs[idx];
const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');
suite.add(rev.name, () => {
renderRoot(redoc.Redoc, { store });
});
});
suite.run({ async: true });
});
}
async function runBenchmarks() {
const redocs: any[] = await importRedocs();
const resolvedSpec = await loadAndBundleSpec('openapi.yaml');
await startInitStore(redocs, resolvedSpec);
await startRenderTime(redocs, resolvedSpec);
await startFullTime(redocs, resolvedSpec);
console.log({ allDone: true });
}
runBenchmarks();

View File

@ -1,30 +0,0 @@
{
"name": "redoc",
"description": "Swagger-generated API Reference Documentation",
"main": "dist/redoc.min.js",
"authors": [
"Roman Hotsiy"
],
"repository": {
"type": "git",
"url": "git://github.com/Rebilly/ReDoc"
},
"license": "MIT",
"keywords": [
"Swagger",
"JSON-Schema",
"API",
"documentation",
"Angular 2"
],
"homepage": "https://github.com/Rebilly/ReDoc",
"moduleType": ["globals", "amd"],
"ignore": [
"**/.*",
"node_modules",
"tests",
"lib",
"demo",
"build"
]
}

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -o pipefail
(
set -e
set -x
cd demo
git init
git config user.name "Travis-CI"
git config user.email "travis@travis"
cp -r ../dist ./dist
git add .
git commit -m "Deployed to Github Pages"
git push --force "https://${GH_TOKEN}@${GH_REF}" master:gh-pages 2>&1
) 2>&1 | sed "s/${GH_TOKEN}/xxPASSxx/"

View File

@ -1,11 +0,0 @@
module.exports = {
source: 'lib/**/*.js',
html: 'lib/**/*.html',
scss: 'lib/**/*.scss',
sourceEntryPoint: 'lib/index.js',
outputName: 'redoc',
output: 'dist/',
tmp: '.tmp/',
demo: 'demo/**/*',
tests: '{lib,tests}/**/*.spec.js'
};

View File

@ -1,6 +0,0 @@
#!/bin/bash
if [ "$JOB" = "e2e" ]; then
npm run e2e
else
npm run unit
fi

View File

@ -1,102 +0,0 @@
var gulp = require('gulp');
var runSequence = require('run-sequence');
var Builder = require('systemjs-builder');
var inlineNg2Template = require('gulp-inline-ng2-template');
var path = require('path');
var sourcemaps = require('gulp-sourcemaps');
var paths = require('../paths');
var fs= require('fs');
var concat = require('gulp-concat');
var gulp = require('gulp');
var sass = require('gulp-sass');
var replace = require('gulp-replace');
var rename = require('gulp-rename');
paths.redocBuilt = path.join(paths.output, paths.outputName);
gulp.task('build', function (callback) {
return runSequence(
'clean',
'bundleProd',
callback
);
});
gulp.task('buildDev', function (callback) {
return runSequence(
'clean',
'bundle',
callback
);
});
gulp.task('bundle', ['buildStatic', 'concatDeps']);
gulp.task('bundleProd', ['bundle', 'buildStaticMin', 'concatDepsMin']);
gulp.task('inlineTemplates', ['sass'], function() {
return gulp.src(paths.source, { base: './' })
.pipe(replace(/'(.*?\.css)'/g, '\'.tmp/$1\''))
.pipe(inlineNg2Template({ base: '/' }))
.pipe(gulp.dest(paths.tmp));
});
var JS_DEV_DEPS = [
'node_modules/zone.js/dist/zone-microtask.js',
'node_modules/reflect-metadata/Reflect.js',
'node_modules/babel-polyfill/dist/polyfill.js'
];
var JS_DEV_DEPS_MIN = [
'node_modules/zone.js/dist/zone-microtask.min.js',
'node_modules/reflect-metadata/Reflect.js',
'node_modules/babel-polyfill/dist/polyfill.min.js'
]
gulp.task('sass', function () {
return gulp.src(paths.scss, { base: './' })
.pipe(sass.sync({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(gulp.dest(paths.tmp));
});
// concatenate angular2 deps
gulp.task('concatDeps', ['buildStatic'], function() {
return concatDeps(JS_DEV_DEPS, paths.redocBuilt + '.js');
});
gulp.task('concatDepsMin', ['buildStatic'], function() {
return concatDeps(JS_DEV_DEPS_MIN, paths.redocBuilt + '.min.js');
});
gulp.task('buildStatic', ['inlineTemplates'], function(cb) {
bundle(paths.redocBuilt + '.js', false, cb);
});
gulp.task('buildStaticMin', ['inlineTemplates'], function(cb) {
bundle(paths.redocBuilt + '.min.js', true, cb);
});
function concatDeps(deps, file) {
return gulp.src(deps.concat([file]))
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(concat(file))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('.'))
}
function bundle(outputFile, minify, cb) {
fs.existsSync('dist') || fs.mkdirSync('dist');
var builder = new Builder('./', 'system.config.js');
builder
.buildStatic(path.join(paths.tmp, paths.sourceEntryPoint),
outputFile,
{ format:'umd', sourceMaps: true, lowResSourceMaps: true, minify: minify }
)
.then(function() {
cb();
})
.catch(function(err) {
cb(new Error(err));
});
}

View File

@ -1,9 +0,0 @@
var gulp = require('gulp');
var paths = require('../paths');
var del = require('del');
var vinylPaths = require('vinyl-paths');
gulp.task('clean', function () {
return gulp.src([paths.output, paths.tmp])
.pipe(vinylPaths(del));
});

View File

@ -1,34 +0,0 @@
var gulp = require('gulp');
var gp = require('gulp-protractor');
var browserSync = require('browser-sync').create('bs-e2e');
gulp.task('test-server', function (done) {
browserSync.init({
open: false,
notify: false,
port: 3000,
ghostMode: false,
server: {
baseDir: './tests/e2e',
routes: {
'/dist': './dist',
'/swagger.yml': './demo/swagger.yml'
},
}
}, done);
});
gulp.task('e2e', ['bundleProd', 'test-server'], function(done) {
gulp.src(['tests/e2e/**/*.js'], { read:false })
.pipe(gp.protractor({
configFile: './protractor.conf.js'
})).on('error', function(e) {
browserSync.exit();
throw e;
done();
}).on('end', function() {
browserSync.exit();
done();
});
});

View File

@ -1,10 +0,0 @@
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var paths = require('../paths');
gulp.task('lint', function () {
return gulp.src([paths.source, paths.tests])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

View File

@ -1,17 +0,0 @@
var gulp = require('gulp');
var browserSync = require('browser-sync').create('bs');
gulp.task('serve', ['watch'], function (done) {
browserSync.init({
open: false,
notify: false,
port: 9000,
server: {
baseDir: './demo',
routes: {
'/dist': './dist'
},
},
reloadDelay: 500
}, done);
});

View File

@ -1,13 +0,0 @@
var gulp = require('gulp');
var Server = require('karma').Server;
/**
* Run test once and exit
*/
gulp.task('test', ['inlineTemplates'], function (done) {
new Server({
configFile: __dirname + '/../../karma.conf.js',
singleRun: true
}, done).start();
});

View File

@ -1,14 +0,0 @@
var gulp = require('gulp');
var paths = require('../paths');
var browserSync = require('browser-sync').get('bs');
function changed(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}
gulp.task('watch', ['buildDev'], function () {
gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed);
gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.scss ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed);
});

56
config/docker/Dockerfile Normal file
View File

@ -0,0 +1,56 @@
# To run:
# docker build -t redoc .
# docker run -it --rm -p 80:80 -e SPEC_URL='http://localhost:8000/swagger.yaml' redoc
# Ensure http://localhost:8000/swagger.yaml is served with cors. A good solution is:
# npm i -g http-server
# http-server -p 8000 --cors
FROM node:18-alpine
RUN apk update && apk add --no-cache git
# Install dependencies
WORKDIR /build
COPY package.json package-lock.json /build/
RUN npm ci --no-optional --ignore-scripts
RUN npm explore esbuild -- npm run postinstall
# copy only required for the build files
COPY src /build/src
COPY webpack.config.ts tsconfig.json custom.d.ts /build/
COPY config/webpack-utils.ts /build/config/
COPY typings/styled-patch.d.ts /build/typings/styled-patch.d.ts
RUN npm run bundle:standalone
FROM nginx:alpine
ENV PAGE_TITLE="ReDoc"
ENV PAGE_FAVICON="favicon.png"
ENV BASE_PATH=
ENV SPEC_URL="http://petstore.swagger.io/v2/swagger.json"
ENV PORT=80
ENV REDOC_OPTIONS=
# copy files to the nginx folder
COPY --from=0 build/bundles /usr/share/nginx/html
COPY config/docker/index.tpl.html /usr/share/nginx/html/index.html
COPY demo/favicon.png /usr/share/nginx/html/
COPY config/docker/nginx.conf /etc/nginx/
COPY config/docker/docker-run.sh /usr/local/bin
# Provide rights to the root group to write to nginx repositories (needed to run in OpenShift)
RUN chgrp -R 0 /etc/nginx && \
chgrp -R 0 /usr/share/nginx/html && \
chgrp -R 0 /var/cache/nginx && \
chgrp -R 0 /var/log/nginx && \
chgrp -R 0 /var/run && \
chmod -R g+rwX /etc/nginx && \
chmod -R g+rwX /usr/share/nginx/html && \
chmod -R g+rwX /var/cache/nginx && \
chmod -R g+rwX /var/log/nginx && \
chmod -R g+rwX /var/run
EXPOSE 80
CMD ["sh", "/usr/local/bin/docker-run.sh"]

55
config/docker/README.md Normal file
View File

@ -0,0 +1,55 @@
# Official ReDoc Docker Image
## Usage
### Docker
Serve remote spec by URL:
docker run -it --rm -p 80:80 \
-e SPEC_URL='http://localhost:8000/swagger.yaml' redocly/redoc
Serve local file:
docker run -it --rm -p 80:80 \
-v $(pwd)/demo/swagger.yaml:/usr/share/nginx/html/swagger.yaml \
-e SPEC_URL=swagger.yaml redocly/redoc
Serve local file and watch for updates:
docker run -it --rm -p 80:80 \
-v $(pwd)/demo/:/usr/share/nginx/html/swagger/ \
-e SPEC_URL=swagger/swagger.yaml redocly/redoc
### OpenShift
To quote [OpenShift Container Platform-Specific Guidelines](https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines):
> Support Arbitrary User IDs
>
> By default, OpenShift Container Platform runs containers using an arbitrarily assigned user ID. This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node.
>
> For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group. Files to be executed should also have group execute permissions.
To comply with those requirements the `Dockerfile` contains instructions to adapt the rights for the folders:
- `/etc/nginx` because the `docker-run.sh` script modifies it at startup time
- `/usr/share/nginx/html` because the `docker-run.sh` script modifies it at startup time
- `/var/cache/nginx` because the Nginx process writes to it
- `/var/log/nginx` because the Nginx process writes to it
- `/var/run` because the Nginx process writes to it
Another issue with OpenShift is that the default exposed port `80` cannot be used as it is restricted. So one needs to use another port like `8080` (using the `PORT` configuration as described below), and then to configure the `container spec` accordingly.
## Runtime configuration options
- `PAGE_TITLE` (default `"ReDoc"`) - page title
- `PAGE_FAVICON` (default `"favicon.png"`) - URL to page favicon
- `BASE_PATH` (optional) - prepend favicon & standalone bundle with this path
- `SPEC_URL` (default `"http://petstore.swagger.io/v2/swagger.json"`) - URL to spec
- `PORT` (default `80`) - nginx port
- `REDOC_OPTIONS` (optional) - [`<redoc>` tag attributes](https://github.com/Redocly/redoc#redoc-tag-attributes)
## Build
docker build -t redocly/redoc .

View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
sed -i -e "s|%PAGE_TITLE%|$PAGE_TITLE|g" /usr/share/nginx/html/index.html
sed -i -e "s|%PAGE_FAVICON%|$PAGE_FAVICON|g" /usr/share/nginx/html/index.html
sed -i -e "s|%BASE_PATH%|$BASE_PATH|g" /usr/share/nginx/html/index.html
sed -i -e "s|%SPEC_URL%|$SPEC_URL|g" /usr/share/nginx/html/index.html
sed -i -e "s|%REDOC_OPTIONS%|${REDOC_OPTIONS}|g" /usr/share/nginx/html/index.html
sed -i -e "s|\(listen\s*\) [0-9]*|\1 ${PORT}|g" /etc/nginx/nginx.conf
exec nginx -g 'daemon off;'

6
config/docker/hooks/build Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# DockerHub cd into Dockerfile location before build
# So we have to undo this.
cd ../..
docker build -f config/docker/Dockerfile -t $IMAGE_NAME .

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>%PAGE_TITLE%</title>
<link rel="icon" href="%BASE_PATH%%PAGE_FAVICON%" />
<style>
body {
margin: 0;
padding: 0;
}
redoc {
display: block;
}
</style>
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
</head>
<body>
<redoc spec-url="%SPEC_URL%" %REDOC_OPTIONS%></redoc>
<script src="%BASE_PATH%redoc.standalone.js"></script>
</body>
</html>

71
config/docker/nginx.conf Normal file
View File

@ -0,0 +1,71 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
index index.html index.htm;
location / {
alias /usr/share/nginx/html/;
if ($request_method = 'OPTIONS') {
# Add security headers
add_header 'X-Frame-Options' 'deny always';
add_header 'X-XSS-Protection' '"1; mode=block" always';
add_header 'X-Content-Type-Options' 'nosniff always';
add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';
# Set access control header
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST') {
# Add security headers
add_header 'X-Frame-Options' 'deny always';
add_header 'X-XSS-Protection' '"1; mode=block" always';
add_header 'X-Content-Type-Options' 'nosniff always';
add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';
# Set access control header
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
if ($request_method = 'GET') {
# Add security headers
add_header 'X-Frame-Options' 'deny always';
add_header 'X-XSS-Protection' '"1; mode=block" always';
add_header 'X-Content-Type-Options' 'nosniff always';
add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';
# Set access control header
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
}
}
}
}

5
config/webpack-utils.ts Normal file
View File

@ -0,0 +1,5 @@
import * as webpack from 'webpack';
export function webpackIgnore(regexp) {
return new webpack.NormalModuleReplacementPlugin(regexp, require.resolve('lodash.noop'));
}

27
custom.d.ts vendored Normal file
View File

@ -0,0 +1,27 @@
/// <reference path="typings/styled-patch.d.ts" />
declare module '*.json' {
const content: any;
export = content;
}
declare module '*.svg' {
const content: string;
export default content;
}
declare module '*.css' {
const content: string;
export default content;
}
declare var __REDOC_VERSION__: string;
declare var __REDOC_REVISION__: string;
declare var reactHotLoaderGlobal: any;
interface Element {
scrollIntoViewIfNeeded(centerIfNeeded?: boolean): void;
}
type GenericObject = Record<string, any>;

20
cypress.config.ts Normal file
View File

@ -0,0 +1,20 @@
import { defineConfig } from 'cypress';
export default defineConfig({
fixturesFolder: false,
fileServerFolder: '.',
video: true,
projectId: 'z6eb6h',
viewportWidth: 1440,
viewportHeight: 720,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./e2e/plugins/index.js')(on, config);
},
excludeSpecPattern: '*.js.map',
specPattern: 'e2e/integration/**/*.{js,jsx,ts,tsx}',
supportFile: false,
},
});

221
demo/ComboBox.tsx Normal file
View File

@ -0,0 +1,221 @@
/**
* Could not find ready-to-use component with required behaviour so
* I quickly hacked my own. Will refactor into separate npm package later
*/
import * as React from 'react';
import styled from '../src/styled-components';
const DropDownItem = styled.li<{ $active?: boolean }>`
${(props: any) => (props.$active ? 'background-color: #eee' : '')};
padding: 13px 16px;
&:hover {
background-color: #eee;
}
cursor: pointer;
text-overflow: ellipsis;
overflow: hidden;
`;
const DropDownList = styled.ul`
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
background: #fff;
border-radius: 0 0 2px 2px;
top: 100%;
left: 0;
right: 0;
z-index: 200;
overflow: hidden;
position: absolute;
list-style: none;
margin: 4px 0 0 0;
padding: 5px 0;
font-family: Roboto, sans-serif;
overflow: hidden;
`;
const ComboBoxWrap = styled.div`
position: relative;
width: 100%;
max-width: 500px;
display: flex;
`;
const Input = styled.input`
box-sizing: border-box;
width: 100%;
padding: 0 10px;
color: #555;
background-color: #fff;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
`;
const Button = styled.button`
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
border-left: 0;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
width: 80px;
white-space: nowrap;
@media screen and (max-width: 450px) {
display: none;
}
`;
export interface ComboBoxProps {
onChange?: (val: string) => void;
options: Array<{ value: string; label: string }>;
placeholder?: string;
value?: string;
}
export interface ComboBoxState {
open: boolean;
value: string;
activeItemIdx: number;
}
export default class ComboBox extends React.Component<ComboBoxProps, ComboBoxState> {
state = {
open: false,
value: this.props.value || '',
activeItemIdx: -1,
};
open = () => {
this.setState({
open: true,
});
};
close = () => {
this.setState({
open: false,
activeItemIdx: -1,
});
};
handleChange = e => {
this.updateValue(e.currentTarget.value);
};
updateValue(value) {
this.setState({
value,
activeItemIdx: -1,
});
}
handleSelect(value: string) {
this.updateValue(value);
if (this.props.onChange) {
this.props.onChange(value);
}
this.close();
}
handleTryItClick = () => {
this.handleSelect(this.state.value);
};
handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.keyCode === 13) {
this.handleSelect(e.currentTarget.value);
} else if (e.keyCode === 40) {
const activeItemIdx = Math.min(this.props.options.length - 1, ++this.state.activeItemIdx);
this.setState({
open: true,
activeItemIdx,
value: this.props.options[activeItemIdx].value,
});
e.preventDefault();
} else if (e.keyCode === 38) {
const activeItemIdx = Math.max(0, --this.state.activeItemIdx);
this.setState({
activeItemIdx,
value: this.props.options[activeItemIdx].value,
});
e.preventDefault();
} else if (e.keyCode === 27) {
this.close();
}
};
handleBlur = () => {
setTimeout(() => this.close(), 100);
};
handleItemClick = (val, idx) => {
this.handleSelect(val);
this.setState({
activeItemIdx: idx,
});
};
renderOption = (option: { value: string; label: string }, idx: number) => {
return (
<DropDownItem
$active={idx === this.state.activeItemIdx}
key={option.value}
// tslint:disable-next-line
onMouseDown={() => {
this.handleItemClick(option.value, idx);
}}
>
<small>
<strong>{option.label}</strong>
</small>
<br />
{option.value}
</DropDownItem>
);
};
render() {
const { open, value } = this.state;
const { options, placeholder } = this.props;
return (
<ComboBoxWrap>
<Input
placeholder={placeholder}
onChange={this.handleChange}
value={value}
onFocus={this.open}
onBlur={this.handleBlur}
onKeyDown={this.handleKeyPress}
aria-label="URL to an OpenAPI definition to try"
/>
<Button onClick={this.handleTryItClick}> TRY IT </Button>
{open && <DropDownList>{options.map(this.renderOption)}</DropDownList>}
</ComboBoxWrap>
);
}
}

27363
demo/big-openapi.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
import * as yaml from 'js-yaml';
import * as React from 'react';
import { ChangeEvent, RefObject, useRef } from 'react';
import styled from '../../src/styled-components';
const Button = styled.button`
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
white-space: nowrap;
@media (max-width: 699px) {
display: none;
}
`;
function FileInput(props: { onUpload }) {
const hiddenFileInput: RefObject<HTMLInputElement> = useRef<HTMLInputElement>(null);
const handleClick = () => {
if (hiddenFileInput && hiddenFileInput.current) {
hiddenFileInput.current.click();
}
};
const uploadFile = (event: ChangeEvent<HTMLInputElement>) => {
const file = (event.target as HTMLInputElement).files![0];
const reader = new FileReader();
reader.onload = () => {
props.onUpload(yaml.load(reader.result));
};
reader.readAsText(file);
};
return (
<span>
<Button onClick={handleClick}>Upload a file</Button>
<input type="file" style={{ display: 'none' }} onChange={uploadFile} ref={hiddenFileInput} />
</span>
);
}
export default FileInput;

BIN
demo/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,23 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>ReDoc</title>
<link rel="stylesheet" href="main.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8" />
<title>Redoc Interactive Demo</title>
<meta
name="description"
content="Redoc Interactive Demo. OpenAPI-generated API Reference Documentation"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:title" content="Redoc Interactive Demo" />
<meta
property="og:description"
content="Redoc Interactive Demo. OpenAPI-generated API Reference Documentation"
/>
<meta
property="og:image"
content="https://user-images.githubusercontent.com/3975738/37729752-8a9ea38a-2d46-11e8-8438-42ed26bf1751.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<style>
body {
margin: 0;
padding: 0;
}
redoc {
display: block;
}
</style>
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
</head>
<body>
<nav>
<header> ReDoc </header>
<form id="schema-url-form">
<input id="schema-url-input" value='swagger.yml'>
<button type="submit"> Explore </button>
</form>
</nav>
<div id="container"></div>
<redoc scroll-y-offset="body > nav" spec-url='swagger.yml'></redoc>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
(i[r] =
i[r] ||
function () {
(i[r].q = i[r].q || []).push(arguments);
}),
(i[r].l = 1 * new Date());
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
<!-- ReDoc built file with all dependencies included -->
<script src="dist/redoc.js"> </script>
<script src="main.js"> </script>
if (window.location.host === 'rebilly.github.io') {
ga('create', 'UA-81703547-1', 'auto');
ga('send', 'pageview');
}
</script>
</body>
</html>

213
demo/index.tsx Normal file
View File

@ -0,0 +1,213 @@
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import styled from 'styled-components';
import { RedocStandalone } from '../src';
import ComboBox from './ComboBox';
import FileInput from './components/FileInput';
const DEFAULT_SPEC = 'museum.yaml';
const NEW_VERSION_PETSTORE = 'openapi-3-1.yaml';
const demos = [
{ value: DEFAULT_SPEC, label: 'Museum API' },
{ value: NEW_VERSION_PETSTORE, label: 'Petstore OpenAPI 3.1' },
{ value: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml', label: 'Instagram' },
{
value: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml',
label: 'Google Calendar',
},
{ value: 'https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml', label: 'Slack' },
{ value: 'https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml', label: 'Zoom.us' },
];
class DemoApp extends React.Component<
Record<string, unknown>,
{ spec: object | undefined; specUrl: string; dropdownOpen: boolean; cors: boolean }
> {
constructor(props) {
super(props);
let parts = window.location.search.match(/url=([^&]+)/);
let url = DEFAULT_SPEC;
if (parts && parts.length > 1) {
url = decodeURIComponent(parts[1]);
}
parts = window.location.search.match(/[?&]nocors(&|#|$)/);
let cors = true;
if (parts && parts.length > 1) {
cors = false;
}
this.state = {
spec: undefined,
specUrl: url,
dropdownOpen: false,
cors,
};
}
handleUploadFile = (spec: object) => {
this.setState({
spec,
specUrl: '',
});
};
handleChange = (url: string) => {
if (url === NEW_VERSION_PETSTORE) {
this.setState({ cors: false });
0;
}
this.setState({
specUrl: url,
});
window.history.pushState(
undefined,
'',
updateQueryStringParameter(location.search, 'url', url),
);
};
toggleCors = (e: React.ChangeEvent<HTMLInputElement>) => {
const cors = e.currentTarget.checked;
this.setState({
cors,
});
window.history.pushState(
undefined,
'',
updateQueryStringParameter(location.search, 'nocors', cors ? undefined : ''),
);
};
render() {
const { specUrl, cors } = this.state;
let proxiedUrl = specUrl;
if (specUrl !== DEFAULT_SPEC) {
proxiedUrl = cors
? 'https://cors.redoc.ly/' + new URL(specUrl, window.location.href).href
: specUrl;
}
return (
<>
<Heading>
<a href=".">
<Logo
src="https://github.com/Redocly/redoc/raw/main/docs/images/redoc.png"
alt="Redoc logo"
/>
</a>
<ControlsContainer>
<FileInput onUpload={this.handleUploadFile} />
<ComboBox
placeholder={'URL to a spec to try'}
options={demos}
onChange={this.handleChange}
value={specUrl === DEFAULT_SPEC ? '' : specUrl}
/>
<CorsCheckbox title="Use CORS proxy">
<input id="cors_checkbox" type="checkbox" onChange={this.toggleCors} checked={cors} />
<label htmlFor="cors_checkbox">CORS</label>
</CorsCheckbox>
</ControlsContainer>
<iframe
src="https://ghbtns.com/github-btn.html?user=Redocly&amp;repo=redoc&amp;type=star&amp;count=true&amp;size=large"
frameBorder="0"
scrolling="0"
width="160px"
height="30px"
/>
</Heading>
<RedocStandalone
spec={this.state.spec}
specUrl={proxiedUrl}
options={{ scrollYOffset: 'nav', sanitize: true }}
/>
</>
);
}
}
/* ====== Styled components ====== */
const ControlsContainer = styled.div`
display: flex;
justify-content: center;
flex: 1;
margin: 0 15px;
align-items: center;
`;
const CorsCheckbox = styled.div`
margin-left: 10px;
white-space: nowrap;
label {
font-size: 13px;
}
@media screen and (max-width: 550px) {
display: none;
}
`;
const Heading = styled.nav`
position: sticky;
top: 0;
width: 100%;
height: 50px;
box-sizing: border-box;
background: white;
border-bottom: 1px solid #cccccc;
z-index: 10;
padding: 5px;
display: flex;
align-items: center;
font-family: Roboto, sans-serif;
`;
const Logo = styled.img`
height: 40px;
width: 124px;
display: inline-block;
margin-right: 15px;
@media screen and (max-width: 950px) {
display: none;
}
`;
const container = document.getElementById('container');
const root = createRoot(container!);
root.render(<DemoApp />);
/* ====== Helpers ====== */
function updateQueryStringParameter(uri, key, value) {
const keyValue = value === '' ? key : key + '=' + value;
const re = new RegExp('([?|&])' + key + '=?.*?(&|#|$)', 'i');
if (uri.match(re)) {
if (value !== undefined) {
return uri.replace(re, '$1' + keyValue + '$2');
} else {
return uri.replace(re, (_, separator: string, rest: string) => {
if (rest.startsWith('&')) {
rest = rest.substring(1);
}
return separator === '&' ? rest : separator + rest;
});
}
} else {
if (value === undefined) {
return uri;
}
let hash = '';
if (uri.indexOf('#') !== -1) {
hash = uri.replace(/.*#/, '#');
uri = uri.replace(/#.*/, '');
}
const separator = uri.indexOf('?') !== -1 ? '&' : '?';
return uri + separator + keyValue + hash;
}
}

View File

@ -1,99 +0,0 @@
body {
font-family: Verdana, Geneva, sans-serif;
font-size: 14px;
color: #333;
margin: 0;
line-height: 1.5;
padding-top: 50px;
}
nav input, nav button {
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
}
nav header {
float: left;
margin-left: 20px;
font-size: 25px;
color: #00329F;
font-weight: bold;
}
nav input {
width: 50%;
box-sizing: border-box;
max-width: 500px;
color: #555;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
nav input:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}
nav button {
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid #ccc;
border-radius: 4px;
}
nav button:hover {
background-color: #e6e6e6;
border-color: #adadad;
}
nav button:active {
background-color: #d4d4d4;
border-color: #8c8c8c;
}
nav {
width: 100%;
height: 50px;
line-height: 50px;
text-align: center;
background-color: white;
border-bottom: 1px solid #ccc;
position: fixed;
top: 0;
z-index: 1;
box-sizing: border-box;
}
@media (min-width: 1000px) {
nav header {
position: absolute;
}
}
@media (max-width: 500px) {
nav input {
width: 70%;
}
nav header {
display: none;
}
}

View File

@ -1,11 +0,0 @@
;(function() {
'use strict';
var schemaUrlForm = document.getElementById('schema-url-form');
var schemaUrlInput = document.getElementById('schema-url-input');
schemaUrlForm.addEventListener('submit', function(event) {
event.preventDefault();
Redoc.init(schemaUrlInput.value);
return false;
})
})();

BIN
demo/museum-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

787
demo/museum.yaml Normal file
View File

@ -0,0 +1,787 @@
openapi: 3.1.0
info:
title: Redocly Museum API
description: An imaginary, but delightful Museum API for interacting with museum services and information. Built with love by Redocly.
version: 1.0.0
contact:
email: team@redocly.com
url: 'https://redocly.com/docs/cli/'
x-logo:
url: 'https://redocly.github.io/redoc/museum-logo.png'
altText: Museum logo
license:
name: MIT
url: 'https://opensource.org/license/mit/ '
servers:
- url: 'https://api.fake-museum-example.com/v1'
paths:
/museum-hours:
get:
summary: Get museum hours
description: Get upcoming museum operating hours
operationId: getMuseumHours
tags:
- Operations
x-badges:
- name: 'Beta'
position: before
color: purple
parameters:
- $ref: '#/components/parameters/StartDate'
- $ref: '#/components/parameters/PaginationPage'
- $ref: '#/components/parameters/PaginationLimit'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetMuseumHoursResponse'
examples:
default:
summary: Museum opening hours
value:
- date: '2023-09-11'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-12'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-13'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-17'
timeOpen: '09:00'
timeClose: '18:00'
closed:
summary: The museum is closed
value: []
'400':
description: Bad request
'404':
description: Not found
/special-events:
post:
security: []
operationId: CreateSpecialEvent
summary: Create special event
tags:
- Events
x-badges:
- name: 'Alpha'
color: purple
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateSpecialEventRequest'
examples:
default_example:
$ref: '#/components/examples/CreateSpecialEventRequestExample'
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/SpecialEventResponse'
examples:
default_example:
$ref: '#/components/examples/CreateSpecialEventResponseExample'
'400':
description: Bad request
'404':
description: Not found
get:
summary: List special events
description: Return a list of upcoming special events at the museum.
security: []
operationId: listSpecialEvents
x-badges:
- name: 'Gamma'
tags:
- Events
parameters:
- name: startDate
in: query
description: The starting date to retrieve future operating hours from. Defaults to today's date.
schema:
type: string
format: date
example: 2023-02-23
- name: endDate
in: query
description: The end of a date range to retrieve special events for. Defaults to 7 days after `startDate`.
schema:
type: string
format: date
example: 2023-04-18
- name: page
in: query
description: The page number to retrieve.
schema:
type: integer
default: 1
example: 2
- name: limit
in: query
description: The number of days per page.
schema:
type: integer
default: 10
maximum: 30
example: 15
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ListSpecialEventsResponse'
examples:
default_example:
$ref: '#/components/examples/ListSpecialEventsResponseExample'
'400':
description: Bad request
'404':
description: Not found
/special-events/{eventId}:
get:
summary: Get special event
description: Get details about a special event.
operationId: getSpecialEvent
tags:
- Events
parameters:
- $ref: '#/components/parameters/EventId'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SpecialEventResponse'
examples:
default_example:
$ref: '#/components/examples/GetSpecialEventResponseExample'
'400':
description: Bad request
'404':
description: Not found
patch:
summary: Update special event
description: Update the details of a special event
operationId: updateSpecialEvent
tags:
- Events
parameters:
- $ref: '#/components/parameters/EventId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateSpecialEventRequest'
examples:
default_example:
$ref: '#/components/examples/UpdateSpecialEventRequestExample'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SpecialEventResponse'
examples:
default_example:
$ref: '#/components/examples/UpdateSpecialEventResponseExample'
'400':
description: Bad request
'404':
description: Not found
delete:
summary: Delete special event
description: Delete a special event from the collection. Allows museum to cancel planned events.
operationId: deleteSpecialEvent
tags:
- Events
parameters:
- $ref: '#/components/parameters/EventId'
responses:
'204':
description: Success - no content
'400':
description: Bad request
'401':
description: Unauthorized
'404':
description: Not found
/tickets:
post:
summary: Buy museum tickets
description: Purchase museum tickets for general entry or special events.
operationId: buyMuseumTickets
tags:
- Tickets
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BuyMuseumTicketsRequest'
examples:
general_entry:
$ref: '#/components/examples/BuyGeneralTicketsRequestExample'
event_entry:
$ref: '#/components/examples/BuyEventTicketsRequestExample'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BuyMuseumTicketsResponse'
examples:
general_entry:
$ref: '#/components/examples/BuyGeneralTicketsResponseExample'
event_entry:
$ref: '#/components/examples/BuyEventTicketsResponseExample'
'400':
description: Bad request
'404':
description: Not found
/tickets/{ticketId}/qr:
get:
summary: Get ticket QR code
description: Return an image of your ticket with scannable QR code. Used for event entry.
operationId: getTicketCode
tags:
- Tickets
parameters:
- $ref: '#/components/parameters/TicketId'
responses:
'200':
description: Scannable event ticket in image format
content:
image/png:
schema:
$ref: '#/components/schemas/GetTicketCodeResponse'
'400':
description: Bad request
'404':
description: Not found
components:
schemas:
SpecialEvent:
description: Request payload for creating new special events at the museum.
properties:
name:
description: Name of the special event
type: string
example: Fossil lecture
location:
description: Location where the special event is held
type: string
example: Lecture theatre
eventDescription:
description: Description of the special event
type: string
example: Our panel of experts will share their favorite fossils and explain why they are so great.
dates:
description: List of planned dates for the special event
type: array
items:
type: string
format: date
example: 2024-03-29
price:
description: Price of a ticket for the special event
type: number
format: float
example: 12.50
TicketType:
description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events.
type: string
enum:
- event
- general
x-enumDescriptions:
event: Special event ticket
general: General museum entry ticket
example: event
Date:
type: string
format: date
example: 2023-10-29
Email:
description: Email address for ticket purchaser.
type: string
format: email
example: museum-lover@example.com
Phone:
description: Phone number for the ticket purchaser (optional).
type: string
example: +1(234)-567-8910
BuyMuseumTicketsRequest:
description: Request payload used for purchasing museum tickets.
type: object
properties:
ticketType:
$ref: '#/components/schemas/TicketType'
eventId:
description: Unique identifier for a special event. Required if purchasing tickets for the museum's special events.
$ref: '#/components/schemas/EventId'
ticketDate:
description: Date that the ticket is valid for.
$ref: '#/components/schemas/Date'
email:
$ref: '#/components/schemas/Email'
phone:
$ref: '#/components/schemas/Phone'
required:
- ticketType
- ticketDate
- email
TicketMessage:
description: Confirmation message after a ticket purchase.
type: string
example: Museum general entry ticket purchased
TicketId:
description: Unique identifier for museum ticket. Generated when purchased.
type: string
format: uuid
example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c
TicketConfirmation:
description: Unique confirmation code used to verify ticket purchase.
type: string
example: ticket-event-a98c8f-7eb12
BuyMuseumTicketsResponse:
description: Details for a museum ticket after a successful purchase.
type: object
properties:
message:
$ref: '#/components/schemas/TicketMessage'
eventName:
$ref: '#/components/schemas/EventName'
ticketId:
$ref: '#/components/schemas/TicketId'
ticketType:
$ref: '#/components/schemas/TicketType'
ticketDate:
description: Date the ticket is valid for.
$ref: '#/components/schemas/Date'
confirmationCode:
$ref: '#/components/schemas/TicketConfirmation'
required:
- message
- ticketId
- ticketType
- ticketDate
- confirmationCode
GetTicketCodeResponse:
description: An image of a ticket with a QR code used for museum or event entry.
type: string
format: binary
GetMuseumHoursResponse:
description: List of museum operating hours for consecutive days.
type: array
items:
$ref: '#/components/schemas/MuseumDailyHours'
MuseumDailyHours:
description: Daily operating hours for the museum.
type: object
properties:
date:
description: Date the operating hours apply to.
$ref: '#/components/schemas/Date'
example: 2024-12-31
timeOpen:
type: string
pattern: '^([01]\d|2[0-3]):?([0-5]\d)$'
description: Time the museum opens on a specific date. Uses 24 hour time format (`HH:mm`).
example: 09:00
timeClose:
description: Time the museum closes on a specific date. Uses 24 hour time format (`HH:mm`).
type: string
pattern: '^([01]\d|2[0-3]):?([0-5]\d)$'
example: 18:00
required:
- date
- timeOpen
- timeClose
EventId:
description: Identifier for a special event.
type: string
format: uuid
example: 3be6453c-03eb-4357-ae5a-984a0e574a54
EventName:
type: string
description: Name of the special event
example: Pirate Coding Workshop
EventLocation:
type: string
description: Location where the special event is held
example: Computer Room
EventDescription:
type: string
description: Description of the special event
example: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).
EventDates:
type: array
items:
$ref: '#/components/schemas/Date'
description: List of planned dates for the special event
EventPrice:
description: Price of a ticket for the special event
type: number
format: float
example: 25
CreateSpecialEventRequest:
description: Request payload for creating new special events at the museum.
properties:
name:
$ref: '#/components/schemas/EventName'
location:
$ref: '#/components/schemas/EventLocation'
eventDescription:
$ref: '#/components/schemas/EventDescription'
dates:
$ref: '#/components/schemas/EventDates'
price:
$ref: '#/components/schemas/EventPrice'
required:
- name
- location
- eventDescription
- dates
- price
UpdateSpecialEventRequest:
description: Request payload for updating an existing special event. Only included fields are updated in the event.
properties:
name:
$ref: '#/components/schemas/EventName'
location:
$ref: '#/components/schemas/EventLocation'
eventDescription:
$ref: '#/components/schemas/EventDescription'
dates:
$ref: '#/components/schemas/EventDates'
price:
$ref: '#/components/schemas/EventPrice'
ListSpecialEventsResponse:
description: A list of upcoming special events
type: array
items:
$ref: '#/components/schemas/SpecialEventResponse'
SpecialEventResponse:
description: Information about a special event.
properties:
eventId:
$ref: '#/components/schemas/EventId'
name:
$ref: '#/components/schemas/EventName'
location:
$ref: '#/components/schemas/EventLocation'
eventDescription:
$ref: '#/components/schemas/EventDescription'
dates:
$ref: '#/components/schemas/EventDates'
price:
$ref: '#/components/schemas/EventPrice'
required:
- eventId
- name
- location
- eventDescription
- dates
- price
securitySchemes:
MuseumPlaceholderAuth:
type: http
scheme: basic
examples:
BuyGeneralTicketsRequestExample:
summary: General entry ticket
value:
ticketType: general
ticketDate: 2023-09-07
email: todd@example.com
BuyEventTicketsRequestExample:
summary: Special event ticket
value:
ticketType: general
eventId: dad4bce8-f5cb-4078-a211-995864315e39
ticketDate: 2023-09-05
email: todd@example.com
BuyGeneralTicketsResponseExample:
summary: General entry ticket
value:
message: Museum general entry ticket purchased
ticketId: 382c0820-0530-4f4b-99af-13811ad0f17a
ticketType: general
ticketDate: 2023-09-07
confirmationCode: ticket-general-e5e5c6-dce78
BuyEventTicketsResponseExample:
summary: Special event ticket
value:
message: Museum special event ticket purchased
ticketId: b811f723-17b2-44f7-8952-24b03e43d8a9
eventName: Mermaid Treasure Identification and Analysis
ticketType: event
ticketDate: 2023-09-05
confirmationCode: ticket-event-9c55eg-8v82a
CreateSpecialEventRequestExample:
summary: Create special event
value:
name: Mermaid Treasure Identification and Analysis
location: Under the seaaa 🦀 🎶 🌊.
eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
dates:
- 2023-09-05
- 2023-09-08
price: 0
CreateSpecialEventResponseExample:
summary: Special event created
value:
eventId: dad4bce8-f5cb-4078-a211-995864315e39
name: Mermaid Treasure Identification and Analysis
location: Under the seaaa 🦀 🎶 🌊.
eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
dates:
- 2023-09-05
- 2023-09-08
price: 30
GetSpecialEventResponseExample:
summary: Get special event
value:
eventId: 6744a0da-4121-49cd-8479-f8cc20526495
name: Time Traveler Tea Party
location: Temporal Tearoom
eventDescription: Sip tea with important historical figures.
dates:
- 2023-11-18
- 2023-11-25
- 2023-12-02
price: 60
ListSpecialEventsResponseExample:
summary: List of special events
value:
- eventId: f3e0e76e-e4a8-466e-ab9c-ae36c15b8e97
name: Sasquatch Ballet
location: Seattle... probably
eventDescription: They're big, they're hairy, but they're also graceful. Come learn how the biggest feet can have the lightest touch.
dates:
- 2023-12-15
- 2023-12-22
price: 40
- eventId: 2f14374a-9c65-4ee5-94b7-fba66d893483
name: Solar Telescope Demonstration
location: Far from the sun.
eventDescription: Look at the sun without going blind!
dates:
- 2023-09-07
- 2023-09-14
price: 50
- eventId: 6aaa61ba-b2aa-4868-b803-603dbbf7bfdb
name: Cook like a Caveman
location: Fire Pit on East side
eventDescription: Learn to cook on an open flame.
dates:
- 2023-11-10
- 2023-11-17
- 2023-11-24
price: 5
- eventId: 602b75e1-5696-4ab8-8c7a-f9e13580f910
name: Underwater Basket Weaving
location: Rec Center Pool next door.
eventDescription: Learn to weave baskets underwater.
dates:
- 2023-09-12
- 2023-09-15
price: 15
- eventId: dad4bce8-f5cb-4078-a211-995864315e39
name: Mermaid Treasure Identification and Analysis
location: Room Sea-12
eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits — kindly donated by Ariel.
dates:
- 2023-09-05
- 2023-09-08
price: 30
- eventId: 6744a0da-4121-49cd-8479-f8cc20526495
name: Time Traveler Tea Party
location: Temporal Tearoom
eventDescription: Sip tea with important historical figures.
dates:
- 2023-11-18
- 2023-11-25
- 2023-12-02
price: 60
- eventId: 3be6453c-03eb-4357-ae5a-984a0e574a54
name: Pirate Coding Workshop
location: Computer Room
eventDescription: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).
dates:
- 2023-10-29
- 2023-10-30
- 2023-10-31
price: 45
- eventId: 9d90d29a-2af5-4206-97d9-9ea9ceadcb78
name: Llama Street Art Through the Ages
location: Auditorium
eventDescription: Llama street art?! Alpaca my bags -- let's go!
dates:
- 2023-10-29
- 2023-10-30
- 2023-10-31
price: 45
- eventId: a3c7b2c4-b5fb-4ef7-9322-00a919864957
name: The Great Parrot Debate
location: Outdoor Amphitheatre
eventDescription: See leading parrot minds discuss important geopolitical issues.
dates:
- 2023-11-03
- 2023-11-10
price: 35
- eventId: b92d46b7-4c5d-422b-87a5-287767e26f29
name: Eat a Bunch of Corn
location: Cafeteria
eventDescription: We accidentally bought too much corn. Please come eat it.
dates:
- 2023-11-10
- 2023-11-17
- 2023-11-24
price: 5
UpdateSpecialEventRequestExample:
summary: Update special event request
value:
location: On the beach.
price: 15
UpdateSpecialEventResponseExample:
summary: Update special event
value:
eventId: dad4bce8-f5cb-4078-a211-995864315e39
name: Mermaid Treasure Identification and Analysis
location: On the beach.
eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
dates:
- 2023-09-05
- 2023-09-08
price: 15
GetMuseumHours:
summary: Museum opening hours
value:
- date: '2023-09-11'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-12'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-13'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-14'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-15'
timeOpen: '10:00'
timeClose: '16:00'
- date: '2023-09-18'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-19'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-20'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-21'
timeOpen: '09:00'
timeClose: '18:00'
- date: '2023-09-22'
timeOpen: '10:00'
timeClose: '16:00'
ClosedMuseumHours:
summary: The museum is closed
value: []
parameters:
PaginationPage:
name: page
in: query
description: The page number to retrieve.
schema:
type: integer
default: 1
example: 2
PaginationLimit:
name: limit
in: query
description: The number of days per page.
schema:
type: integer
default: 10
maximum: 30
example: 15
EventId:
name: eventId
in: path
description: An identifier for a special event.
required: true
schema:
type: string
format: uuid
example: dad4bce8-f5cb-4078-a211-995864315e39
StartDate:
name: startDate
in: query
description: The starting date to retrieve future operating hours from. Defaults to today's date.
schema:
type: string
format: date
example: 2023-02-23
EndDate:
name: endDate
in: query
description: The end of a date range to retrieve special events for. Defaults to 7 days after `startDate`.
schema:
type: string
format: date
example: 2023-04-18
TicketId:
name: ticketId
in: path
description: An identifier for a ticket to a museum event. Used to generate ticket image.
required: true
schema:
type: string
format: uuid
example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c
tags:
- name: Operations
x-displayName: About the museum
description: Operational information about the museum.
- name: Events
x-displayName: Upcoming events
description: Special events hosted by the Museum.
- name: Tickets
x-displayName: Buy tickets
description: Museum tickets for general entrance or special events.
x-tagGroups:
- name: Plan your visit
tags:
- Operations
- Events
- name: Purchases
tags:
- Tickets
- name: Entities
tags:
- Schemas
security:
- MuseumPlaceholderAuth: []

1359
demo/openapi-3-1.yaml Normal file

File diff suppressed because it is too large Load Diff

1246
demo/openapi.yaml Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -0,0 +1,22 @@
import * as React from 'react';
import { createRoot } from 'react-dom/client';
import type { RedocRawOptions } from '../../src/services/RedocNormalizedOptions';
import { RedocStandalone } from '../../src';
const big = window.location.search.indexOf('big') > -1;
const swagger = window.location.search.indexOf('swagger') > -1;
const userUrl = window.location.search.match(/url=(.*)$/);
const specUrl =
(userUrl && userUrl[1]) || (swagger ? 'museum.yaml' : big ? 'big-openapi.json' : 'museum.yaml');
const options: RedocRawOptions = {
nativeScrollbars: false,
maxDisplayedEnumValues: 3,
schemaDefinitionsTagName: 'schemas',
};
const container = document.getElementById('example');
const root = createRoot(container!);
root.render(<RedocStandalone specUrl={specUrl} options={options} />);

View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Redoc</title>
<style>
body {
margin: 0;
padding: 0;
}
redoc {
display: block;
}
</style>
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
</head>
<body>
<redoc id="example"></redoc>
</body>
</html>

BIN
demo/redoc-demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

65
demo/ssr/index.ts Normal file
View File

@ -0,0 +1,65 @@
import { renderToString } from 'react-dom/server';
import * as React from 'react';
import { ServerStyleSheet } from 'styled-components';
import { Redoc, createStore } from '../../';
import { readFileSync } from 'fs';
import { resolve } from 'path';
const yaml = require('js-yaml');
const http = require('http');
const fs = require('fs');
const PORT = 9999;
const server = http.createServer(async (request, response) => {
console.time('request ' + request.url);
if (request.url === '/redoc.standalone.js') {
fs.createReadStream('bundles/redoc.standalone.js', 'utf8').pipe(response);
} else if (request.url === '/') {
const spec = yaml.load(readFileSync(resolve(__dirname, '../openapi.yaml'), 'utf-8'));
const store = await createStore(spec, 'path/to/spec.yaml');
const sheet = new ServerStyleSheet();
const html = renderToString(sheet.collectStyles(React.createElement(Redoc, { store })));
const css = sheet.getStyleTags();
const res = `<html>
<head>
<meta charset="utf8" />
<title>ReDoc</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
padding: 0;
margin: 0;
}
</style>
<script src="redoc.standalone.js"></script>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
${css}
</head>
<body>
<script>
document.addEventListener('DOMContentLoaded', function() {
const state = ${JSON.stringify(await store.toJS())};
Redoc.hydrate(state, document.getElementById('redoc'));
});
</script>
<div id="redoc">${html}</div>
</body>
</html>`;
response.writeHead(200, { 'Content-Length': res.length });
response.write(res);
response.end();
} else {
response.writeHead(404);
response.write('Not found');
response.end();
}
console.timeEnd('request ' + request.url);
});
server.listen(PORT, () => console.log(`Server started: http://127.0.0.1:${PORT}`));

867
demo/swagger.yaml Normal file
View File

@ -0,0 +1,867 @@
swagger: '2.0'
schemes:
- http
- https
host: petstore.swagger.io
basePath: /v2
info:
description: |
This is a sample server Petstore server.
You can find out more about Swagger at
[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).
For this sample, you can use the api key `special-key` to test the authorization filters.
# Introduction
This API is documented in **OpenAPI format** and is based on
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard
OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).
# OpenAPI Specification
This API is documented in **OpenAPI format** and is based on
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard
OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).
# Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).
And that allows cross-domain communication from the browser.
All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
# Authentication
Petstore offers two forms of authentication:
- API Key
- OAuth2
OAuth2 - an open protocol to allow secure authorization in a simple
and standard method from web, mobile and desktop applications.
<!-- ReDoc-Inject: <security-definitions> -->
version: 1.0.0
title: Swagger Petstore
termsOfService: 'http://swagger.io/terms/'
contact:
email: apiteam@swagger.io
url: https://github.com/Redocly/redoc
x-logo:
url: 'https://redocly.github.io/redoc/petstore-logo.png'
altText: Petstore logo
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
externalDocs:
description: Find out how to create Github repo for your OpenAPI spec.
url: 'https://github.com/Rebilly/generator-openapi-repo'
tags:
- name: pet
description: Everything about your Pets
- name: store
description: Access to Petstore orders
- name: user
description: Operations about user
x-tagGroups:
- name: General
tags:
- pet
- store
- name: User Management
tags:
- user
securityDefinitions:
petstore_auth:
description: |
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
type: oauth2
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
flow: implicit
scopes:
'write:pets': modify pets in your account
'read:pets': read your pets
api_key:
description: |
For this sample, you can use the api key `special-key` to test the authorization filters.
type: apiKey
name: api_key
in: header
x-servers:
- url: //petstore.swagger.io/v2
description: Default server
- url: //petstore.swagger.io/sandbox
description: Sandbox server
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: Add new pet to the store inventory.
operationId: addPet
consumes:
- application/json
- application/xml
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/Pet'
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
x-code-samples:
- lang: 'C#'
source: |
PetStore.v1.Pet pet = new PetStore.v1.Pet();
pet.setApiKey("your api key");
pet.petType = PetStore.v1.Pet.TYPE_DOG;
pet.name = "Rex";
// set other fields
PetStoreResponse response = pet.create();
if (response.statusCode == HttpStatusCode.Created)
{
// Successfully created
}
else
{
// Something wrong -- check response for errors
Console.WriteLine(response.getRawResponse());
}
- lang: PHP
source: "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
put:
tags:
- pet
summary: Update an existing pet
description: ''
operationId: updatePet
consumes:
- application/json
- application/xml
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/Pet'
responses:
'400':
description: Invalid ID supplied
'404':
description: Pet not found
'405':
description: Validation exception
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
x-code-samples:
- lang: PHP
source: "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
'/pet/{petId}':
get:
tags:
- pet
summary: Find pet by ID
description: Returns a single pet
operationId: getPetById
produces:
- application/xml
- application/json
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
type: integer
format: int64
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Pet'
'400':
description: Invalid ID supplied
'404':
description: Pet not found
security:
- api_key: []
post:
tags:
- pet
summary: Updates a pet in the store with form data
description: ''
operationId: updatePetWithForm
consumes:
- application/x-www-form-urlencoded
produces:
- application/xml
- application/json
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
type: integer
format: int64
- name: name
in: formData
description: Updated name of the pet
required: false
type: string
- name: status
in: formData
description: Updated status of the pet
required: false
type: string
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
delete:
tags:
- pet
summary: Deletes a pet
description: ''
operationId: deletePet
produces:
- application/xml
- application/json
parameters:
- name: api_key
in: header
required: false
type: string
x-example: Bearer <TOKEN>
- name: petId
in: path
description: Pet id to delete
required: true
type: integer
format: int64
responses:
'400':
description: Invalid pet value
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
'/pet/{petId}/uploadImage':
post:
tags:
- pet
summary: uploads an image
description: ''
operationId: uploadFile
consumes:
- multipart/form-data
produces:
- application/json
parameters:
- name: petId
in: path
description: ID of pet to update
required: true
type: integer
format: int64
- name: additionalMetadata
in: formData
description: Additional data to pass to server
required: false
type: string
- name: file
in: formData
description: file to upload
required: false
type: file
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/ApiResponse'
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
/pet/findByStatus:
get:
tags:
- pet
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
produces:
- application/xml
- application/json
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
required: true
type: array
items:
type: string
enum:
- available
- pending
- sold
default: available
collectionFormat: csv
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Pet'
'400':
description: Invalid status value
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
/pet/findByTags:
get:
tags:
- pet
summary: Finds Pets by tags
description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'
operationId: findPetsByTags
deprecated: true
produces:
- application/xml
- application/json
parameters:
- name: tags
in: query
description: Tags to filter by
required: true
type: array
items:
type: string
collectionFormat: csv
responses:
'200':
description: successful operation
schema:
type: array
items:
$ref: '#/definitions/Pet'
'400':
description: Invalid tag value
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
/store/inventory:
get:
tags:
- store
summary: Returns pet inventories by status
description: Returns a map of status codes to quantities
operationId: getInventory
produces:
- application/json
parameters: []
responses:
'200':
description: successful operation
schema:
type: object
additionalProperties:
type: integer
format: int32
security:
- api_key: []
/store/order:
post:
tags:
- store
summary: Place an order for a pet
description: ''
operationId: placeOrder
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: order placed for purchasing the pet
required: true
schema:
$ref: '#/definitions/Order'
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Order'
'400':
description: Invalid Order
'/store/order/{orderId}':
get:
tags:
- store
summary: Find purchase order by ID
description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'
operationId: getOrderById
produces:
- application/xml
- application/json
parameters:
- name: orderId
in: path
description: ID of pet that needs to be fetched
required: true
type: integer
maximum: 5
minimum: 1
format: int64
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/Order'
'400':
description: Invalid ID supplied
'404':
description: Order not found
delete:
tags:
- store
summary: Delete purchase order by ID
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
operationId: deleteOrder
produces:
- application/xml
- application/json
parameters:
- name: orderId
in: path
description: ID of the order that needs to be deleted
required: true
type: string
minimum: 1
responses:
'400':
description: Invalid ID supplied
'404':
description: Order not found
/user:
post:
tags:
- user
summary: Create user
description: This can only be done by the logged in user.
operationId: createUser
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Created user object
required: true
schema:
$ref: '#/definitions/User'
responses:
default:
description: successful operation
'/user/{username}':
get:
tags:
- user
summary: Get user by user name
description: ''
operationId: getUserByName
produces:
- application/xml
- application/json
parameters:
- name: username
in: path
description: 'The name that needs to be fetched. Use user1 for testing. '
required: true
type: string
responses:
'200':
description: successful operation
schema:
$ref: '#/definitions/User'
'400':
description: Invalid username supplied
'404':
description: User not found
put:
tags:
- user
summary: Updated user
description: This can only be done by the logged in user.
operationId: updateUser
produces:
- application/xml
- application/json
parameters:
- name: username
in: path
description: name that need to be deleted
required: true
type: string
- in: body
name: body
description: Updated user object
required: true
schema:
$ref: '#/definitions/User'
responses:
'400':
description: Invalid user supplied
'404':
description: User not found
delete:
tags:
- user
summary: Delete user
description: This can only be done by the logged in user.
operationId: deleteUser
produces:
- application/xml
- application/json
parameters:
- name: username
in: path
description: The name that needs to be deleted
required: true
type: string
responses:
'400':
description: Invalid username supplied
'404':
description: User not found
/user/createWithArray:
post:
tags:
- user
summary: Creates list of users with given input array
description: ''
operationId: createUsersWithArrayInput
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: List of user object
required: true
schema:
type: array
items:
$ref: '#/definitions/User'
responses:
default:
description: successful operation
/user/createWithList:
post:
tags:
- user
summary: Creates list of users with given input array
description: ''
operationId: createUsersWithListInput
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: List of user object
required: true
schema:
type: array
items:
$ref: '#/definitions/User'
responses:
default:
description: successful operation
/user/login:
get:
tags:
- user
summary: Logs user into the system
description: ''
operationId: loginUser
produces:
- application/xml
- application/json
parameters:
- name: username
in: query
description: The user name for login
required: true
type: string
- name: password
in: query
description: The password for login in clear text
required: true
type: string
responses:
'200':
description: successful operation
schema:
type: string
examples:
application/json: OK
application/xml: <message> OK </message>
text/plain: OK
headers:
X-Rate-Limit:
type: integer
format: int32
description: calls per hour allowed by the user
X-Expires-After:
type: string
format: date-time
description: date in UTC when token expires
'400':
description: Invalid username/password supplied
/user/logout:
get:
tags:
- user
summary: Logs out current logged in user session
description: ''
operationId: logoutUser
produces:
- application/xml
- application/json
parameters: []
responses:
default:
description: successful operation
definitions:
ApiResponse:
type: object
properties:
code:
type: integer
format: int32
type:
type: string
message:
type: string
Cat:
description: A representation of a cat
allOf:
- $ref: '#/definitions/Pet'
- type: object
properties:
huntingSkill:
type: string
description: The measured skill for hunting
default: lazy
enum:
- clueless
- lazy
- adventurous
- aggressive
required:
- huntingSkill
Category:
type: object
properties:
id:
description: Category ID
allOf:
- $ref: '#/definitions/Id'
name:
description: Category name
type: string
minLength: 1
sub:
description: Test Sub Category
type: object
properties:
prop1:
type: string
description: Dumb Property
xml:
name: Category
Dog:
description: A representation of a dog
allOf:
- $ref: '#/definitions/Pet'
- type: object
properties:
packSize:
type: integer
format: int32
description: The size of the pack the dog is from
default: 1
minimum: 1
required:
- packSize
HoneyBee:
description: A representation of a honey bee
allOf:
- $ref: '#/definitions/Pet'
- type: object
properties:
honeyPerDay:
type: number
description: Average amount of honey produced per day in ounces
example: 3.14
required:
- honeyPerDay
Id:
type: integer
format: int64
Order:
type: object
properties:
id:
description: Order ID
allOf:
- $ref: '#/definitions/Id'
petId:
description: Pet ID
allOf:
- $ref: '#/definitions/Id'
quantity:
type: integer
format: int32
minimum: 1
default: 1
shipDate:
description: Estimated ship date
type: string
format: date-time
status:
type: string
description: Order Status
enum:
- placed
- approved
- delivered
complete:
description: Indicates whenever order was completed or not
type: boolean
default: false
xml:
name: Order
Pet:
type: object
required:
- name
- photoUrls
discriminator: petType
properties:
id:
description: Pet ID
allOf:
- $ref: '#/definitions/Id'
category:
description: Categories this pet belongs to
allOf:
- $ref: '#/definitions/Category'
name:
description: The name given to a pet
type: string
example: Guru
photoUrls:
description: The list of URL to a cute photos featuring pet
type: array
default: []
xml:
name: photoUrl
wrapped: true
items:
type: string
format: url
tags:
description: Tags attached to the pet
type: array
xml:
name: tag
wrapped: true
items:
$ref: '#/definitions/Tag'
status:
type: string
description: Pet status in the store
enum:
- available
- pending
- sold
petType:
description: Type of a pet
type: string
xml:
name: Pet
Tag:
type: object
properties:
id:
description: Tag ID
allOf:
- $ref: '#/definitions/Id'
name:
description: Tag name
type: string
minLength: 1
xml:
name: Tag
User:
type: object
properties:
id:
description: User ID
$ref: '#/definitions/Id'
username:
description: User supplied username
type: string
minLength: 4
example: John78
firstName:
description: User first name
type: string
minLength: 1
example: John
lastName:
description: User last name
type: string
minLength: 1
example: Smith
email:
description: User email address
type: string
format: email
example: john.smith@example.com
password:
type: string
description: 'User password, MUST contain a mix of upper and lower case letters, as well as digits'
format: password
minLength: 8
pattern: '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])'
example: drowssaP123
phone:
description: User phone number in international format
type: string
pattern: "^\\+(?:[0-9]-?){6,14}[0-9]$"
example: +1-202-555-0192
x-nullable: true
userStatus:
description: User status
type: integer
format: int32
xml:
name: User

View File

@ -1,877 +0,0 @@
---
swagger: "2.0"
info:
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
x-logo:
url: "https://rebilly.github.io/ReDoc/petstore-logo.png"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "petstore.swagger.io"
basePath: "/v2"
tags:
-
name: "Pagination"
x-traitTag: true
description: |-
Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in
any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next
set of data.
```json
{
...
"pagination": {
"next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296",
"next_max_id": "13872296"
}
}
```
On views where pagination is present, we also support the `count` parameter.
Simply set this to the number of items you'd like to receive. Note that the default values
should be fine for most applications - but if you decide to increase this number there is a maximum value
defined on each endpoint.
externalDocs:
description: "Find out more"
url: "http://swagger.io"
-
name: "JSONP"
x-traitTag: true
description: |-
If you're writing an AJAX application, and you'd like to wrap our response with a callback,
all you have to do is specify a callback parameter with any API call:
```
https://api.instagram.com/v1/tags/coffee/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&callback=callbackFunction
```
Would respond with:
```js
callbackFunction({
...
});
```
> Example of markdown blockquote
externalDocs:
description: "Find out more"
url: "http://swagger.io"
-
name: "pet"
description: "Everything about your Pets"
externalDocs:
description: "Find out more"
url: "http://swagger.io"
-
name: "store"
description: "Access to Petstore orders"
-
name: "user"
description: "Operations about user"
externalDocs:
description: "Find out more about our store"
url: "http://swagger.io"
schemes:
- "http"
paths:
/pet:
post:
tags:
- "pet"
summary: "Add a new pet to the store"
description: ""
operationId: "addPet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Pet"
responses:
405:
description: "Invalid input"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
x-code-samples:
-
lang: PHP
source: |-
$form = new \PetStore\Entities\Pet();
$form->setPetType("Dog");
$form->setName("Rex");
// set other fields
try {
$pet = $client->pets()->create($form);
} catch (UnprocessableEntityException $e) {
var_dump($e->getErrors());
}
-
lang: C#
source: |-
PetStore.v1.Pet pet = new PetStore.v1.Pet();
pet.setApiKey("your api key");
pet.petType = PetStore.v1.Pet.TYPE_DOG;
pet.name = "Rex";
// set other fields
PetStoreResponse response = pet.create();
if (response.statusCode == HttpStatusCode.Created)
{
// Successfully created
}
else
{
// Something wrong -- check response for errors
Console.WriteLine(response.getRawResponse());
}
put:
tags:
- "pet"
summary: "Update an existing pet"
description: ""
operationId: "updatePet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "Pet object that needs to be added to the store"
required: true
schema:
$ref: "#/definitions/Pet"
responses:
400:
description: "Invalid ID supplied"
404:
description: "Pet not found"
405:
description: "Validation exception"
x-code-samples:
-
lang: PHP
source: |-
$form = new \PetStore\Entities\Pet();
$form->setPetId(1);
$form->setPetType("Dog");
$form->setName("Rex");
// set other fields
try {
$pet = $client->pets()->update($form);
} catch (UnprocessableEntityException $e) {
var_dump($e->getErrors());
}
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
/pet/findByStatus:
get:
tags:
- "pet"
- "Pagination"
- "JSONP"
summary: "Finds Pets by status"
description: "Multiple status values can be provided with comma seperated strings"
operationId: "findPetsByStatus"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "status"
in: "query"
description: "Status values that need to be considered for filter"
required: true
type: "array"
items:
type: "string"
enum:
- "available"
- "pending"
- "sold"
default: "available"
collectionFormat: "csv"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Pet"
400:
description: "Invalid status value"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
/pet/findByTags:
get:
tags:
- "pet"
- "Pagination"
- "JSONP"
summary: "Finds Pets by tags"
description: "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing."
operationId: "findPetsByTags"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "tags"
in: "query"
description: "Tags to filter by"
required: true
type: "array"
items:
type: "string"
collectionFormat: "csv"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Pet"
400:
description: "Invalid tag value"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
/pet/{petId}:
get:
tags:
- "pet"
- "JSONP"
summary: "Find pet by ID"
description: "Returns a single pet"
operationId: "getPetById"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "petId"
in: "path"
description: "ID of pet to return"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Pet"
400:
description: "Invalid ID supplied"
404:
description: "Pet not found"
security:
-
api_key: []
post:
tags:
- "pet"
summary: "Updates a pet in the store with form data"
description: ""
operationId: "updatePetWithForm"
consumes:
- "application/x-www-form-urlencoded"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "petId"
in: "path"
description: "ID of pet that needs to be updated"
required: true
type: "integer"
format: "int64"
-
name: "name"
in: "formData"
description: "Updated name of the pet"
required: false
type: "string"
-
name: "status"
in: "formData"
description: "Updated status of the pet"
required: false
type: "string"
responses:
405:
description: "Invalid input"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
delete:
tags:
- "pet"
summary: "Deletes a pet"
description: ""
operationId: "deletePet"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "api_key"
in: "header"
required: false
type: "string"
-
name: "petId"
in: "path"
description: "Pet id to delete"
required: true
type: "integer"
format: "int64"
responses:
400:
description: "Invalid pet value"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
/pet/{petId}/uploadImage:
post:
tags:
- "pet"
summary: "uploads an image"
description: ""
operationId: "uploadFile"
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
-
name: "petId"
in: "path"
description: "ID of pet to update"
required: true
type: "integer"
format: "int64"
-
name: "additionalMetadata"
in: "formData"
description: "Additional data to pass to server"
required: false
type: "string"
-
name: "file"
in: "formData"
description: "file to upload"
required: false
type: "file"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/ApiResponse"
security:
-
petstore_auth:
- "write:pets"
- "read:pets"
/store/inventory:
get:
tags:
- "store"
- "JSONP"
summary: "Returns pet inventories by status"
description: "Returns a map of status codes to quantities"
operationId: "getInventory"
produces:
- "application/json"
parameters: []
responses:
200:
description: "successful operation"
schema:
type: "object"
additionalProperties:
type: "integer"
format: "int32"
security:
-
api_key: []
/store/order:
post:
tags:
- "store"
summary: "Place an order for a pet"
description: ""
operationId: "placeOrder"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "order placed for purchasing the pet"
required: true
schema:
$ref: "#/definitions/Order"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Order"
400:
description: "Invalid Order"
/store/order/{orderId}:
get:
tags:
- "store"
- "JSONP"
summary: "Find purchase order by ID"
description: "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions"
operationId: "getOrderById"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "orderId"
in: "path"
description: "ID of pet that needs to be fetched"
required: true
type: "integer"
maximum: 5
minimum: 1
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Order"
400:
description: "Invalid ID supplied"
404:
description: "Order not found"
delete:
tags:
- "store"
summary: "Delete purchase order by ID"
description: "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors"
operationId: "deleteOrder"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "orderId"
in: "path"
description: "ID of the order that needs to be deleted"
required: true
type: "string"
minimum: 1
responses:
400:
description: "Invalid ID supplied"
404:
description: "Order not found"
/user:
post:
tags:
- "user"
summary: "Create user"
description: "This can only be done by the logged in user."
operationId: "createUser"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "Created user object"
required: true
schema:
$ref: "#/definitions/User"
responses:
default:
description: "successful operation"
/user/createWithArray:
post:
tags:
- "user"
summary: "Creates list of users with given input array"
description: ""
operationId: "createUsersWithArrayInput"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "List of user object"
required: true
schema:
type: "array"
items:
$ref: "#/definitions/User"
responses:
default:
description: "successful operation"
/user/createWithList:
post:
tags:
- "user"
summary: "Creates list of users with given input array"
description: ""
operationId: "createUsersWithListInput"
produces:
- "application/xml"
- "application/json"
parameters:
-
in: "body"
name: "body"
description: "List of user object"
required: true
schema:
type: "array"
items:
$ref: "#/definitions/User"
responses:
default:
description: "successful operation"
/user/login:
get:
tags:
- "user"
summary: "Logs user into the system"
description: ""
operationId: "loginUser"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "username"
in: "query"
description: "The user name for login"
required: true
type: "string"
-
name: "password"
in: "query"
description: "The password for login in clear text"
required: true
type: "string"
responses:
200:
description: "successful operation"
schema:
type: "string"
headers:
X-Rate-Limit:
type: "integer"
format: "int32"
description: "calls per hour allowed by the user"
X-Expires-After:
type: "string"
format: "date-time"
description: "date in UTC when toekn expires"
400:
description: "Invalid username/password supplied"
/user/logout:
get:
tags:
- "user"
summary: "Logs out current logged in user session"
description: ""
operationId: "logoutUser"
produces:
- "application/xml"
- "application/json"
parameters: []
responses:
default:
description: "successful operation"
/user/{username}:
get:
tags:
- "user"
- "JSONP"
summary: "Get user by user name"
description: ""
operationId: "getUserByName"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "username"
in: "path"
description: "The name that needs to be fetched. Use user1 for testing. "
required: true
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/User"
400:
description: "Invalid username supplied"
404:
description: "User not found"
put:
tags:
- "user"
summary: "Updated user"
description: "This can only be done by the logged in user."
operationId: "updateUser"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "username"
in: "path"
description: "name that need to be deleted"
required: true
type: "string"
-
in: "body"
name: "body"
description: "Updated user object"
required: true
schema:
$ref: "#/definitions/User"
responses:
400:
description: "Invalid user supplied"
404:
description: "User not found"
delete:
tags:
- "user"
summary: "Delete user"
description: "This can only be done by the logged in user."
operationId: "deleteUser"
produces:
- "application/xml"
- "application/json"
parameters:
-
name: "username"
in: "path"
description: "The name that needs to be deleted"
required: true
type: "string"
responses:
400:
description: "Invalid username supplied"
404:
description: "User not found"
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
flow: "implicit"
scopes:
write:pets: "modify pets in your account"
read:pets: "read your pets"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
Order:
type: "object"
properties:
id:
type: "integer"
format: "int64"
petId:
type: "integer"
format: "int64"
quantity:
type: "integer"
format: "int32"
shipDate:
type: "string"
format: "date-time"
status:
type: "string"
description: "Order Status"
enum:
- "placed"
- "approved"
- "delivered"
complete:
type: "boolean"
default: false
xml:
name: "Order"
User:
type: "object"
properties:
id:
type: "integer"
format: "int64"
username:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
email:
type: "string"
password:
type: "string"
phone:
type: "string"
userStatus:
type: "integer"
format: "int32"
description: "User Status"
xml:
name: "User"
Category:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
xml:
name: "Category"
Tag:
type: "object"
properties:
id:
type: "integer"
format: "int64"
name:
type: "string"
xml:
name: "Tag"
Pet:
type: "object"
required:
- "name"
- "photoUrls"
- "petType"
discriminator: "petType"
properties:
petType:
type: "string"
id:
type: "integer"
format: "int64"
category:
$ref: "#/definitions/Category"
name:
type: "string"
example: "doggie"
photoUrls:
type: "array"
xml:
name: "photoUrl"
wrapped: true
items:
type: "string"
tags:
type: "array"
xml:
name: "tag"
wrapped: true
items:
$ref: "#/definitions/Tag"
status:
type: "string"
description: "pet status in the store"
enum:
- "available"
- "pending"
- "sold"
xml:
name: "Pet"
Cat:
description: "A representation of a cat"
allOf:
-
$ref: "#/definitions/Pet"
-
type: "object"
properties:
huntingSkill:
type: "string"
description: "The measured skill for hunting"
default: "lazy"
enum:
- "clueless"
- "lazy"
- "adventurous"
- "aggressive"
required:
- "huntingSkill"
Dog:
description: "A representation of a dog"
allOf:
-
$ref: "#/definitions/Pet"
-
type: "object"
properties:
packSize:
type: "integer"
format: "int32"
description: "the size of the pack the dog is from"
default: 0
minimum: 0
required:
- "packSize"
ApiResponse:
type: "object"
properties:
code:
type: "integer"
format: "int32"
type:
type: "string"
message:
type: "string"
externalDocs:
description: "Find out more about Swagger"
url: "http://swagger.io"

121
demo/webpack.config.ts Normal file
View File

@ -0,0 +1,121 @@
import * as CopyWebpackPlugin from 'copy-webpack-plugin';
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
import * as HtmlWebpackPlugin from 'html-webpack-plugin';
import { resolve } from 'path';
import * as webpack from 'webpack';
import { webpackIgnore } from '../config/webpack-utils';
const VERSION = JSON.stringify(require('../package.json').version);
const REVISION = JSON.stringify(
require('child_process').execSync('git rev-parse --short HEAD').toString().trim(),
);
function root(filename) {
return resolve(__dirname + '/' + filename);
}
export default (env: { playground?: boolean; bench?: boolean } = {}) => ({
entry: [
root('../src/polyfills.ts'),
root(
env.playground
? 'playground/hmr-playground.tsx'
: env.bench
? '../benchmark/index.tsx'
: 'index.tsx',
),
],
target: 'web',
output: {
filename: 'redoc-demo.bundle.js',
path: root('dist'),
globalObject: 'this',
},
devServer: {
static: __dirname,
port: 9090,
hot: true,
historyApiFallback: true,
open: true,
},
stats: {
children: true,
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
fallback: {
path: require.resolve('path-browserify'),
buffer: require.resolve('buffer'),
http: false,
fs: false,
os: false,
},
},
performance: false,
externals: {
esprima: 'esprima',
'node-fetch': 'null',
'node-fetch-h2': 'null',
yaml: 'null',
'safe-json-stringify': 'null',
},
module: {
rules: [
{ test: [/\.eot$/, /\.gif$/, /\.woff$/, /\.svg$/, /\.ttf$/], use: 'null-loader' },
{
test: /\.(tsx?|[cm]?js)$/,
loader: 'esbuild-loader',
options: {
target: 'es2015',
tsconfigRaw: require('../tsconfig.json'),
},
exclude: [/node_modules/],
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
{
loader: 'esbuild-loader',
options: {
minify: true,
},
},
],
},
],
},
plugins: [
new webpack.DefinePlugin({
__REDOC_VERSION__: VERSION,
__REDOC_REVISION__: REVISION,
'process.env': '{}',
'process.platform': '"browser"',
'process.stdout': 'null',
}),
// new webpack.NamedModulesPlugin(),
// new webpack.optimize.ModuleConcatenationPlugin(),
new HtmlWebpackPlugin({
template: env.playground
? 'demo/playground/index.html'
: env.bench
? 'benchmark/index.html'
: 'demo/index.html',
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new ForkTsCheckerWebpackPlugin({ logger: { infrastructure: 'silent', issues: 'console' } }),
webpackIgnore(/js-yaml\/dumper\.js$/),
webpackIgnore(/json-schema-ref-parser\/lib\/dereference\.js/),
webpackIgnore(/^\.\/SearchWorker\.worker$/),
new CopyWebpackPlugin({
patterns: ['demo/museum.yaml'],
}),
],
});

311
docs/config.md Normal file
View File

@ -0,0 +1,311 @@
# Configure Redoc
Getting your documentation just right is important, and Redoc comes with many configuration options to help you succeed in that mission.
Each deployment type has documentation on how to configure options for that type of Redoc project. This page lists all the options you can use with Redoc.
**Versions: 2.x**
{% admonition type="success" name="Client-side configuration" %}
Using Redoc as a standalone (HTML or React) tool, these options must be presented in [kebab case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case).
For example, `scrollYOffset` becomes `scroll-y-offset`, and `expandResponses` becomes `expand-responses`.
{% /admonition %}
## Functional settings
### disableSearch
Disables search indexing and hides the search box from the API documentation page.
### minCharacterLengthToInitSearch
Sets the minimum amount of characters that need to be typed into the search dialog to initiate the search.
_Default: 3_
### hideDownloadButtons
Hides the 'Download' button for saving the API definition source file. **This setting does not make the API definition private**; it just hides the button.
### hideLoading
Hides the loading animation. Does not apply to CLI or Workflows-rendered docs.
### hideSchemaTitles
Hides the schema title next to to the type.
### jsonSamplesExpandLevel
Sets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.
_Default: 2_
### maxDisplayedEnumValues
Displays only the specified number of enum values. The remaining values are hidden in an expandable area. If not set, all values are displayed.
### onlyRequiredInSamples
Shows only required fields in request samples.
### sortRequiredPropsFirst
Shows required properties in schemas first, ordered in the same order as in the required array.
### schemasExpansionLevel
Specifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemasExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.
### scrollYOffset
Specifies a vertical scroll-offset.
This setting is useful when there are fixed positioned elements at the top of the page, such as navbars, headers, etc.
Note that you can specify the `scrollYOffset` value in any of the following ways:
- as a number - a fixed number of pixels to be used as the offset.
- as a CSS selector - the selector of the element to be used for specifying the offset. The distance from the top of the page to the element's bottom is used as the offset.
- a function (advanced) - a getter function. Must return a number representing the offset (in pixels).
### showExtensions
Shows specification extensions ('x-' fields). Extensions used by Redoc are ignored. The value can be boolean or an array of strings with names of extensions to display. When used as boolean and set to `true`, all specification extensions are shown.
### sanitize
If set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.
### downloadUrls
Set the URLs used to download the OpenAPI description or other documentation related files from the API documentation page.
### schemaDefinitionsTagName
If a value is set, all of the schemas are rendered with the designated tag name. The schemas then render and display in the sidebar navigation (with that associated tag name).
### generatedSamplesMaxDepth
The generatedSamplesMaxDepth option controls how many schema levels automatically generated for payload samples. The default is 8 which works well for most APIs, but you can adjust it if necessary for your use case.
### hidePropertiesPrefix
In complex data structures or object schemas where properties are nested within parent objects the hidePropertiesPrefix option enables the hiding of parent names for nested properties within the documentation.
_Default: true_
## Deprecated Functional settings
### hideDownloadButton
Hides the 'Download' button for saving the API definition source file. **This setting does not make the API definition private**; it just hides the button.
### downloadFileName
Sets the filename for the downloaded API definition source file.
### downloadDefinitionUrl
Sets the URL for the downloaded API definition source file.
### requiredPropsFirst
Shows required properties in schemas first, ordered in the same order as in the required array.
### jsonSampleExpandLevel
Sets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.
_Default: 2_
### schemaExpansionLevel
Specifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemaExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.
### expandDefaultServerVariables
Enables or disables expanding default server variables.
### expandResponses
Controls which responses to expand by default. Specify one or more responses by providing their response codes as a comma-separated list without spaces, for example `expandResponses='200,201'`. Special value 'all' expands all responses by default. Be careful: this option can slow down documentation rendering time.
### expandSingleSchemaField
Automatically expands the single field in a schema.
### hideHostname
If set to `true`, the protocol and hostname are not shown in the operation definition.
### hideRequestPayloadSample
Hides request payload examples.
### hideOneOfDescription
If set to `true`, the description for `oneOf`/`anyOf` object is not shown in the schema.
### hideSchemaPattern
If set to `true`, the pattern is not shown in the schema.
### hideSecuritySection
Hides the Security panel section.
### hideSingleRequestSampleTab
Hides the request sample tab for requests with only one sample.
### menuToggle
If set to `true`, selecting an expanded item in the sidebar twice collapses it.
_Default: true_
### nativeScrollbars
If set to `true`, the sidebar uses the native scrollbar instead of perfect-scroll. This setting is a scrolling performance optimization for big API definitions.
### pathInMiddlePanel
Shows the path link and HTTP verb in the middle panel instead of the right panel.
### payloadSampleIdx
If set, the payload sample is inserted at the specified index. If there are `N` payload samples and the value configured here is bigger than `N`, the payload sample is inserted last. Indexes start from 0.
### showObjectSchemaExamples
Shows object schema example in the properties; default `false`.
### showWebhookVerb
When set to `true`, shows the HTTP request method for webhooks in operations and in the sidebar.
### simpleOneOfTypeLabel
Shows only unique `oneOf` types in the label without titles.
### sortEnumValuesAlphabetically
When set to `true`, sorts all enum values in all schemas alphabetically.
### sortOperationsAlphabetically
When set to `true`, sorts operations in the navigation sidebar and in the middle panel alphabetically.
### sortPropsAlphabetically
When set to `true`, sorts properties in all schemas alphabetically.
### sortTagsAlphabetically
When set to true, sorts tags in the navigation sidebar and in the middle panel alphabetically. Note that only tags are sorted alphabetically in the middle panel, not the operations associated with each tag. To sort operations alphabetically as well, you must set the `sortOperationsAlphabetically` setting to `true`.
_Default: false_
### untrustedSpec
If set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.
## Theme settings
Change styles for the API documentation page. **Supported in Redoc CE 2.x**.
* `spacing`
* `unit`: 5 # main spacing unit used in autocomputed theme values later
* `sectionHorizontal`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8
* `sectionVertical`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8
* `breakpoints` # breakpoints for switching three/two and mobile view layouts
* `small`: '50rem'
* `medium`: '85rem'
* `large`: '105rem'
* `colors`
* `tonalOffset`: 0.3 # default tonal offset used in computations
* `typography`
* `fontSize`: '14px'
* `lineHeight`: '1.5em'
* `fontWeightRegular`: '400'
* `fontWeightBold`: '600'
* `fontWeightLight`: '300'
* `fontFamily`: 'Roboto, sans-serif'
* `smoothing`: 'antialiased'
* `optimizeSpeed`: true
* `headings`
* `fontFamily`: 'Montserrat, sans-serif'
* `fontWeight`: '400'
* `lineHeight`: '1.6em'
* `code` # inline code styling
* `fontSize`: '13px'
* `fontFamily`: 'Courier, monospace'
* `lineHeight`: # COMPUTED: typography.lineHeight
* `fontWeight`: # COMPUTED: typography.fontWeightRegular
* `color`: '#e53935'
* `backgroundColor`: 'rgba(38, 50, 56, 0.05)'
* `wrap`: false # whether to break word for inline blocks (otherwise they can overflow)
* `links`
* `color`: # COMPUTED: colors.primary.main
* `visited`: # COMPUTED: typography.links.color
* `hover`: # COMPUTED: lighten(0.2 typography.links.color)
* `textDecoration`: 'auto'
* `hoverTextDecoration`: 'auto'
* `sidebar`
* `width`: '260px'
* `backgroundColor`: '#fafafa'
* `textColor`: '#333333'
* `activeTextColor`: # COMPUTED: theme.sidebar.textColor (if set by user) or theme.colors.primary.main
* `groupItems` # Group headings
* `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor
* `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor
* `textTransform`: 'uppercase'
* `level1Items` # Level 1 items like tags or section 1st level items
* `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor
* `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor
* `textTransform`: 'none'
* `arrow` # sidebar arrow
* `size`: '1.5em'
* `color`: # COMPUTED: theme.sidebar.textColor
* `logo`
* `maxHeight`: # COMPUTED: sidebar.width
* `maxWidth`: # COMPUTED: sidebar.width
* `gutter`: '2px' # logo image padding
* `rightPanel`
* `backgroundColor`: '#263238'
* `width`: '40%'
* `textColor`: '#ffffff'
* `servers`
* `overlay`
* `backgroundColor`: '#fafafa'
* `textColor`: '#263238'
* `url`
* `backgroundColor`: '#fff'
* `fab`
* `backgroundColor`: '#263238'
* `color`: '#ffffff'
## Additional customization
### Security Definition location
You can inject the Security Definitions widget into any place in your definition `description`.
For more information, refer to [Security definitions injection](./security-definitions-injection.md).
### OpenAPI specification extensions
Redoc uses the following [specification extensions](https://redocly.com/docs-legacy/api-reference-docs/spec-extensions/):
* [`x-logo`](./redoc-vendor-extensions.md#x-logo) - is used to specify API logo
* [`x-traitTag`](./redoc-vendor-extensions.md#x-traittag) - useful for handling out common things like Pagination, Rate-Limits, etc
* [`x-codeSamples`](./redoc-vendor-extensions.md#x-codesamples) - specify operation code samples
* [`x-examples`](./redoc-vendor-extensions.md#x-examples) - specify JSON example for requests
* [`x-nullable`](./redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable
* [`x-displayName`](./redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories
* [`x-tagGroups`](./redoc-vendor-extensions.md#x-taggroups) - group tags by categories in the side menu
* [`x-servers`](./redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
* [`x-additionalPropertiesName`](./redoc-vendor-extensions.md#x-additionalpropertiesname) - ability to supply a descriptive name for the additional property keys
* [`x-summary`](./redoc-vendor-extensions.md#x-summary) - For Response object, use as the response button text, with description rendered under the button
* [`x-explicitMappingOnly`](./redoc-vendor-extensions.md#x-explicitmappingonly) - In Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object

35
docs/deployment/cli.md Normal file
View File

@ -0,0 +1,35 @@
---
seo:
title: Use the Redoc CLI
---
# How to use the Redocly CLI
With Redocly CLI, you can bundle your OpenAPI definition and API documentation
(made with Redoc) into an HTML file and render it locally.
## Step 1 - Install Redocly CLI
First, you need to install the `@redocly/cli` package.
You can install it [globally](../../cli/installation#install-globally) using npm.
Or you can install it during [runtime](../../cli/installation#use-npx-at-runtime) using npx or Docker.
## Step 2 - Build the HTML file
The Redocly CLI `build-docs` command builds Redoc into an HTML file.
To build an HTML file using Redocly CLI, enter the following command,
replacing `apis/openapi.yaml` with your API definition file's name and path:
```bash
redocly build-docs apis/openapi.yaml
```
See the [build-docs](../../cli/commands/build-docs) documentation for more information
on the different options and ways you can use the command.
Also, check out [Redocly CLI commands](../../cli/commands), for more
information on the different things you can do with Redocly CLI including
linting, splitting, and bundling your API definition file.

40
docs/deployment/docker.md Normal file
View File

@ -0,0 +1,40 @@
---
seo:
title: Use the Redoc Docker image
---
# How to use the Redoc Docker image
Redoc is available as a pre-built Docker image in [Docker Hub](https://hub.docker.com/r/redocly/redoc/).
If you have [Docker](https://docs.docker.com/get-docker/) installed, pull the image with the following command:
```docker
docker pull redocly/redoc
```
Then run the image with the following command:
```docker
docker run -p 8080:80 redocly/redoc
```
The preview starts on port 8080, based on the port used in the command,
and can be accessed at `http://localhost:8080`.
To exit the preview, use `control+C`.
By default Redoc starts with a demo Swagger Petstore OpenAPI definition located at
http://petstore.swagger.io/v2/swagger.json. You can update this URL using
the environment variable `SPEC_URL`.
For example:
```bash
docker run -p 8080:80 -e SPEC_URL=https://api.example.com/openapi.json redocly/redoc
```
## Create a Dockerfile
You can also create a Dockerfile with some predefined environment variables. Check out
a sample [Dockerfile](https://github.com/Redocly/redoc/blob/main/config/docker/Dockerfile)
in our code repo.

140
docs/deployment/html.md Normal file
View File

@ -0,0 +1,140 @@
---
seo:
title: Use the Redoc HTML element
---
# Use Redoc in HTML
To render API documentation in an HTML page, start with the template below and
replace the `spec-url` value with the local file path or URL of your API
description.
```html
<!DOCTYPE html>
<html>
<head>
<title>Redoc</title>
<!-- needed for adaptive design -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<!--
Redoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
</body>
</html>
```
{% admonition type="success" name="URL or local file" %}
Set `spec-url` to a relative path if the file is local, e.g. `spec-url=my-api.yaml`. Use a full URL like the example above if it's hosted elsewhere.
{% /admonition %}
Open the HTML file in your browser to see the HTML documentation rendering. You may want to read the next section and add some configuration to make your documentation your own.
## Configure Redoc
Redoc is highly configurable, find a [full list of configuration options](../config.md) on the dedicated page.
To configure Redoc in HTML, add the property names to the HTML tag. Here's an example that makes all the required properties display first in the list:
```html
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json' required-props-first=true></redoc>
```
Any of the individual properties can be added to the tag, as many as you need to get your API docs set up as you like them.
### Theme configuration
The `theme` configuration setting is more complex since it represents many nested options, you can supply these as a JSON string to the `theme` attribute. For example, to change the sidebar color you would use a tag like this:
```html
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'
required-props-first=true
theme='{
"sidebar": {
"backgroundColor": "lightblue"
}
}'
></redoc>
```
Check out the [list of options for theme configuration](../config.md#theme-settings) and build up the configuration that suits your API needs.
## Advanced options
### The Redoc object
As an alternative to the HTML tag, you can also initialise Redoc in a web page using the Redoc object and invoking it from JavaScript. This is useful for situations where you want to create dynamic content in a page, and also provides a simple way to attach the Redoc element to an existing container.
The Redoc object offers an `init` function:
```js
Redoc.init(specOrSpecUrl, options, element, callback)
```
- `specOrSpecUrl`: Either a JSON object with the OpenAPI definition or a file name/URL to the
definition in JSON or YAML format.
- `options`: See the [configuration reference](../config.md).
- `element`: DOM element Redoc is inserted into.
- `callback`(optional): Callback to be called after Redoc has been fully rendered.
It is also called on errors with `error` as the first argument.
Call `Redoc.init()` from the JavaScript on a web page to add the element to the named container. Below is an example of an HTML page with a `<div>` tag, and the JavaScript to add the Redoc object to it.
```html
<!DOCTYPE html>
<html>
<head />
<body>
<H1>Redoc in action</H1>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
<div id="redoc-container"></div>
<script>
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
"expandResponses": "200,400"
}, document.getElementById('redoc-container'))
</script>
</body>
</html>
```
This example also sets the configuration for `expandResponses` so all 200 and 400 status responses are shown unfolded and with their details visible when the page loads.
### Self-host dependencies
You can reference the Redoc script using either a link to the files hosted on a CDN
or install to your `node-modules` folder. Using the CDN is the simplest option, but
if you need to host in a closed environment or have requirements around external
dependencies, it may be useful to self-host.
The main example shows using the CDN:
```html
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
```
If you would instead prefer to host the depdencies yourself, first install `redoc` using `npm`:
```sh
npm install redoc
```
_(Yarn users can install the `redoc` package with `yarn`)_.
You can then reference the Redoc script with a node modules link:
```html
<script src="node_modules/redoc/bundles/redoc.standalone.js"> </script>
```

83
docs/deployment/intro.md Normal file
View File

@ -0,0 +1,83 @@
---
seo:
title: Redoc deployment guide
---
# Redoc deployment guide
Redoc offers multiple options for rendering your OpenAPI definition.
You should select the option that best fits your needs.
The following options are supported:
- **[Live demo](https://redocly.github.io/redoc/):**
The live demo offers a fast way to see how your OpenAPI renders with 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**.
- **[HTML element](./html.md):**
Using the HTML element works well for typical website deployments.
- **[React component](./react.md):**
Using the React component is an option for users with a React-based application.
- **[Docker image](./docker.md):**
Using the Docker image works in a container-based deployment.
- **[Redocly CLI](./cli.md):**
Using the Redocly CLI is an option for users who prefer to use a command-line interface.
## Before you start
### OpenAPI definition
You need an OpenAPI definition. For testing purposes, you can use one of the following sample OpenAPI definitions:
- OpenAPI 3.0
- [Museum Example API](https://github.com/Redocly/museum-openapi-example/blob/main/openapi.yaml)
- [Petstore Sample OpenAPI Definition](https://petstore3.swagger.io/api/v3/openapi.json)
- OpenAPI 2.0
- [Thingful OpenAPI Definition](https://raw.githubusercontent.com/thingful/openapi-spec/master/spec/swagger.yaml)
- [Fitbit Plus OpenAPI Definition](https://raw.githubusercontent.com/TwineHealth/TwineDeveloperDocs/master/spec/swagger.yaml)
{% admonition type="info" name="OpenAPI specification" %}
For more information on the OpenAPI specification, refer to the [Learning OpenAPI 3](https://redocly.com/docs/resources/learning-openapi/)
section in the documentation.
{% /admonition %}
### How to run Redoc locally
If you want to view your Redoc output locally, you can simulate an HTTP server.
#### Python
If you have [Python 3](https://www.python.org/downloads/) installed, `cd` into your
project directory and run the following command:
```python
python3 -m http.server
```
If you have [Python 2](https://www.python.org/downloads/) installed, `cd` into your
project directory and run the following command:
```python
python -m SimpleHTTPServer 8000
```
The output after entering the command provides the local URL where the preview can be accessed.
To exit the preview, use `control-C`.
#### Node.js
If you have [Node.js](https://nodejs.org/en/download/) installed, install `http-server`
using the following npm command:
```bash
npm install -g http-server
```
Then, `cd` into your project directory and run the following command:
```node
http-server
```
The output after entering the command provides the local URL where the preview can be accessed.
To exit the preview, use `control-C`.

82
docs/deployment/react.md Normal file
View File

@ -0,0 +1,82 @@
---
seo:
title: Use the Redoc React component
redirects:
'/docs/redoc/quickstart/react/':
to: '/docs/redoc/deployment/react/'
---
# How to use the Redoc React component
## Before you start
Install the following dependencies required by Redoc if you do not already have them installed:
- `react`
- `react-dom`
- `mobx`
- `styled-components`
- `core-js`
If you have npm installed, you can install these dependencies using the following command:
```js
npm i react react-dom mobx styled-components core-js
```
## Step 1 - Import the `RedocStandalone` component
```js
import { RedocStandalone } from 'redoc';
```
## Step 2 - Use the component
You can either link to your OpenAPI definition with a URL, using the following format:
```react
<RedocStandalone specUrl="url/to/your/spec"/>
```
Or you can pass your OpenAPI definition as an object, using the following format:
```js
<RedocStandalone spec={/* spec as an object */}/>
```
## Optional - Pass options
Options can be passed into the RedocStandalone component to alter how it renders.
For example:
```js
<RedocStandalone
specUrl="http://petstore.swagger.io/v2/swagger.json"
options={{
nativeScrollbars: true,
theme: { colors: { primary: { main: '#dd5522' } } },
}}
/>
```
For more information on configuration options, refer to the
[Configuration options for Reference docs](https://redocly.com/docs/api-reference-docs/configuration/functionality/)
section of the documentation. Options available for Redoc are noted,
"Supported in Redoc CE".
## Optional - Specify `onLoaded` callback
You can also specify the `onLoaded` callback, which is called each time Redoc
is fully rendered or when an error occurs (with an error as the first argument).
```js
<RedocStandalone
specUrl="http://petstore.swagger.io/v2/swagger.json"
onLoaded={(error) => {
if (!error) {
console.log('Yay!');
}
}}
/>
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

BIN
docs/images/nested-demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

BIN
docs/images/redoc-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/images/redoc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

97
docs/index.md Normal file
View File

@ -0,0 +1,97 @@
---
seo:
title: Redoc
---
# Redoc: Open source API documentation tool
Redoc is a clean and easy way to produce web-ready documentation from an OpenAPI description (Swagger is also still supported). With one command, create your documentation, and customize it to meet the needs of your users.
Redoc is based around a three panel layout, with clear sections for navigation, detailed documentation, and request/response examples.
## Headline features
* Modern layout with extensive customization options.
* Support for OpenAPI 3.1, 3.0 and older 2.0 and Swagger formats.
* Embed or build standalone HTML documentation.
* CLI tool for easy automation and local development.
## Demo
[Try the live demo](https://redocly.github.io/redoc/) and upload your own API specification there to try.
## Usage
Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.
### Generate documentation from the CLI
If you have Node installed, quickly generate documentation using `npx`:
```sh
npx @redocly/cli build-docs openapi.yaml
```
The tool outputs by default to a file named `redoc-static.html` that you can open in your browser.
> [Redocly CLI](https://github.com/Redocly/redocly-cli/) does more than docs, check it out and add linting, bundling and more to your API workflow.
### Add an HTML element to the page
Create an HTML page, or edit an existing one, and add the following:
```html
<redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
```
Open the HTML file in your browser, and your API documentation is shown on the page.
Add your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.
### More usage options
Check out the [deployment documentation](./deployment/intro.md) for more options, and detailed documentation for each.
## Configure Redoc
Redoc is highly configurable. Each deployment option accepts configuration in a way that's appropriate to that platform, but the options are the same for each. For example:
* Using [Redocly CLI](../cli), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`.
* Using HTML or React, configure by setting `option` in the tag.
Here's a sample `redocly.yaml` configuration file, showing a few common settings and tweaking some of the visual theme settings:
```yaml
theme:
openapi:
disableSearch: true
expandResponses: 200,202
jsonSamplesExpandLevel: 1
theme:
sidebar:
backgroundColor: '#eae0cc'
textColor: '#3d005b'
colors:
primary:
main: '#660099'
typography:
fontSize: 14pt
headings:
fontWeight: bold
```
Redocly CLI detects a file named `redocly.yaml` in the same directory as you run the command and uses it. See the documentation with a command like this:
```sh
redocly build-docs openapi.yaml
```
There are many, many more options available. Visit the [configuration reference](./config.md) for a complete list.
## Next steps
* If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter) for a great introduction.
* Ready to build documentation from an existing OpenAPI file? Go to the [Redoc quickstart](./quickstart.md) and get started.
* Learn more about the project by visiting [Redoc on GitHub](https://github.com/Redocly/redoc).

53
docs/quickstart.md Normal file
View File

@ -0,0 +1,53 @@
---
seo:
title: Redoc quickstart guide
---
# Redoc quickstart guide
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
<!DOCTYPE html>
<html>
<head>
<title>Redoc</title>
<!-- needed for adaptive design -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
rel="stylesheet"
/>
<!--
Redoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<!--
Redoc element with link to your OpenAPI definition
-->
<redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
<!--
Link to Redoc JavaScript on CDN for rendering standalone element
-->
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
</body>
</html>
```
{% admonition type="info" name="Redoc requires an HTTP server to run locally" %}
Loading local OpenAPI definitions is impossible without running a web server because of issues with
[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) and
other security reasons. Refer to [Running Redoc locally](./deployment/intro.md#how-to-run-redoc-locally) for more information.
{% /admonition %}
For a more detailed explanation with step-by-step instructions and additional options for using Redoc, refer to the [Redoc deployment guide](./deployment/intro.md).

View File

@ -1,27 +1,137 @@
# ReDoc vendor extensions
ReDoc makes use of the following [vendor extensions](http://swagger.io/specification/#vendorExtensions)
# Redoc vendor extensions
### <a name="infoObject"></a>[Info Object](http://swagger.io/specification/#infoObject) vendor extensions
You can use the following [vendor extensions](https://redocly.com/docs/openapi-visual-reference/specification-extensions/) with Redoc.
#### <a name="x-logo"></a> x-logo
- [Redoc vendor extensions](#redoc-vendor-extensions)
- [Swagger Object](#swagger-object)
- [x-servers](#x-servers)
- [x-tagGroups](#x-taggroups)
- [How to use with Redoc](#how-to-use-with-redoc)
- [Tag Group Object](#tag-group-object)
- [Fixed fields](#fixed-fields)
- [x-tagGroups example](#x-taggroups-example)
- [Info Object](#info-object)
- [x-logo](#x-logo)
- [How to use with Redoc](#how-to-use-with-redoc-1)
- [Logo Object](#logo-object)
- [Fixed fields](#fixed-fields-1)
- [x-logo example](#x-logo-example)
- [Tag Object](#tag-object)
- [x-traitTag](#x-traittag)
- [How to use with Redoc](#how-to-use-with-redoc-2)
- [x-traitTag example](#x-traittag-example)
- [x-displayName](#x-displayname)
- [Operation Object vendor extensions](#operation-object-vendor-extensions)
- [x-codeSamples](#x-codesamples)
- [How to use with Redoc](#how-to-use-with-redoc-3)
- [Code Sample Object](#code-sample-object)
- [Fixed fields](#fixed-fields-2)
- [Code Sample Object example](#code-sample-object-example)
- [x-badges](#x-badges)
- [Parameter Object](#parameter-object)
- [x-examples](#x-examples)
- [How to use with Redoc](#how-to-use-with-redoc-4)
- [Response Object vendor extensions](#response-object-vendor-extensions)
- [x-summary](#x-summary)
- [How to use with Redoc](#how-to-use-with-redoc-5)
- [Schema Object](#schema-object)
- [x-nullable](#x-nullable)
- [How to use with Redoc](#how-to-use-with-redoc-6)
- [x-additionalPropertiesName](#x-additionalpropertiesname)
- [How to use with Redoc](#how-to-use-with-redoc-7)
- [x-additionalPropertiesName example](#x-additionalpropertiesname-example)
- [x-explicitMappingOnly](#x-explicitmappingonly)
- [How to use with Redoc](#how-to-use-with-redoc-8)
- [x-explicitMappingOnly example](#x-explicitmappingonly-example)
- [x-enumDescriptions](#x-enumdescriptions)
- [How to use with Redoc](#how-to-use-with-redoc-9)
- [x-enumDescriptions example](#x-enumdescriptions-example)
## Swagger Object
Extends the OpenAPI root [OpenAPI Object](https://redocly.com/docs/openapi-visual-reference/openapi)
### x-servers
Backported from OpenAPI 3.0 [`servers`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#server-object). Currently doesn't support templates.
### x-tagGroups
| Field Name | Type | Description |
| :------------- | :-----------: | :---------- |
| x-logo | [Logo Object](#logoObject) | The information about API logo |
| x-tagGroups | [ [Tag Group Object](#tag-group-object) ] | A list of tag groups |
###### Usage in Redoc
`x-logo` is used to specify API logo. The corresponding image are displayed just above side-menu.
#### How to use with Redoc
`x-tagGroups` is used to group tags in the side menu.
Before you use `x-tagGroups`, make sure you **add all tags to a group**, since a tag that is not in a group, **is not displayed** at all!
#### <a name="logoObject"></a>Logo Object
<a name="tagGroupObject"></a>
#### Tag Group Object
Information about tags group
##### Fixed fields
| Field Name | Type | Description |
| :---------- | :--------: | :---------- |
| name | string | The group name |
| tags | [ string ] | List of tags to include in this group |
#### x-tagGroups example
json
```json
{
"x-tagGroups": [
{
"name": "User Management",
"tags": ["Users", "API keys", "Admin"]
},
{
"name": "Statistics",
"tags": ["Main Stats", "Secondary Stats"]
}
]
}
```
yaml
```yaml
x-tagGroups:
- name: User Management
tags:
- Users
- API keys
- Admin
- name: Statistics
tags:
- Main Stats
- Secondary Stats
```
## Info Object
Extends the OpenAPI [Info Object](https://redocly.com/docs/openapi-visual-reference/info/)
### x-logo
| Field Name | Type | Description |
| :------------- | :-----------: | :---------- |
| x-logo | [Logo Object](#logo-object) | The information about API logo |
#### How to use with Redoc
`x-logo` is used to specify API logo. The corresponding image is displayed just above the side-menu.
<a name="logoObject"></a>
#### Logo Object
The information about API logo
###### Fixed fields
#### Fixed fields
| Field Name | Type | Description |
| :-------------- | :------: | :---------- |
| url | string | The URL pointing to the spec logo. MUST be in the format of a URL
| backgroundColor | string | background color to be used. MUST be in [CSS color syntax](https://developer.mozilla.org/en/docs/Web/CSS/color) |
| url | string | The URL pointing to the spec logo. MUST be in the format of a URL. It SHOULD be an absolute URL so your API definition is usable from any location |
| backgroundColor | string | background color to be used. MUST be RGB color in [hexadecimal format] (https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) |
| altText | string | Text to use for alt tag on the logo. Defaults to 'logo' if nothing is provided. |
| href | string | The URL pointing to the contact page. Default to 'info.contact.url' field of the OAS. |
###### x-logo example
#### x-logo example
json
```json
{
@ -29,8 +139,9 @@ json
"version": "1.0.0",
"title": "Swagger Petstore",
"x-logo": {
"url": "https://rebilly.github.io/ReDoc/petstore-logo.png",
"backgroundColor": "white"
"url": "https://redocly.github.io/redoc/petstore-logo.png",
"backgroundColor": "#FFFFFF",
"altText": "Petstore logo"
}
}
}
@ -41,24 +152,25 @@ info:
version: "1.0.0"
title: "Swagger Petstore"
x-logo:
url: "https://rebilly.github.io/ReDoc/petstore-logo.png"
backgroundColor: "white"
url: "https://redocly.github.io/redoc/petstore-logo.png"
backgroundColor: "#FFFFFF"
altText: "Petstore logo"
```
## Tag Object
Extends the OpenAPI [Tag Object](https://redocly.com/docs/openapi-visual-reference/tags/)
### x-traitTag
### [Tag object](http://swagger.io/specification/#tagObject) vendor extensions
#### <a name="x-traitTag"></a> x-traitTag
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-traitTag | boolean | In Swagger two operations can have multiply tags. This property distinguish between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) |
| x-traitTag | boolean | In Swagger two operations can have multiple tags. This property distinguishes between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) |
###### Usage in Redoc
Tags that have `x-traitTag` set to `true` are listed in side-menu but don't have any subitems (operations). Tag `description` is rendered as well.
#### How to use with Redoc
Tags that have `x-traitTag` set to `true` are listed in the side-menu but don't have any subitems (operations). It also renders the `description` tag.
This is useful for handling out common things like Pagination, Rate-Limits, etc.
###### x-traitTag example
#### x-traitTag example
json
```json
{
@ -74,26 +186,39 @@ description: Pagination description (can use markdown syntax)
x-traitTag: true
```
### [Operation Object](http://swagger.io/specification/#operationObject) vendor extensions
### x-displayName
#### <a name="x-code-samples"></a> x-code-samples
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-code-samples | [ [Code Sample Object](#codeSampleObject) ] | A list of code samples associated with operation |
| x-displayName | string | Defines the text that is used for this tag in the menu and in section headings |
###### Usage in ReDoc
`x-code-samples` are rendered on the right panel of ReDoc
## Operation Object vendor extensions
Extends the OpenAPI [Operation Object](https://redocly.com/docs/openapi-visual-reference/operation/)
#### <a name="codeSampleObject"></a>Code Sample Object
### x-codeSamples
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-codeSamples | [ [Code Sample Object](#code-sample-object) ] | A list of code samples associated with operation |
#### How to use with Redoc
`x-codeSamples` are rendered on the right panel in Redoc.
<a name="codeSampleObject"></a>
### Code Sample Object
Operation code sample
###### Fixed fields
#### Fixed fields
| Field Name | Type | Description |
| :---------- | :------: | :----------- |
| lang | string | Code sample language. Value should be one of the following [list](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) |
| label | string? | Code sample label, for example `Node` or `Python2.7`, _optional_, `lang` is used by default |
| source | string | Code sample source code |
###### Code Sample Object example
#### Code Sample Object example
json
```json
{
@ -106,3 +231,134 @@ yaml
lang: JavaScript
source: console.log('Hello World');
```
### x-badges
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-badges | [[Badge Object](https://redocly.com/docs/realm/author/reference/openapi-extensions/x-badges#badge-object)] | A list of badges associated with the operation |
## Parameter Object
Extends the OpenAPI [Parameter Object](https://redocly.com/docs/openapi-visual-reference/parameter/)
### x-examples
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-examples | [Example Object](https://redocly.com/docs/openapi-visual-reference/example/) | Object that contains examples for the request. Applies when `in` is `body` and mime-type is `application/json` |
#### How to use with Redoc
`x-examples` are rendered in the JSON tab on the right panel in Redoc.
## Response Object vendor extensions
Extends the OpenAPI [Response Object](https://redocly.com/docs/openapi-visual-reference/response/).
### x-summary
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-summary | string | a short summary of the response |
#### How to use with Redoc
If specified, you can use `x-summary` as the response button text, with description rendered under the button.
## Schema Object
Extends the OpenAPI [Schema Object](https://redocly.com/docs/openapi-visual-reference/schemas/)
### x-nullable
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-nullable | boolean | marks schema as a nullable |
#### How to use with Redoc
Schemas marked as `x-nullable` are marked in Redoc with the label Nullable.
### x-additionalPropertiesName
**Attention**: This is a Redoc-specific vendor extension, and is not supported by other tools.
Extends the `additionalProperties` property of the schema object.
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-additionalPropertiesName | string | descriptive name of additional properties keys |
#### How to use with Redoc
Redoc uses this extension to display a more descriptive property name in objects with `additionalProperties` when viewing the property list with an `object`.
#### x-additionalPropertiesName example
```yaml
Player:
required:
- name
properties:
name:
type: string
additionalProperties:
x-additionalPropertiesName: attribute-name
type: string
```
### x-explicitMappingOnly
**Attention**: This is Redoc-specific vendor extension, and is not supported by other tools.
Extends the `discriminator` property of the schema object.
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-explicitMappingOnly | boolean | limit the discriminator selectpicker to the explicit mappings only |
#### How to use with Redoc
Redoc uses this extension to filter the `discriminator` mappings shown in the selectpicker.
When set to `true`, the selectpicker lists only the explicitly defined mappings. When `false`, the default behavior is kept, in other words, explicit and implicit mappings are shown.
#### x-explicitMappingOnly example
```yaml
Pet:
type: object
required:
- name
- photoUrls
discriminator:
propertyName: petType
x-explicitMappingOnly: true
mapping:
cat: "#/components/schemas/Cat"
bee: "#/components/schemas/HoneyBee"
```
Shows in the selectpicker only the items `cat` and `bee`, even though the `Dog` class inherits from the `Pet` class.
### x-enumDescriptions
| Field Name | Type | Description |
| :------------- | :------: | :---------- |
| x-enumDescriptions | [[Enum Description Object](https://redocly.com/docs/realm/author/reference/openapi-extensions/x-enum-descriptions#enum-description-object)] | A list of the enum values and descriptions to include in the documentation. |
#### How to use with Redoc
The enum (short for "enumeration") fields in OpenAPI allow you to restrict the value of a field to a list of allowed values. These values need to be short and machine-readable, but that can make them harder for humans to parse and work with.
Add x-enumDescriptions to your OpenAPI description to show a helpful table of enum options and an explanation of what each one means. This field supports Markdown.
#### x-enumDescriptions example
The following example shows a schema with two short-named options, and the x-enumDescriptions entry to list all enum entries and give additional context for each:
```yaml
components:
schemas:
TicketType:
description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events.
type: string
enum:
- event
- general
x-enumDescriptions:
event: Event Tickets _(timed entry)_
general: General Admission
example: event
```

View File

@ -0,0 +1,23 @@
# Injection security definitions
You can inject the Security Definitions widget anywhere in your specification `description`:
```markdown
...
## Authorization
Some description
<!-- Redoc-Inject: <security-definitions> -->
...
```
The inject instruction is wrapped in an HTML comment,
so it is **visible only in Redoc** and not visible, for instance, in the SwaggerUI.
## Default behavior
If the injection tag is not found in the description, it is appended to the end
of description under the `Authentication` header.
If the `Authentication` header is already present in the description,
Security Definitions are not inserted or rendered.

6
e2e/e2e.html Normal file
View File

@ -0,0 +1,6 @@
<html>
<body>
<script src="../bundles/redoc.standalone.js">{}</script>
<div id="redoc" />
</body>
</html>;

6
e2e/index.html Normal file
View File

@ -0,0 +1,6 @@
<html>
<body>
<script src="../bundles/redoc.standalone.js">{}</script>
<div id="redoc" />
</body>
</html>;

129
e2e/integration/menu.e2e.ts Normal file
View File

@ -0,0 +1,129 @@
describe('Menu', () => {
describe('3.0 spec', () => {
beforeEach(() => {
cy.visit('e2e/standalone.html');
});
it('should have valid items count', () => {
cy.get('.menu-content').find('li').should('have.length', 35);
});
it('should sync active menu items while scroll', () => {
cy.contains('h2', 'Introduction')
.scrollIntoView()
.get('[role=menuitem] > label.active')
.should('have.text', 'Introduction');
cy.contains('h2', 'Add a new pet to the store')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.children()
.last()
.should('have.text', 'Add a new pet to the store')
.should('be.visible');
});
it('should sync active menu items while scroll back and scroll again', () => {
cy.contains('h2', 'Add a new pet to the store')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.children()
.last()
.should('have.text', 'Add a new pet to the store')
.should('be.visible');
cy.contains('h1', 'Swagger Petstore').scrollIntoView().wait(100);
cy.contains('h2', 'Introduction')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.should('have.text', 'Introduction');
cy.url().should('include', '#section/Introduction');
});
it('should update URL hash when clicking on menu items', () => {
cy.contains('[role=menuitem] > label.-depth1', 'pet').click({ force: true });
cy.get('li[data-item-id="schema/Cat"]')
.should('have.text', 'schemaCat')
.click({ force: true });
cy.location('hash').should('equal', '#schema/Cat');
});
it('should contains badge schema from x-badges', () => {
cy.contains('h2', 'Add a new pet to the store').scrollIntoView();
cy.contains('h2 > span', 'Beta')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.children('span[type="badge"]')
.should('have.text', 'Beta');
cy.contains('h2 > span', 'Alpha')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.children('span[type="badge"]')
.should('have.text', 'Alpha');
cy.contains('h2 > span', 'Gamma')
.scrollIntoView()
.wait(100)
.get('[role=menuitem] > label.active')
.children('span[type="badge"]')
.should('have.text', 'Gamma');
});
it('should contains Cat schema in Pet using x-tags', () => {
cy.contains('[role=menuitem] > label.-depth1', 'pet').click({ force: true });
cy.location('hash').should('equal', '#tag/pet');
cy.contains('[role=menuitem]', 'Find pet by ID').click({ force: true });
cy.location('hash').should('equal', '#tag/pet/operation/getPetById');
});
it('should deactivate tag when other is activated', () => {
const petItem = () => cy.contains('[role=menuitem] > label.-depth1', 'pet');
petItem().click({ force: true }).should('have.class', 'active');
cy.contains('[role=menuitem] > label.-depth1', 'store').click({ force: true });
petItem().should('not.have.class', 'active');
});
it('should be able to open a response object to see more details', () => {
cy.contains('h2', 'Find pet by ID')
.scrollIntoView()
.wait(100)
.parent()
.find('div h3')
.should('have.text', 'Responses')
.parent()
.find('div:first button')
.click()
.should('have.attr', 'aria-expanded', 'true')
.parent()
.find('div h5')
.then($h5 => $h5[0].firstChild!.nodeValue!.trim())
.should('eq', 'Response Schema:');
});
});
it('should be able to open the operation details when the operation IDs have quotes', () => {
cy.visit('e2e/standalone-3-1.html');
cy.get('label span[title="pet"]').click({ multiple: true, force: true });
cy.get('li').contains('OperationId with quotes').click({ multiple: true, force: true });
cy.get('h2').contains('OperationId with quotes').should('be.visible');
cy.url().should('include', 'deletePetBy%22Id');
});
it('should encode URL when the operation IDs have backslashes', () => {
cy.visit('e2e/standalone-3-1.html');
cy.get('label span[title="pet"]').click({ multiple: true, force: true });
cy.get('li').contains('OperationId with backslash').click({ multiple: true, force: true });
cy.get('h2').contains('OperationId with backslash').should('be.visible');
cy.url().should('include', 'delete%5CPetById');
});
});

View File

@ -0,0 +1,64 @@
// tslint:disable:no-implicit-dependencies
import * as yaml from 'js-yaml';
async function loadSpec(url: string): Promise<any> {
const spec = await (await fetch(url)).text();
return yaml.load(spec);
}
function initReDoc(win, spec, options = {}) {
(win as any).Redoc.init(spec, options, win.document.getElementById('redoc'));
}
describe('Servers', () => {
beforeEach(() => {
cy.visit('e2e/');
});
it('should have valid server', () => {
cy.window().then(async win => {
const spec = await loadSpec('/demo/openapi.yaml');
initReDoc(win, spec, {});
// TODO add cy-data attributes
cy.get('[data-section-id="tag/pet/operation/addPet"]').should(
'contain',
'http://petstore.swagger.io/v2/pet',
);
cy.get('[data-section-id="tag/pet/operation/addPet"]').should(
'contain',
'http://petstore.swagger.io/sandbox/pet',
);
});
});
it('should have valid server for when servers not provided', () => {
cy.window().then(async win => {
const spec = await loadSpec('/demo/openapi.yaml');
delete spec.servers;
initReDoc(win, spec, {});
// TODO add cy-data attributes
cy.get('[data-section-id="tag/pet/operation/addPet"]').should(
'contain',
'http://localhost:' + win.location.port + '/pet',
);
});
});
it('should have valid server for when servers not provided at .html pages', () => {
cy.visit('e2e/e2e.html');
cy.window().then(async win => {
const spec = await loadSpec('/demo/openapi.yaml');
delete spec.servers;
initReDoc(win, spec, {});
// TODO add cy-data attributes
cy.get('[data-section-id="tag/pet/operation/addPet"]').should(
'contain',
'http://localhost:' + win.location.port + '/pet',
);
});
});
});

View File

@ -0,0 +1,78 @@
describe('Search', () => {
const getSearchInput = () => cy.get('[role="search"] input');
const getSearchResults = () => cy.get('[data-role="search:results"]');
const getResult = i => cy.get('[role=search] label').eq(i);
beforeEach(() => {
cy.visit('e2e/standalone.html');
});
it('should correctly show and hide search results box', () => {
getSearchResults().should('not.exist');
// should not open for less than 3 symbols
getSearchInput().type('in', { force: true });
getSearchResults().should('not.exist');
getSearchInput().type('t', { force: true });
cy.get('[role=search] [role=menuitem]')
.should('have.length', 3)
.first()
.should('contain', 'Introduction');
getSearchInput().type('{esc}', { force: true });
getSearchResults().should('not.exist');
});
it('should support arrow navigation', () => {
getSearchInput().type('int', { force: true });
cy.wait(500);
getSearchInput().type('{downarrow}', { force: true });
getResult(0).should('have.class', 'active');
getSearchInput().type('{downarrow}', { force: true });
getResult(1).should('have.class', 'active');
getResult(0).should('not.have.class', 'active');
getSearchInput().type('{uparrow}', { force: true });
getResult(1).should('not.have.class', 'active');
getResult(0).should('have.class', 'active');
getSearchInput().type('{uparrow}', { force: true });
getResult(0).should('have.class', 'active');
getSearchInput().type('{enter}', { force: true });
cy.contains('[role=menu] label', 'Introduction').should('have.class', 'active');
});
it('should mark search results', () => {
cy.get('[data-markjs]').should('not.exist');
getSearchInput().type('int', { force: true });
cy.get('[data-markjs]').should('exist');
});
it('should show proper message when no search results are found', () => {
getSearchResults().should('not.exist');
getSearchInput().type('xzss', { force: true });
getSearchResults().should('exist').should('contain', 'No results found');
});
it('should allow search by path or keywords in path', () => {
getSearchInput().clear().type('uploadImage', { force: true });
cy.get('[role=search] [role=menuitem]')
.should('have.length', 1)
.first()
.should('contain', 'uploads an image');
getSearchInput()
.clear()
.type('/pet/{petId}/uploadImage', { force: true, parseSpecialCharSequences: false });
cy.get('[role=search] [role=menuitem]')
.should('have.length', 1)
.first()
.should('contain', 'uploads an image');
});
});

View File

@ -0,0 +1,21 @@
describe('Standalone bundle test', () => {
function baseCheck(name: string, url: string) {
describe(name, () => {
beforeEach(() => {
cy.visit(url);
});
it('Render and check no errors', () => {
cy.get('.api-info').should('exist');
});
it('Render and click all the menu items', () => {
cy.get('.menu-content li').click({ multiple: true, force: true });
});
});
}
baseCheck('OAS3 mode', 'e2e/standalone.html');
baseCheck('OAS3.1 mode', 'e2e/standalone-3-1.html');
baseCheck('OAS2 compatibility mode', 'e2e/standalone-compatibility.html');
});

View File

@ -0,0 +1,19 @@
describe('Supporting both operation/* and parent/*/operation* urls', () => {
beforeEach(() => {
cy.visit('e2e/standalone.html');
});
it('should supporting operation/* url', () => {
cy.url().then(loc => {
cy.visit(loc + '#operation/updatePet');
cy.get('li[data-item-id="tag/pet/operation/updatePet"]').should('be.visible');
});
});
it('should supporting parent/*/operation url', () => {
cy.url().then(loc => {
cy.visit(loc + '#tag/pet/operation/addPet');
cy.get('li[data-item-id="tag/pet/operation/addPet"]').should('be.visible');
});
});
});

Some files were not shown because too many files have changed in this diff Show More