mirror of
https://github.com/Redocly/redoc.git
synced 2024-12-05 06:43:43 +03:00
Merge remote-tracking branch 'upstream/master'
* upstream/master: (62 commits) fix: use operation path if operation summary/description is not provided (#1596) fix: parse json theme string for standalone tag (#1492) chore: update(cli) engine node version >=12 (#1583) chore(cli): v0.11.4 fix: right absolute path for load and bundle definition (#1579) chore(cli): v0.11.3 docs: update specUrl (#1577) fix: added missing semicolon to styling (#1578) chore: Release 2.0.0-rc.53 chore: Release 2.0.0-rc.52 chore: update openapi-core version to fix parsing root document chore(cli): v0.11.2 fix: broken paths when budle or serve using cli (#1572) chore(cli): v0.11.1 chore(cli): v0.11.0 chore: Release 2.0.0-rc.51 chore: unit tests to check loading and bundling api definitions with openapi-core (#1568) chore: use openapi-core to bundle definition instead of json-schema-ref-parser (#1500) docs: remove extra word in grammar (#1539) feat: add disable-google-font parameter to serve command in cli (#1558) ...
This commit is contained in:
commit
5035353119
|
@ -1,6 +1,6 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '10'
|
- '12'
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- "~/.cache"
|
- "~/.cache"
|
||||||
|
@ -30,8 +30,3 @@ deploy:
|
||||||
api_key: "$NPM_TOKEN"
|
api_key: "$NPM_TOKEN"
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
- provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script: npm run deploy:demo
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
|
|
79
CHANGELOG.md
79
CHANGELOG.md
|
@ -1,3 +1,82 @@
|
||||||
|
# [2.0.0-rc.51](https://github.com/Redocly/redoc/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2021-04-08)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* use openapi-core to bundle definition instead of json-schema-ref-parser ([5033946](https://github.com/Redocly/redoc/commit/503394655da2aac544e278796098cba93d9194b9)),
|
||||||
|
closes: [#1506](https://github.com/Redocly/redoc/issues/1506), [#1478](https://github.com/Redocly/redoc/issues/1478)
|
||||||
|
* add disable-google-font parameter to serve command in cli ([c7bbef5](https://github.com/Redocly/redoc/commit/c7bbef515524095e957729eac35a5b7a97619b55)), closes [#1501](https://github.com/Redocly/redoc/issues/1501)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-rc.50](https://github.com/Redocly/redoc/compare/v2.0.0-rc.49...v2.0.0-rc.50) (2021-02-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add includes polyfill ([3ba622f](https://github.com/Redocly/redoc/commit/3ba622f3ab9e28c954fe05f42e7b90862fc3d544)), closes [#1530](https://github.com/Redocly/redoc/issues/1530)
|
||||||
|
* background-color in search results ([#1531](https://github.com/Redocly/redoc/issues/1531)) ([d288165](https://github.com/Redocly/redoc/commit/d288165a4ea04aedc23dba12020a73e86f20755b))
|
||||||
|
* false-positive recursive tag case when using oneOf + allOf ([#1534](https://github.com/Redocly/redoc/issues/1534)) ([8270481](https://github.com/Redocly/redoc/commit/8270481e9f0f381b392f7921d21cb06e0e673b6d))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-rc.49](https://github.com/Redocly/redoc/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2021-01-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* crash on multiple examples on parameter object ([0dce880](https://github.com/Redocly/redoc/commit/0dce880dce1e489c7e8963e352d97603262f4b86)), closes [#1485](https://github.com/Redocly/redoc/issues/1485)
|
||||||
|
* fix SourceCodeWithCopy component to be non-pure ([040ce72](https://github.com/Redocly/redoc/commit/040ce72a8ae0c1ca7504e10e44d0b2ac7ba04977))
|
||||||
|
* pass boolean and number values as a string in highlight function ([#1512](https://github.com/Redocly/redoc/issues/1512)) ([c874a59](https://github.com/Redocly/redoc/commit/c874a5942c3bf9f6a2dc5909e31d57925d40aa86))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-rc.48](https://github.com/Redocly/redoc/compare/v2.0.0-rc.47...v2.0.0-rc.48) (2020-11-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add missed labels to elements ([#1445](https://github.com/Redocly/redoc/issues/1445)) ([8c559bc](https://github.com/Redocly/redoc/commit/8c559bcbcde39efee7f1570b88840468bfdfb17c))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add new option hideSchemaPattern ([#1475](https://github.com/Redocly/redoc/issues/1475)) ([bb4594e](https://github.com/Redocly/redoc/commit/bb4594ee58d89819c975bdb575083c0667e3d940))
|
||||||
|
* support multiple examples for parameters ([#1470](https://github.com/Redocly/redoc/issues/1470)) ([d12e410](https://github.com/Redocly/redoc/commit/d12e410d99a988948b359093159df79572bc78ab))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-rc.46](https://github.com/Redocly/redoc/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2020-11-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix arrow color in responses ([#1452](https://github.com/Redocly/redoc/issues/1452)) ([6bedcf9](https://github.com/Redocly/redoc/commit/6bedcf94b26d820101ab510b28d2b76a38999eea))
|
||||||
|
* remove duplicated slash if hideHostname option enabled ([#1448](https://github.com/Redocly/redoc/issues/1448)) ([4729fc3](https://github.com/Redocly/redoc/commit/4729fc3d8fc83f4af087cd7932adf500b45bab4e))
|
||||||
|
* use shrinkwrap for cli package ([#1446](https://github.com/Redocly/redoc/issues/1446)) ([4567534](https://github.com/Redocly/redoc/commit/4567534cbb26f13a72a64d49faca64fc992d6dd8))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add tabTextColor option for responses ([#1451](https://github.com/Redocly/redoc/issues/1451)) ([702fea0](https://github.com/Redocly/redoc/commit/702fea0f410499101efc554983c6db58acc84889))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-rc.45](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.45) (2020-10-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix the name of OpenID Connect security scheme ([#1425](https://github.com/Redocly/redoc/issues/1425)) ([c11f679](https://github.com/Redocly/redoc/commit/c11f679f82586a96225488c8a96d0c908bfd2e09))
|
||||||
|
* increase colors contrast to make them more accessible ([#1433](https://github.com/Redocly/redoc/issues/1433)) ([e2de5b0](https://github.com/Redocly/redoc/commit/e2de5b065eabd00d301ea61106ddafc65bd83afa))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add field constraint indicator for uniqueItems ([#1423](https://github.com/Redocly/redoc/issues/1423)) ([c0ae9de](https://github.com/Redocly/redoc/commit/c0ae9de60758aa7561ce8a04b6e0060d0bc4a258)), closes [#1353](https://github.com/Redocly/redoc/issues/1353)
|
||||||
|
* new extensions hook PropertyDetailsCell + wrap property name into span ([0703f73](https://github.com/Redocly/redoc/commit/0703f73f79a1cabafdc1a908ebb0c5ab142ca825))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-rc.44](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2020-10-16)
|
# [2.0.0-rc.44](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2020-10-16)
|
||||||
|
|
||||||
|
|
||||||
|
|
79
README.md
79
README.md
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
**OpenAPI/Swagger-generated API Reference Documentation**
|
**OpenAPI/Swagger-generated API Reference Documentation**
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/Redocly/redoc.svg?branch=master)](https://travis-ci.org/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Redocly/redoc?branch=master) [![dependencies Status](https://david-dm.org/Redocly/redoc/status.svg)](https://david-dm.org/Redocly/redoc) [![devDependencies Status](https://david-dm.org/Redocly/redoc/dev-status.svg)](https://david-dm.org/Redocly/redoc#info=devDependencies) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/master/LICENSE)
|
[![Build Status](https://travis-ci.com/Redocly/redoc.svg?branch=master)](https://travis-ci.com/Redocly/redoc) [![Coverage Status](https://coveralls.io/repos/Redocly/redoc/badge.svg?branch=master&service=github)](https://coveralls.io/github/Redocly/redoc?branch=master) [![dependencies Status](https://david-dm.org/Redocly/redoc/status.svg)](https://david-dm.org/Redocly/redoc) [![devDependencies Status](https://david-dm.org/Redocly/redoc/dev-status.svg)](https://david-dm.org/Redocly/redoc#info=devDependencies) [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/master/LICENSE)
|
||||||
|
|
||||||
[![bundle size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
|
[![bundle size](http://img.badgesize.io/https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc) [![Docker Build Status](https://img.shields.io/docker/build/redocly/redoc.svg)](https://hub.docker.com/r/redocly/redoc/)
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(d
|
||||||
| 1.17.x | 2.0 |
|
| 1.17.x | 2.0 |
|
||||||
|
|
||||||
## Some Real-life usages
|
## Some Real-life usages
|
||||||
- [Rebilly](https://rebilly-api.redoc.ly/)
|
- [Rebilly](https://api-reference.rebilly.com/)
|
||||||
- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)
|
- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)
|
||||||
- [Zuora](https://www.zuora.com/developer/api-reference/)
|
- [Zuora](https://www.zuora.com/developer/api-reference/)
|
||||||
- [Discourse](http://docs.discourse.org)
|
- [Discourse](http://docs.discourse.org)
|
||||||
|
@ -162,7 +162,7 @@ Also you can pass options:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
<RedocStandalone
|
<RedocStandalone
|
||||||
specUrl="http://rebilly.github.io/RebillyAPI/openapi.json"
|
specUrl="https://api.redoc.ly/registry/rebilly/core-api/core/bundle/master/openapi.yaml"
|
||||||
options={{
|
options={{
|
||||||
nativeScrollbars: true,
|
nativeScrollbars: true,
|
||||||
theme: { colors: { primary: { main: '#dd5522' } } },
|
theme: { colors: { primary: { main: '#dd5522' } } },
|
||||||
|
@ -176,7 +176,7 @@ You can also specify `onLoaded` callback which will be called each time Redoc ha
|
||||||
|
|
||||||
```js
|
```js
|
||||||
<RedocStandalone
|
<RedocStandalone
|
||||||
specUrl="http://rebilly.github.io/RebillyAPI/openapi.json"
|
specUrl="https://api.redoc.ly/registry/rebilly/core-api/core/bundle/master/openapi.yaml"
|
||||||
onLoaded={error => {
|
onLoaded={error => {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
console.log('Yay!');
|
console.log('Yay!');
|
||||||
|
@ -219,6 +219,9 @@ ReDoc makes use of the following [vendor extensions](https://swagger.io/specific
|
||||||
* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
|
* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)
|
||||||
* [`x-ignoredHeaderParameters`](docs/redoc-vendor-extensions.md#x-ignoredHeaderParameters) - ability to specify header parameter names to ignore
|
* [`x-ignoredHeaderParameters`](docs/redoc-vendor-extensions.md#x-ignoredHeaderParameters) - ability to specify header parameter names to ignore
|
||||||
* [`x-additionalPropertiesName`](docs/redoc-vendor-extensions.md#x-additionalPropertiesName) - ability to supply a descriptive name for the additional property keys
|
* [`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-extendedDiscriminator`](docs/redoc-vendor-extensions.md#x-extendedDiscriminator) - In Schemas, uses this to solve name-clash issues with the standard discriminator
|
||||||
|
* [`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
|
||||||
|
|
||||||
### `<redoc>` options object
|
### `<redoc>` options object
|
||||||
You can use all of the following options with standalone version on <redoc> tag by kebab-casing them, e.g. `scrollYOffset` becomes `scroll-y-offset` and `expandResponses` becomes `expand-responses`.
|
You can use all of the following options with standalone version on <redoc> tag by kebab-casing them, e.g. `scrollYOffset` becomes `scroll-y-offset` and `expandResponses` becomes `expand-responses`.
|
||||||
|
@ -226,16 +229,18 @@ You can use all of the following options with standalone version on <redoc> tag
|
||||||
* `disableSearch` - disable search indexing and search box.
|
* `disableSearch` - disable search indexing and search box.
|
||||||
* `expandDefaultServerVariables` - enable expanding default server variables, default `false`.
|
* `expandDefaultServerVariables` - enable expanding default server variables, default `false`.
|
||||||
* `expandResponses` - specify which responses to expand by default by response codes. Values should be passed as comma-separated list without spaces e.g. `expandResponses="200,201"`. Special value `"all"` expands all responses by default. Be careful: this option can slow-down documentation rendering time.
|
* `expandResponses` - specify which responses to expand by default by response codes. Values should be passed as comma-separated list without spaces e.g. `expandResponses="200,201"`. Special value `"all"` expands all responses by default. Be careful: this option can slow-down documentation rendering time.
|
||||||
|
* `maxDisplayedEnumValues` - display only specified number of enum values. hide rest values under spoiler.
|
||||||
* `hideDownloadButton` - do not show "Download" spec button. **THIS DOESN'T MAKE YOUR SPEC PRIVATE**, it just hides the button.
|
* `hideDownloadButton` - do not show "Download" spec button. **THIS DOESN'T MAKE YOUR SPEC PRIVATE**, it just hides the button.
|
||||||
* `hideHostname` - if set, the protocol and hostname is not shown in the operation definition.
|
* `hideHostname` - if set, the protocol and hostname is not shown in the operation definition.
|
||||||
* `hideLoading` - do not show loading animation. Useful for small docs.
|
* `hideLoading` - do not show loading animation. Useful for small docs.
|
||||||
|
* `hideSchemaPattern` - if set, the pattern is not shown in the schema.
|
||||||
* `hideSingleRequestSampleTab` - do not show the request sample tab for requests with only one sample.
|
* `hideSingleRequestSampleTab` - do not show the request sample tab for requests with only one sample.
|
||||||
* `expandSingleSchemaField` - automatically expand single field in a schema
|
* `expandSingleSchemaField` - automatically expand single field in a schema
|
||||||
* `jsonSampleExpandLevel` - set the default expand level for JSON payload samples (responses and request body). Special value 'all' expands all levels. The default value is `2`.
|
* `jsonSampleExpandLevel` - set the default expand level for JSON payload samples (responses and request body). Special value `"all"` expands all levels. The default value is `2`.
|
||||||
* `hideSchemaTitles` - do not display schema `title` next to to the type
|
* `hideSchemaTitles` - do not display schema `title` next to to the type
|
||||||
* `simpleOneOfTypeLabel` - show only unique oneOf types in the label without titles
|
* `simpleOneOfTypeLabel` - show only unique oneOf types in the label without titles
|
||||||
* `lazyRendering` - _Not implemented yet_ ~~if set, enables lazy rendering mode in ReDoc. This mode is useful for APIs with big number of operations (e.g. > 50). In this mode ReDoc shows initial screen ASAP and then renders the rest operations asynchronously while showing progress bar on the top. Check out the [demo](\\redocly.github.io/redoc) for the example.~~
|
* `lazyRendering` - _Not implemented yet_ ~~if set, enables lazy rendering mode in ReDoc. This mode is useful for APIs with big number of operations (e.g. > 50). In this mode ReDoc shows initial screen ASAP and then renders the rest operations asynchronously while showing progress bar on the top. Check out the [demo](\\redocly.github.io/redoc) for the example.~~
|
||||||
* `menuToggle` - if true clicking second time on expanded menu item will collapse it, default `false`.
|
* `menuToggle` - if true clicking second time on expanded menu item will collapse it, default `true`.
|
||||||
* `nativeScrollbars` - use native scrollbar for sidemenu instead of perfect-scroll (scrolling performance optimization for big specs).
|
* `nativeScrollbars` - use native scrollbar for sidemenu instead of perfect-scroll (scrolling performance optimization for big specs).
|
||||||
* `noAutoAuth` - do not inject Authentication section automatically.
|
* `noAutoAuth` - do not inject Authentication section automatically.
|
||||||
* `onlyRequiredInSamples` - shows only required fields in request samples.
|
* `onlyRequiredInSamples` - shows only required fields in request samples.
|
||||||
|
@ -248,11 +253,67 @@ You can use all of the following options with standalone version on <redoc> tag
|
||||||
* **function**: A getter function. Must return a number representing the offset (in pixels).
|
* **function**: A getter function. Must return a number representing the offset (in pixels).
|
||||||
* `showExtensions` - show vendor extensions ("x-" fields). Extensions used by ReDoc are ignored. Can be boolean or an array of `string` with names of extensions to display.
|
* `showExtensions` - show vendor extensions ("x-" fields). Extensions used by ReDoc are ignored. Can be boolean or an array of `string` with names of extensions to display.
|
||||||
* `sortPropsAlphabetically` - sort properties alphabetically.
|
* `sortPropsAlphabetically` - sort properties alphabetically.
|
||||||
* `suppressWarnings` - if set, warnings are not rendered at the top of documentation (they still are logged to the console).
|
|
||||||
* `payloadSampleIdx` - if set, payload sample will be inserted at this index or last. Indexes start from 0.
|
* `payloadSampleIdx` - if set, payload sample will be inserted at this index or last. Indexes start from 0.
|
||||||
* `theme` - ReDoc theme. Not documented yet. For details check source code: [theme.ts](https://github.com/Redocly/redoc/blob/master/src/theme.ts).
|
* `theme` - ReDoc theme. For details check [theme docs](#redoc-theme-object).
|
||||||
* `untrustedSpec` - if set, the spec is considered untrusted and all HTML/markdown is sanitized to prevent XSS. **Disabled by default** for performance reasons. **Enable this option if you work with untrusted user data!**
|
* `untrustedSpec` - if set, the spec is considered untrusted and all HTML/markdown is sanitized to prevent XSS. **Disabled by default** for performance reasons. **Enable this option if you work with untrusted user data!**
|
||||||
|
|
||||||
|
### `<redoc>` theme object
|
||||||
|
* `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)
|
||||||
|
* `menu`
|
||||||
|
* `width`: '260px'
|
||||||
|
* `backgroundColor`: '#fafafa'
|
||||||
|
* `textColor`: '#333333'
|
||||||
|
* `activeTextColor`: # COMPUTED: theme.menu.textColor (if set by user) or theme.colors.primary.main
|
||||||
|
* `groupItems` # Group headings
|
||||||
|
* `textTransform`: 'uppercase'
|
||||||
|
* `level1Items` # Level 1 items like tags or section 1st level items
|
||||||
|
* `textTransform`: 'none'
|
||||||
|
* `arrow` # menu arrow
|
||||||
|
* `size`: '1.5em'
|
||||||
|
* `color`: # COMPUTED: theme.menu.textColor
|
||||||
|
* `logo`
|
||||||
|
* `maxHeight`: # COMPUTED: menu.width
|
||||||
|
* `maxWidth`: # COMPUTED: menu.width
|
||||||
|
* `gutter`: '2px' # logo image padding
|
||||||
|
* `rightPanel`
|
||||||
|
* `backgroundColor`: '#263238'
|
||||||
|
* `width`: '40%'
|
||||||
|
* `textColor`: '#ffffff'
|
||||||
|
|
||||||
## Advanced usage of standalone version
|
## Advanced usage of standalone version
|
||||||
Instead of adding `spec-url` attribute to the `<redoc>` element you can initialize ReDoc via globally exposed `Redoc` object:
|
Instead of adding `spec-url` attribute to the `<redoc>` element you can initialize ReDoc via globally exposed `Redoc` object:
|
||||||
```js
|
```js
|
||||||
|
@ -262,7 +323,7 @@ Redoc.init(specOrSpecUrl, options, element, callback?)
|
||||||
- `specOrSpecUrl` is either JSON object with specification or an URL to the spec in `JSON` or `YAML` format
|
- `specOrSpecUrl` is either JSON object with specification or an URL to the spec in `JSON` or `YAML` format
|
||||||
- `options` [options object](#redoc-options-object)
|
- `options` [options object](#redoc-options-object)
|
||||||
- `element` DOM element to put ReDoc into
|
- `element` DOM element to put ReDoc into
|
||||||
- `callback` (optional) - callback to be called after Redoc has been fully rendered. It is also called also on errors with error as the first argument
|
- `callback` (optional) - callback to be called after Redoc has been fully rendered. It is also called on errors with error as the first argument
|
||||||
|
|
||||||
```js
|
```js
|
||||||
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
|
Redoc.init('http://petstore.swagger.io/v2/swagger.json', {
|
||||||
|
|
16
cli/index.ts
16
cli/index.ts
|
@ -72,6 +72,12 @@ YargsParser.command(
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
yargs.options('disable-google-font', {
|
||||||
|
describe: 'Disable Google Font',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
});
|
||||||
|
|
||||||
yargs.demandOption('spec');
|
yargs.demandOption('spec');
|
||||||
return yargs;
|
return yargs;
|
||||||
},
|
},
|
||||||
|
@ -80,6 +86,7 @@ YargsParser.command(
|
||||||
ssr: argv.ssr as boolean,
|
ssr: argv.ssr as boolean,
|
||||||
title: argv.title as string,
|
title: argv.title as string,
|
||||||
watch: argv.watch as boolean,
|
watch: argv.watch as boolean,
|
||||||
|
disableGoogleFont: argv.disableGoogleFont as boolean,
|
||||||
templateFileName: argv.template as string,
|
templateFileName: argv.template as string,
|
||||||
templateOptions: argv.templateOptions || {},
|
templateOptions: argv.templateOptions || {},
|
||||||
redocOptions: getObjectOrJSON(argv.options),
|
redocOptions: getObjectOrJSON(argv.options),
|
||||||
|
@ -163,9 +170,8 @@ YargsParser.command(
|
||||||
}).argv;
|
}).argv;
|
||||||
|
|
||||||
async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
||||||
let spec = await loadAndBundleSpec(pathToSpec);
|
let spec = await loadAndBundleSpec(isURL(pathToSpec) ? pathToSpec : resolve(pathToSpec));
|
||||||
let pageHTML = await getPageHTML(spec, pathToSpec, options);
|
let pageHTML = await getPageHTML(spec, pathToSpec, options);
|
||||||
|
|
||||||
const server = createServer((request, response) => {
|
const server = createServer((request, response) => {
|
||||||
console.time('GET ' + request.url);
|
console.time('GET ' + request.url);
|
||||||
if (request.url === '/redoc.standalone.js') {
|
if (request.url === '/redoc.standalone.js') {
|
||||||
|
@ -211,7 +217,7 @@ async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
||||||
|
|
||||||
const handlePath = async _path => {
|
const handlePath = async _path => {
|
||||||
try {
|
try {
|
||||||
spec = await loadAndBundleSpec(pathToSpec);
|
spec = await loadAndBundleSpec(resolve(pathToSpec));
|
||||||
pageHTML = await getPageHTML(spec, pathToSpec, options);
|
pageHTML = await getPageHTML(spec, pathToSpec, options);
|
||||||
log('Updated successfully');
|
log('Updated successfully');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -238,7 +244,7 @@ async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
||||||
|
|
||||||
async function bundle(pathToSpec, options: Options = {}) {
|
async function bundle(pathToSpec, options: Options = {}) {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
const spec = await loadAndBundleSpec(pathToSpec);
|
const spec = await loadAndBundleSpec(isURL(pathToSpec) ? pathToSpec : resolve(pathToSpec));
|
||||||
const pageHTML = await getPageHTML(spec, pathToSpec, { ...options, ssr: true });
|
const pageHTML = await getPageHTML(spec, pathToSpec, { ...options, ssr: true });
|
||||||
|
|
||||||
mkdirp.sync(dirname(options.output!));
|
mkdirp.sync(dirname(options.output!));
|
||||||
|
@ -293,7 +299,7 @@ async function getPageHTML(
|
||||||
var container = document.getElementById('redoc');
|
var container = document.getElementById('redoc');
|
||||||
Redoc.${
|
Redoc.${
|
||||||
ssr
|
ssr
|
||||||
? 'hydrate(__redoc_state, container);'
|
? 'hydrate(__redoc_state, container)'
|
||||||
: `init("spec.json", ${JSON.stringify(redocOptions)}, container)`
|
: `init("spec.json", ${JSON.stringify(redocOptions)}, container)`
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
409
cli/package-lock.json → cli/npm-shrinkwrap.json
generated
409
cli/package-lock.json → cli/npm-shrinkwrap.json
generated
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "redoc-cli",
|
"name": "redoc-cli",
|
||||||
"version": "0.9.12",
|
"version": "0.11.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": {
|
"@babel/code-frame": {
|
||||||
"version": "7.10.4",
|
"version": "7.12.13",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
|
||||||
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
|
"integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/highlight": "^7.10.4"
|
"@babel/highlight": "^7.12.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/generator": {
|
"@babel/generator": {
|
||||||
|
@ -77,13 +77,20 @@
|
||||||
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
|
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
|
||||||
},
|
},
|
||||||
"@babel/highlight": {
|
"@babel/highlight": {
|
||||||
"version": "7.10.4",
|
"version": "7.13.10",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz",
|
||||||
"integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
|
"integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/helper-validator-identifier": "^7.10.4",
|
"@babel/helper-validator-identifier": "^7.12.11",
|
||||||
"chalk": "^2.0.0",
|
"chalk": "^2.0.0",
|
||||||
"js-tokens": "^4.0.0"
|
"js-tokens": "^4.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/helper-validator-identifier": {
|
||||||
|
"version": "7.12.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
|
||||||
|
"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@babel/parser": {
|
"@babel/parser": {
|
||||||
|
@ -92,9 +99,9 @@
|
||||||
"integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ=="
|
"integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ=="
|
||||||
},
|
},
|
||||||
"@babel/runtime": {
|
"@babel/runtime": {
|
||||||
"version": "7.11.2",
|
"version": "7.13.10",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
|
||||||
"integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
|
"integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"regenerator-runtime": "^0.13.4"
|
"regenerator-runtime": "^0.13.4"
|
||||||
}
|
}
|
||||||
|
@ -198,6 +205,45 @@
|
||||||
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
|
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
|
||||||
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
|
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
|
||||||
},
|
},
|
||||||
|
"@exodus/schemasafe": {
|
||||||
|
"version": "1.0.0-rc.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.0.0-rc.3.tgz",
|
||||||
|
"integrity": "sha512-GoXw0U2Qaa33m3eUcxuHnHpNvHjNlLo0gtV091XBpaRINaB4X6FGCG5XKxSFNFiPpugUDqNruHzaqpTdDm4AOg=="
|
||||||
|
},
|
||||||
|
"@redocly/ajv": {
|
||||||
|
"version": "6.12.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-6.12.4.tgz",
|
||||||
|
"integrity": "sha512-RB6vWO78v6c+SW/3bZh+XZMr4nGdJKAiPGsBALuUZnLuCiQ7aXCT1AuFHqnfS2gyXbEUEj+kw8p4ux8KdAfs3A==",
|
||||||
|
"requires": {
|
||||||
|
"fast-deep-equal": "^3.1.1",
|
||||||
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"json-schema-traverse": "^0.4.1",
|
||||||
|
"uri-js": "^4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@redocly/openapi-core": {
|
||||||
|
"version": "1.0.0-beta.44",
|
||||||
|
"resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.44.tgz",
|
||||||
|
"integrity": "sha512-9HNnh1MzvMsLK1liuidFBqWiAsZ2Yg3RY58fcEsy0QruSMdDbn7SoeI1qnXe6O+BkBS+vAP4oVzZDMHCMKGsOQ==",
|
||||||
|
"requires": {
|
||||||
|
"@redocly/ajv": "^6.12.3",
|
||||||
|
"@types/node": "^14.11.8",
|
||||||
|
"colorette": "^1.2.0",
|
||||||
|
"js-levenshtein": "^1.1.6",
|
||||||
|
"js-yaml": "^3.14.0",
|
||||||
|
"lodash.isequal": "^4.5.0",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"node-fetch": "^2.6.1",
|
||||||
|
"yaml-ast-parser": "0.0.43"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "14.14.37",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz",
|
||||||
|
"integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@redocly/react-dropdown-aria": {
|
"@redocly/react-dropdown-aria": {
|
||||||
"version": "2.0.11",
|
"version": "2.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/@redocly/react-dropdown-aria/-/react-dropdown-aria-2.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/@redocly/react-dropdown-aria/-/react-dropdown-aria-2.0.11.tgz",
|
||||||
|
@ -250,6 +296,18 @@
|
||||||
"fast-deep-equal": "^1.0.0",
|
"fast-deep-equal": "^1.0.0",
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
"json-schema-traverse": "^0.3.0"
|
"json-schema-traverse": "^0.3.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fast-deep-equal": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
||||||
|
},
|
||||||
|
"json-schema-traverse": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
||||||
|
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
|
@ -327,6 +385,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
|
||||||
"integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY="
|
"integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY="
|
||||||
},
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||||
|
},
|
||||||
"base64-js": {
|
"base64-js": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
||||||
|
@ -356,6 +419,15 @@
|
||||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
|
||||||
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
|
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
|
||||||
},
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"braces": {
|
"braces": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
@ -511,14 +583,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"classnames": {
|
"classnames": {
|
||||||
"version": "2.2.6",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
|
||||||
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
|
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
|
||||||
},
|
},
|
||||||
"clipboard": {
|
"clipboard": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz",
|
||||||
"integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==",
|
"integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"good-listener": "^1.2.2",
|
"good-listener": "^1.2.2",
|
||||||
|
@ -564,6 +636,16 @@
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||||
},
|
},
|
||||||
|
"colorette": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w=="
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
},
|
||||||
"console-browserify": {
|
"console-browserify": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
|
||||||
|
@ -575,9 +657,9 @@
|
||||||
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U="
|
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U="
|
||||||
},
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "3.6.5",
|
"version": "3.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.10.1.tgz",
|
||||||
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
|
"integrity": "sha512-pwCxEXnj27XG47mu7SXAwhLP3L5CrlvCB91ANUkIz40P27kUcvNfSdvyZJ9CLHiVoKSp+TTChMQMSKQEH/IQxA=="
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
@ -700,14 +782,14 @@
|
||||||
"integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA=="
|
"integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA=="
|
||||||
},
|
},
|
||||||
"dompurify": {
|
"dompurify": {
|
||||||
"version": "2.0.12",
|
"version": "2.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz",
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz",
|
||||||
"integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg=="
|
"integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg=="
|
||||||
},
|
},
|
||||||
"elliptic": {
|
"elliptic": {
|
||||||
"version": "6.5.2",
|
"version": "6.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
|
||||||
"integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==",
|
"integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bn.js": "^4.4.0",
|
"bn.js": "^4.4.0",
|
||||||
"brorand": "^1.0.1",
|
"brorand": "^1.0.1",
|
||||||
|
@ -723,6 +805,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
|
||||||
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM="
|
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM="
|
||||||
},
|
},
|
||||||
|
"escalade": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
|
||||||
|
},
|
||||||
"escape-string-regexp": {
|
"escape-string-regexp": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
|
@ -734,9 +821,9 @@
|
||||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
},
|
},
|
||||||
"eventemitter3": {
|
"eventemitter3": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||||
"integrity": "sha512-QR0rh0YiPuxuDQ6+T9GAO/xWTExXpxIes1Nl9RykNGTnE1HJmkuEfxJH9cubjIOQZ/GH4qNBR4u8VSHaKiWs4g=="
|
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
||||||
},
|
},
|
||||||
"events": {
|
"events": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
|
@ -753,9 +840,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "1.1.0",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||||
},
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
|
@ -780,11 +867,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||||
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
||||||
},
|
},
|
||||||
"format-util": {
|
|
||||||
"version": "1.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz",
|
|
||||||
"integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg=="
|
|
||||||
},
|
|
||||||
"fsevents": {
|
"fsevents": {
|
||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||||
|
@ -934,15 +1016,20 @@
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
||||||
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
|
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
|
||||||
},
|
},
|
||||||
|
"js-levenshtein": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz",
|
||||||
|
"integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g=="
|
||||||
|
},
|
||||||
"js-tokens": {
|
"js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||||
},
|
},
|
||||||
"js-yaml": {
|
"js-yaml": {
|
||||||
"version": "3.14.0",
|
"version": "3.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"argparse": "^1.0.7",
|
"argparse": "^1.0.7",
|
||||||
"esprima": "^4.0.0"
|
"esprima": "^4.0.0"
|
||||||
|
@ -954,27 +1041,17 @@
|
||||||
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
|
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
|
||||||
},
|
},
|
||||||
"json-pointer": {
|
"json-pointer": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.1.tgz",
|
||||||
"integrity": "sha1-jlAFUKaqxUZKRzN32leqbMIoKNc=",
|
"integrity": "sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"foreach": "^2.0.4"
|
"foreach": "^2.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"json-schema-ref-parser": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-pXe9H1m6IgIpXmE5JSb8epilNTGsmTb2iPohAXpOdhqGFbQjNeHHsZxU+C8w6T81GZxSPFLeUoqDJmzxx5IGuw==",
|
|
||||||
"requires": {
|
|
||||||
"call-me-maybe": "^1.0.1",
|
|
||||||
"js-yaml": "^3.12.1",
|
|
||||||
"ono": "^4.0.11"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"json-schema-traverse": {
|
"json-schema-traverse": {
|
||||||
"version": "0.3.1",
|
"version": "0.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||||
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
|
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
|
||||||
},
|
},
|
||||||
"json-to-ast": {
|
"json-to-ast": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
|
@ -1000,6 +1077,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||||
},
|
},
|
||||||
|
"lodash.isequal": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
|
||||||
|
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
|
||||||
|
},
|
||||||
"loose-envify": {
|
"loose-envify": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||||
|
@ -1057,6 +1139,14 @@
|
||||||
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
||||||
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
||||||
},
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||||
|
@ -1068,22 +1158,22 @@
|
||||||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
||||||
},
|
},
|
||||||
"mobx": {
|
"mobx": {
|
||||||
"version": "4.13.0",
|
"version": "6.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/mobx/-/mobx-4.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/mobx/-/mobx-6.0.4.tgz",
|
||||||
"integrity": "sha512-+hJTBIBRz4sWKpBTj2t2YbjJVlFJIGYiVoHnNUl03krsiFzXGNtqLjFvTPE1+fnN6Mq6LGfvgRKiGsBtZvZBwg=="
|
"integrity": "sha512-wT2QJT9tW19VSHo9x7RPKU3z/I2Ps6wUS8Kb1OO+kzmg7UY3n4AkcaYG6jq95Lp1R9ohjC/NGYuT2PtuvBjhFg=="
|
||||||
},
|
},
|
||||||
"mobx-react": {
|
"mobx-react": {
|
||||||
"version": "6.2.5",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-6.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-7.1.0.tgz",
|
||||||
"integrity": "sha512-LxtXXW0GkOAO6VOIg2m/6WL6ZuKlzOWwESIFdrWelI0ZMIvtKCMZVUuulcO5GAWSDsH0ApaMkGLoaPqKjzyziQ==",
|
"integrity": "sha512-DxvA6VXmnZ+N9f/UTtolWtdRnAAQY2iHWTSPLktfpj8NKlXUe4dabBAjuXrBcZUM8GjLWnxD1ZEjssXq1M0RAw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"mobx-react-lite": ">=2.0.6"
|
"mobx-react-lite": "^3.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mobx-react-lite": {
|
"mobx-react-lite": {
|
||||||
"version": "2.0.7",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-2.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-3.2.0.tgz",
|
||||||
"integrity": "sha512-YKAh2gThC6WooPnVZCoC+rV1bODAKFwkhxikzgH18wpBjkgTkkR9Sb0IesQAH5QrAEH/JQVmy47jcpQkf2Au3Q=="
|
"integrity": "sha512-q5+UHIqYCOpBoFm/PElDuOhbcatvTllgRp3M1s+Hp5j0Z6XNgDbgqxawJ0ZAUEyKM8X1zs70PCuhAIzX1f4Q/g=="
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
|
@ -1095,6 +1185,11 @@
|
||||||
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
|
||||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
|
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
|
||||||
},
|
},
|
||||||
|
"node-fetch": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||||
|
},
|
||||||
"node-fetch-h2": {
|
"node-fetch-h2": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz",
|
||||||
|
@ -1155,24 +1250,92 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oas-linter": {
|
"oas-linter": {
|
||||||
"version": "3.1.3",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.1.tgz",
|
||||||
"integrity": "sha512-jFWBHjSoqODGo7cKA/VWqqWSLbHNtnyCEpa2nMMS64SzCUbZDk63Oe7LqQZ2qJA0K2VRreYLt6cVkYy6MqNRDg==",
|
"integrity": "sha512-e5G6bbq3Nrfxm+SDPR5AiZ6n2smVUmhLA1OgI2/Bl8e2ywfWsKw/yuqrwiXXiNHb1wdM/GyPMX6QjCGJODlaaA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@exodus/schemasafe": "^1.0.0-rc.2",
|
||||||
"should": "^13.2.1",
|
"should": "^13.2.1",
|
||||||
"yaml": "^1.8.3"
|
"yaml": "^1.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oas-resolver": {
|
"oas-resolver": {
|
||||||
"version": "2.4.3",
|
"version": "2.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.4.tgz",
|
||||||
"integrity": "sha512-+66lGk5GewIXoIkqxfeWp89M/SgQT67oITiuG6qNIUuq1gczIIy68ZrMiE+gyDZY2IAdVxY9k73o9nHBnKwHPA==",
|
"integrity": "sha512-1vIj5Wkjmi+kZj5sFamt95LkuXoalmoKUohtaUQoCQZjLfPFaY8uZ7nw6IZaWuE6eLON2b6xrXhxD4hiTdYl0g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"node-fetch-h2": "^2.3.0",
|
"node-fetch-h2": "^2.3.0",
|
||||||
"oas-kit-common": "^1.0.8",
|
"oas-kit-common": "^1.0.8",
|
||||||
"reftools": "^1.1.5",
|
"reftools": "^1.1.8",
|
||||||
"yaml": "^1.8.3",
|
"yaml": "^1.10.0",
|
||||||
"yargs": "^15.3.1"
|
"yargs": "^16.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cliui": {
|
||||||
|
"version": "7.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
|
||||||
|
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
|
||||||
|
"requires": {
|
||||||
|
"string-width": "^4.2.0",
|
||||||
|
"strip-ansi": "^6.0.0",
|
||||||
|
"wrap-ansi": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||||
|
},
|
||||||
|
"wrap-ansi": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.0.0",
|
||||||
|
"string-width": "^4.1.0",
|
||||||
|
"strip-ansi": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y18n": {
|
||||||
|
"version": "5.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||||
|
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
|
||||||
|
},
|
||||||
|
"yargs": {
|
||||||
|
"version": "16.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
||||||
|
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
|
||||||
|
"requires": {
|
||||||
|
"cliui": "^7.0.2",
|
||||||
|
"escalade": "^3.1.1",
|
||||||
|
"get-caller-file": "^2.0.5",
|
||||||
|
"require-directory": "^2.1.1",
|
||||||
|
"string-width": "^4.2.0",
|
||||||
|
"y18n": "^5.0.5",
|
||||||
|
"yargs-parser": "^20.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"yargs-parser": {
|
||||||
|
"version": "20.2.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
|
||||||
|
"integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oas-schema-walker": {
|
"oas-schema-walker": {
|
||||||
|
@ -1202,18 +1365,10 @@
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
},
|
},
|
||||||
"ono": {
|
|
||||||
"version": "4.0.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/ono/-/ono-4.0.11.tgz",
|
|
||||||
"integrity": "sha512-jQ31cORBFE6td25deYeD80wxKBMj+zBmHTrVxnc6CKhx8gho6ipmWM5zj/oeoqioZ99yqBls9Z/9Nss7J26G2g==",
|
|
||||||
"requires": {
|
|
||||||
"format-util": "^1.0.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openapi-sampler": {
|
"openapi-sampler": {
|
||||||
"version": "1.0.0-beta.16",
|
"version": "1.0.0-beta.18",
|
||||||
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.16.tgz",
|
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.18.tgz",
|
||||||
"integrity": "sha512-05+GvwMagTY7GxoDQoWJfmAUFlxfebciiEzqKmu4iq6+MqBEn62AMUkn0CTxyKhnUGIaR2KXjTeslxIeJwVIOw==",
|
"integrity": "sha512-nG/0kvvSY5FbrU5A+Dbp1xTQN++7pKIh87/atryZlxrzDuok5Y6TCbpxO1jYqpUKLycE4ReKGHCywezngG6xtQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-pointer": "^0.6.0"
|
"json-pointer": "^0.6.0"
|
||||||
}
|
}
|
||||||
|
@ -1282,11 +1437,11 @@
|
||||||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||||
},
|
},
|
||||||
"polished": {
|
"polished": {
|
||||||
"version": "3.6.5",
|
"version": "3.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/polished/-/polished-3.6.5.tgz",
|
"resolved": "https://registry.npmjs.org/polished/-/polished-3.7.1.tgz",
|
||||||
"integrity": "sha512-VwhC9MlhW7O5dg/z7k32dabcAFW1VI2+7fSe8cE/kXcfL7mVdoa5UxciYGW2sJU78ldDLT6+ROEKIZKFNTnUXQ==",
|
"integrity": "sha512-/QgHrNGYwIA4mwxJ/7FSvalUJsm7KNfnXiScVSEG2Xa5qxDeBn4nmdjN2pW00mkM2Tts64ktc47U8F7Ed1BRAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@babel/runtime": "^7.9.2"
|
"@babel/runtime": "^7.12.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postcss-value-parser": {
|
"postcss-value-parser": {
|
||||||
|
@ -1295,9 +1450,9 @@
|
||||||
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
|
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
|
||||||
},
|
},
|
||||||
"prismjs": {
|
"prismjs": {
|
||||||
"version": "1.21.0",
|
"version": "1.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz",
|
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz",
|
||||||
"integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==",
|
"integrity": "sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"clipboard": "^2.0.0"
|
"clipboard": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -1394,9 +1549,9 @@
|
||||||
"integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA=="
|
"integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA=="
|
||||||
},
|
},
|
||||||
"react-tabs": {
|
"react-tabs": {
|
||||||
"version": "3.1.1",
|
"version": "3.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.2.tgz",
|
||||||
"integrity": "sha512-HpySC29NN1BkzBAnOC+ajfzPbTaVZcSWzMSjk56uAhPC/rBGtli8lTysR4CfPAyEE/hfweIzagOIoJ7nu80yng==",
|
"integrity": "sha512-/o52eGKxFHRa+ssuTEgSM8qORnV4+k7ibW+aNQzKe+5gifeVz8nLxCrsI9xdRhfb0wCLdgIambIpb1qCxaMN+A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"clsx": "^1.1.0",
|
"clsx": "^1.1.0",
|
||||||
"prop-types": "^15.5.0"
|
"prop-types": "^15.5.0"
|
||||||
|
@ -1450,10 +1605,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redoc": {
|
"redoc": {
|
||||||
"version": "2.0.0-rc.40",
|
"version": "2.0.0-rc.53",
|
||||||
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.40.tgz",
|
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.53.tgz",
|
||||||
"integrity": "sha512-f1na5vWCr37R5+G4xhbD1TjH6j6b/he8nEMGGJOwDcIMMcDK88S0YEWuhplhdVuZdc4c61CoxZqGXqcDRp5m0w==",
|
"integrity": "sha512-nyHIEIVo+kxsMfAy7nkYSlU7qjXZAARcj0INaRwCoy/DG9BMMi3xLcpo0CmarL9XeI891+VN2tpyTJ8jhZUtPw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@redocly/openapi-core": "^1.0.0-beta.44",
|
||||||
"@redocly/react-dropdown-aria": "^2.0.11",
|
"@redocly/react-dropdown-aria": "^2.0.11",
|
||||||
"@types/node": "^13.11.1",
|
"@types/node": "^13.11.1",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
|
@ -1461,16 +1617,15 @@
|
||||||
"dompurify": "^2.0.12",
|
"dompurify": "^2.0.12",
|
||||||
"eventemitter3": "^4.0.4",
|
"eventemitter3": "^4.0.4",
|
||||||
"json-pointer": "^0.6.0",
|
"json-pointer": "^0.6.0",
|
||||||
"json-schema-ref-parser": "^6.1.0",
|
|
||||||
"lunr": "2.3.8",
|
"lunr": "2.3.8",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"marked": "^0.7.0",
|
"marked": "^0.7.0",
|
||||||
"memoize-one": "~5.1.1",
|
"memoize-one": "~5.1.1",
|
||||||
"mobx-react": "^6.2.2",
|
"mobx-react": "^7.0.5",
|
||||||
"openapi-sampler": "^1.0.0-beta.16",
|
"openapi-sampler": "^1.0.0-beta.18",
|
||||||
"perfect-scrollbar": "^1.4.0",
|
"perfect-scrollbar": "^1.4.0",
|
||||||
"polished": "^3.6.5",
|
"polished": "^3.6.5",
|
||||||
"prismjs": "^1.20.0",
|
"prismjs": "^1.22.0",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react-tabs": "^3.1.1",
|
"react-tabs": "^3.1.1",
|
||||||
"slugify": "^1.4.4",
|
"slugify": "^1.4.4",
|
||||||
|
@ -1481,16 +1636,16 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "13.13.15",
|
"version": "13.13.48",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.48.tgz",
|
||||||
"integrity": "sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw=="
|
"integrity": "sha512-z8wvSsgWQzkr4sVuMEEOvwMdOQjiRY2Y/ZW4fDfjfe3+TfQrZqFKOthBgk2RnVEmtOKrkwdZ7uTvsxTBLjKGDQ=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reftools": {
|
"reftools": {
|
||||||
"version": "1.1.5",
|
"version": "1.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.8.tgz",
|
||||||
"integrity": "sha512-o7RX5wMzITYj+8P8oaccFH2xYu5nQ63TH0d73Ce5YgpiY9NyFytaQfeg1p1Z5T4yfjKSj0sYuUscBqZgkLsooQ=="
|
"integrity": "sha512-Yvz9NH8uFHzD/AXX82Li1GdAP6FzDBxEZw+njerNBBQv/XHihqsWAjNfXtaq4QD2l4TEZVnp4UbktdYSegAM3g=="
|
||||||
},
|
},
|
||||||
"regenerator-runtime": {
|
"regenerator-runtime": {
|
||||||
"version": "0.13.7",
|
"version": "0.13.7",
|
||||||
|
@ -1609,9 +1764,9 @@
|
||||||
"integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g=="
|
"integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g=="
|
||||||
},
|
},
|
||||||
"slugify": {
|
"slugify": {
|
||||||
"version": "1.4.5",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.5.0.tgz",
|
||||||
"integrity": "sha512-WpECLAgYaxHoEAJ8Q1Lo8HOs1ngn7LN7QjXgOLbmmfkcWvosyk4ZTXkTzKyhngK640USTZUlgoQJfED1kz5fnQ=="
|
"integrity": "sha512-Q2UPZ2udzquy1ElHfOLILMBMqBEXkiD3wE75qtBvV+FsDdZZjUqPZ44vqLTejAVq+wLLHacOMcENnP8+ZbzmIA=="
|
||||||
},
|
},
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
|
@ -1778,6 +1933,21 @@
|
||||||
"integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
|
"integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
"uri-js": {
|
||||||
|
"version": "4.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
|
||||||
|
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
|
||||||
|
"requires": {
|
||||||
|
"punycode": "^2.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"punycode": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
|
||||||
|
@ -1879,9 +2049,14 @@
|
||||||
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
||||||
},
|
},
|
||||||
"yaml": {
|
"yaml": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.2",
|
||||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||||
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg=="
|
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
|
||||||
|
},
|
||||||
|
"yaml-ast-parser": {
|
||||||
|
"version": "0.0.43",
|
||||||
|
"resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz",
|
||||||
|
"integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A=="
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "15.4.1",
|
"version": "15.4.1",
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "redoc-cli",
|
"name": "redoc-cli",
|
||||||
"version": "0.9.12",
|
"version": "0.11.4",
|
||||||
"description": "ReDoc's Command Line Interface",
|
"description": "ReDoc's Command Line Interface",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": "index.js",
|
"bin": "index.js",
|
||||||
|
@ -8,18 +8,18 @@
|
||||||
"author": "Roman Hotsiy <gotsijroman@gmail.com>",
|
"author": "Roman Hotsiy <gotsijroman@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8"
|
"node": ">=12.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": "^3.4.1",
|
"chokidar": "^3.4.1",
|
||||||
"handlebars": "^4.7.6",
|
"handlebars": "^4.7.6",
|
||||||
"isarray": "^2.0.5",
|
"isarray": "^2.0.5",
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
"mobx": "^4.2.0",
|
"mobx": "^6.0.4",
|
||||||
"node-libs-browser": "^2.2.1",
|
"node-libs-browser": "^2.2.1",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^16.13.1",
|
"react-dom": "^16.13.1",
|
||||||
"redoc": "^2.0.0-rc.40",
|
"redoc": "2.0.0-rc.53",
|
||||||
"styled-components": "^5.1.1",
|
"styled-components": "^5.1.1",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"yargs": "^15.4.1"
|
"yargs": "^15.4.1"
|
||||||
|
|
|
@ -211,6 +211,7 @@ export default class ComboBox extends React.Component<ComboBoxProps, ComboBoxSta
|
||||||
onFocus={this.open}
|
onFocus={this.open}
|
||||||
onBlur={this.handleBlur}
|
onBlur={this.handleBlur}
|
||||||
onKeyDown={this.handleKeyPress}
|
onKeyDown={this.handleKeyPress}
|
||||||
|
aria-label="URL to an OpenAPI definition to try"
|
||||||
/>
|
/>
|
||||||
<Button onClick={this.handleTryItClick}> TRY IT </Button>
|
<Button onClick={this.handleTryItClick}> TRY IT </Button>
|
||||||
{open && <DropDownList>{options.map(this.renderOption)}</DropDownList>}
|
{open && <DropDownList>{options.map(this.renderOption)}</DropDownList>}
|
||||||
|
|
|
@ -79,7 +79,10 @@ class DemoApp extends React.Component<
|
||||||
<>
|
<>
|
||||||
<Heading>
|
<Heading>
|
||||||
<a href=".">
|
<a href=".">
|
||||||
<Logo src="https://github.com/Redocly/redoc/raw/master/docs/images/redoc-logo.png" />
|
<Logo
|
||||||
|
src="https://github.com/Redocly/redoc/raw/master/docs/images/redoc-logo.png"
|
||||||
|
alt="Redoc logo"
|
||||||
|
/>
|
||||||
</a>
|
</a>
|
||||||
<ControlsContainer>
|
<ControlsContainer>
|
||||||
<ComboBox
|
<ComboBox
|
||||||
|
|
|
@ -76,8 +76,8 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
|
||||||
alias:
|
alias:
|
||||||
mode !== 'production'
|
mode !== 'production'
|
||||||
? {
|
? {
|
||||||
'react-dom': '@hot-loader/react-dom',
|
'react-dom': '@hot-loader/react-dom',
|
||||||
}
|
}
|
||||||
: {},
|
: {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
9187
package-lock.json
generated
9187
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "redoc",
|
"name": "redoc",
|
||||||
"version": "2.0.0-rc.44",
|
"version": "2.0.0-rc.53",
|
||||||
"description": "ReDoc",
|
"description": "ReDoc",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -91,7 +91,6 @@
|
||||||
"coveralls": "^3.1.0",
|
"coveralls": "^3.1.0",
|
||||||
"css-loader": "^3.6.0",
|
"css-loader": "^3.6.0",
|
||||||
"cypress": "^4.11.0",
|
"cypress": "^4.11.0",
|
||||||
"deploy-to-gh-pages": "^1.3.7",
|
|
||||||
"enzyme": "^3.11.0",
|
"enzyme": "^3.11.0",
|
||||||
"enzyme-adapter-react-16": "^1.15.2",
|
"enzyme-adapter-react-16": "^1.15.2",
|
||||||
"enzyme-to-json": "^3.5.0",
|
"enzyme-to-json": "^3.5.0",
|
||||||
|
@ -103,7 +102,7 @@
|
||||||
"jest": "^26.1.0",
|
"jest": "^26.1.0",
|
||||||
"license-checker": "^25.0.1",
|
"license-checker": "^25.0.1",
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"mobx": "^6.0.1",
|
"mobx": "^6.0.4",
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"raf": "^3.4.1",
|
"raf": "^3.4.1",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
|
@ -129,12 +128,13 @@
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"core-js": "^3.1.4",
|
"core-js": "^3.1.4",
|
||||||
"mobx": "^6.0.1",
|
"mobx": "^6.0.4",
|
||||||
"react": "^16.8.4",
|
"react": "^16.8.4",
|
||||||
"react-dom": "^16.8.4",
|
"react-dom": "^16.8.4",
|
||||||
"styled-components": "^4.1.1 || ^5.1.1"
|
"styled-components": "^4.1.1 || ^5.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@redocly/openapi-core": "^1.0.0-beta.44",
|
||||||
"@redocly/react-dropdown-aria": "^2.0.11",
|
"@redocly/react-dropdown-aria": "^2.0.11",
|
||||||
"@types/node": "^13.11.1",
|
"@types/node": "^13.11.1",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
|
@ -142,16 +142,15 @@
|
||||||
"dompurify": "^2.0.12",
|
"dompurify": "^2.0.12",
|
||||||
"eventemitter3": "^4.0.4",
|
"eventemitter3": "^4.0.4",
|
||||||
"json-pointer": "^0.6.0",
|
"json-pointer": "^0.6.0",
|
||||||
"json-schema-ref-parser": "^6.1.0",
|
|
||||||
"lunr": "2.3.8",
|
"lunr": "2.3.8",
|
||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"marked": "^0.7.0",
|
"marked": "^0.7.0",
|
||||||
"memoize-one": "~5.1.1",
|
"memoize-one": "~5.1.1",
|
||||||
"mobx-react": "^6.2.2",
|
"mobx-react": "^7.0.5",
|
||||||
"openapi-sampler": "^1.0.0-beta.16",
|
"openapi-sampler": "^1.0.0-beta.18",
|
||||||
"perfect-scrollbar": "^1.4.0",
|
"perfect-scrollbar": "^1.4.0",
|
||||||
"polished": "^3.6.5",
|
"polished": "^3.6.5",
|
||||||
"prismjs": "^1.20.0",
|
"prismjs": "^1.22.0",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react-tabs": "^3.1.1",
|
"react-tabs": "^3.1.1",
|
||||||
"slugify": "^1.4.4",
|
"slugify": "^1.4.4",
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const PrismDiv = styled.div`
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.boolean {
|
.token.boolean {
|
||||||
color: firebrick;
|
color: #e64441;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.selector,
|
.token.selector,
|
||||||
|
|
|
@ -34,7 +34,7 @@ export const FieldLabel = styled.span`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const TypePrefix = styled(FieldLabel)`
|
export const TypePrefix = styled(FieldLabel)`
|
||||||
color: ${props => transparentize(0.2, props.theme.schema.typeNameColor)};
|
color: ${props => transparentize(0.1, props.theme.schema.typeNameColor)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const TypeName = styled(FieldLabel)`
|
export const TypeName = styled(FieldLabel)`
|
||||||
|
@ -62,12 +62,12 @@ export const RecursiveLabel = styled(FieldLabel)`
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const NullableLabel = styled(FieldLabel)`
|
export const NullableLabel = styled(FieldLabel)`
|
||||||
color: #3195a6;
|
color: #0e7c86;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const PatternLabel = styled(FieldLabel)`
|
export const PatternLabel = styled(FieldLabel)`
|
||||||
color: #3195a6;
|
color: #0e7c86;
|
||||||
&::before,
|
&::before,
|
||||||
&::after {
|
&::after {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -56,6 +56,7 @@ export class Link extends React.Component<{ to: string; className?: string; chil
|
||||||
className={this.props.className}
|
className={this.props.className}
|
||||||
href={store!.menu.history.linkForId(this.props.to)}
|
href={store!.menu.history.linkForId(this.props.to)}
|
||||||
onClick={this.navigate.bind(this, store!.menu.history)}
|
onClick={this.navigate.bind(this, store!.menu.history)}
|
||||||
|
aria-label={this.props.to}
|
||||||
>
|
>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -2,5 +2,5 @@ import { css } from '../styled-components';
|
||||||
|
|
||||||
export const deprecatedCss = css`
|
export const deprecatedCss = css`
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
color: #bdccd3;
|
color: #707070;
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import styled from '../styled-components';
|
||||||
import { PrismDiv } from './PrismDiv';
|
import { PrismDiv } from './PrismDiv';
|
||||||
|
|
||||||
export const SampleControls = styled.div`
|
export const SampleControls = styled.div`
|
||||||
opacity: 0.4;
|
opacity: 0.7;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
|
|
|
@ -43,9 +43,8 @@ export const ShelfIcon = styled(IntShelfIcon)`
|
||||||
transform: rotateZ(${props => directionMap[props.direction || 'down']});
|
transform: rotateZ(${props => directionMap[props.direction || 'down']});
|
||||||
|
|
||||||
polygon {
|
polygon {
|
||||||
fill: ${props =>
|
fill: ${({ color, theme }) =>
|
||||||
(props.color && props.theme.colors[props.color] && props.theme.colors[props.color].main) ||
|
(color && theme.colors.responses[color] && theme.colors.responses[color].color) || color};
|
||||||
props.color};
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -44,19 +44,19 @@ export const Tabs = styled(ReactTabs)`
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tab-success {
|
&.tab-success {
|
||||||
color: ${props => props.theme.colors.responses.success.color};
|
color: ${props => props.theme.colors.responses.success.tabTextColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tab-redirect {
|
&.tab-redirect {
|
||||||
color: ${props => props.theme.colors.responses.redirect.color};
|
color: ${props => props.theme.colors.responses.redirect.tabTextColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tab-info {
|
&.tab-info {
|
||||||
color: ${props => props.theme.colors.responses.info.color};
|
color: ${props => props.theme.colors.responses.info.tabTextColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
&.tab-error {
|
&.tab-error {
|
||||||
color: ${props => props.theme.colors.responses.error.color};
|
color: ${props => props.theme.colors.responses.error.tabTextColor};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,5 @@ const Link = styled.a`
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
// eslint-disable-next-line react/display-name
|
||||||
export const LinkWrap = url => Component => <Link href={url}>{Component}</Link>;
|
export const LinkWrap = url => Component => <Link href={url}>{Component}</Link>;
|
||||||
|
|
|
@ -67,6 +67,7 @@ export class Endpoint extends React.Component<EndpointProps, EndpointState> {
|
||||||
const normalizedUrl = options.expandDefaultServerVariables
|
const normalizedUrl = options.expandDefaultServerVariables
|
||||||
? expandDefaultServerVariables(server.url, server.variables)
|
? expandDefaultServerVariables(server.url, server.variables)
|
||||||
: server.url;
|
: server.url;
|
||||||
|
const basePath = getBasePath(normalizedUrl);
|
||||||
return (
|
return (
|
||||||
<ServerItem key={normalizedUrl}>
|
<ServerItem key={normalizedUrl}>
|
||||||
<Markdown source={server.description || ''} compact={true} />
|
<Markdown source={server.description || ''} compact={true} />
|
||||||
|
@ -74,7 +75,9 @@ export class Endpoint extends React.Component<EndpointProps, EndpointState> {
|
||||||
<ServerUrl>
|
<ServerUrl>
|
||||||
<span>
|
<span>
|
||||||
{hideHostname || options.hideHostname
|
{hideHostname || options.hideHostname
|
||||||
? getBasePath(normalizedUrl)
|
? basePath === '/'
|
||||||
|
? ''
|
||||||
|
: basePath
|
||||||
: normalizedUrl}
|
: normalizedUrl}
|
||||||
</span>
|
</span>
|
||||||
{operation.path}
|
{operation.path}
|
||||||
|
|
|
@ -9,6 +9,8 @@ import {
|
||||||
TypePrefix,
|
TypePrefix,
|
||||||
TypeTitle,
|
TypeTitle,
|
||||||
ToggleButton,
|
ToggleButton,
|
||||||
|
FieldLabel,
|
||||||
|
ExampleValue,
|
||||||
} from '../../common-elements/fields';
|
} from '../../common-elements/fields';
|
||||||
import { serializeParameterValue } from '../../utils/openapi';
|
import { serializeParameterValue } from '../../utils/openapi';
|
||||||
import { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';
|
import { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';
|
||||||
|
@ -23,6 +25,8 @@ import { Badge } from '../../common-elements/';
|
||||||
|
|
||||||
import { l } from '../../services/Labels';
|
import { l } from '../../services/Labels';
|
||||||
import { OptionsContext } from '../OptionsProvider';
|
import { OptionsContext } from '../OptionsProvider';
|
||||||
|
import { FieldModel } from '../../services/models/Field';
|
||||||
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
const MAX_PATTERN_LENGTH = 45;
|
const MAX_PATTERN_LENGTH = 45;
|
||||||
|
|
||||||
|
@ -42,22 +46,21 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
|
||||||
render() {
|
render() {
|
||||||
const { showExamples, field, renderDiscriminatorSwitch } = this.props;
|
const { showExamples, field, renderDiscriminatorSwitch } = this.props;
|
||||||
const { patternShown } = this.state;
|
const { patternShown } = this.state;
|
||||||
const { enumSkipQuotes, hideSchemaTitles } = this.context;
|
const { enumSkipQuotes, hideSchemaTitles, hideSchemaPattern } = this.context;
|
||||||
|
|
||||||
const { schema, description, example, deprecated } = field;
|
const { schema, description, example, deprecated, examples } = field;
|
||||||
|
|
||||||
const rawDefault = !!enumSkipQuotes || field.in === 'header'; // having quotes around header field default values is confusing and inappropriate
|
const rawDefault = !!enumSkipQuotes || field.in === 'header'; // having quotes around header field default values is confusing and inappropriate
|
||||||
|
|
||||||
let exampleField: JSX.Element | null = null;
|
let renderedExamples: JSX.Element | null = null;
|
||||||
|
|
||||||
if (showExamples && example !== undefined) {
|
if (showExamples && (example !== undefined || examples !== undefined)) {
|
||||||
const label = l('example') + ':';
|
if (examples !== undefined) {
|
||||||
if (field.in && (field.style || field.serializationMime)) {
|
renderedExamples = <Examples field={field} />;
|
||||||
// decode for better readability in examples: see https://github.com/Redocly/redoc/issues/1138
|
|
||||||
const serializedValue = decodeURIComponent(serializeParameterValue(field, example));
|
|
||||||
exampleField = <FieldDetail label={label} value={serializedValue} raw={true} />;
|
|
||||||
} else {
|
} else {
|
||||||
exampleField = <FieldDetail label={label} value={example} />;
|
const label = l('example') + ':';
|
||||||
|
const raw = !!field.in;
|
||||||
|
renderedExamples = <FieldDetail label={label} value={getSerializedValue(field, field.example)} raw={raw} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +80,7 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
|
||||||
{schema.title && !hideSchemaTitles && <TypeTitle> ({schema.title}) </TypeTitle>}
|
{schema.title && !hideSchemaTitles && <TypeTitle> ({schema.title}) </TypeTitle>}
|
||||||
<ConstraintsView constraints={schema.constraints} />
|
<ConstraintsView constraints={schema.constraints} />
|
||||||
{schema.nullable && <NullableLabel> {l('nullable')} </NullableLabel>}
|
{schema.nullable && <NullableLabel> {l('nullable')} </NullableLabel>}
|
||||||
{schema.pattern && (
|
{schema.pattern && !hideSchemaPattern && (
|
||||||
<>
|
<>
|
||||||
<PatternLabel>
|
<PatternLabel>
|
||||||
{patternShown || schema.pattern.length < MAX_PATTERN_LENGTH
|
{patternShown || schema.pattern.length < MAX_PATTERN_LENGTH
|
||||||
|
@ -100,7 +103,7 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
|
||||||
)}
|
)}
|
||||||
<FieldDetail raw={rawDefault} label={l('default') + ':'} value={schema.default} />
|
<FieldDetail raw={rawDefault} label={l('default') + ':'} value={schema.default} />
|
||||||
{!renderDiscriminatorSwitch && <EnumValues type={schema.type} values={schema.enum} />}{' '}
|
{!renderDiscriminatorSwitch && <EnumValues type={schema.type} values={schema.enum} />}{' '}
|
||||||
{exampleField}
|
{renderedExamples}
|
||||||
{<Extensions extensions={{ ...field.extensions, ...schema.extensions }} />}
|
{<Extensions extensions={{ ...field.extensions, ...schema.extensions }} />}
|
||||||
<div>
|
<div>
|
||||||
<Markdown compact={true} source={description} />
|
<Markdown compact={true} source={description} />
|
||||||
|
@ -113,3 +116,40 @@ export class FieldDetails extends React.PureComponent<FieldProps, { patternShown
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Examples({ field }: { field: FieldModel }) {
|
||||||
|
if (!field.examples) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<FieldLabel> {l('examples')}: </FieldLabel>
|
||||||
|
<ExamplesList>
|
||||||
|
{Object.values(field.examples).map((example, idx) => {
|
||||||
|
return (
|
||||||
|
<li key={idx}>
|
||||||
|
<ExampleValue>{getSerializedValue(field, example.value)}</ExampleValue> - {example.summary || example.description}
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</ExamplesList>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSerializedValue(field: FieldModel, example: any) {
|
||||||
|
if (field.in) {
|
||||||
|
// decode for better readability in examples: see https://github.com/Redocly/redoc/issues/1138
|
||||||
|
return decodeURIComponent(serializeParameterValue(field, example));
|
||||||
|
} else {
|
||||||
|
return example;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const ExamplesList = styled.ul`
|
||||||
|
margin-top: 1em;
|
||||||
|
padding-left: 0;
|
||||||
|
list-style-position: inside;
|
||||||
|
`;
|
||||||
|
|
|
@ -51,7 +51,9 @@ class Json extends React.PureComponent<JsonProps> {
|
||||||
expandAll = () => {
|
expandAll = () => {
|
||||||
const elements = this.node.getElementsByClassName('collapsible');
|
const elements = this.node.getElementsByClassName('collapsible');
|
||||||
for (const collapsed of Array.prototype.slice.call(elements)) {
|
for (const collapsed of Array.prototype.slice.call(elements)) {
|
||||||
(collapsed.parentNode as Element)!.classList.remove('collapsed');
|
const parentNode = collapsed.parentNode as Element;
|
||||||
|
parentNode.classList.remove('collapsed');
|
||||||
|
parentNode.querySelector('.collapser')!.setAttribute('aria-label', 'collapse');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,7 +63,9 @@ class Json extends React.PureComponent<JsonProps> {
|
||||||
const elementsArr = Array.prototype.slice.call(elements, 1);
|
const elementsArr = Array.prototype.slice.call(elements, 1);
|
||||||
|
|
||||||
for (const expanded of elementsArr) {
|
for (const expanded of elementsArr) {
|
||||||
(expanded.parentNode as Element)!.classList.add('collapsed');
|
const parentNode = expanded.parentNode as Element;
|
||||||
|
parentNode.classList.add('collapsed');
|
||||||
|
parentNode.querySelector('.collapser')!.setAttribute('aria-label', 'expand');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,8 +75,10 @@ class Json extends React.PureComponent<JsonProps> {
|
||||||
collapsed = target.parentElement!.getElementsByClassName('collapsible')[0];
|
collapsed = target.parentElement!.getElementsByClassName('collapsible')[0];
|
||||||
if (collapsed.parentElement.classList.contains('collapsed')) {
|
if (collapsed.parentElement.classList.contains('collapsed')) {
|
||||||
collapsed.parentElement.classList.remove('collapsed');
|
collapsed.parentElement.classList.remove('collapsed');
|
||||||
|
target.setAttribute('aria-label', 'collapse');
|
||||||
} else {
|
} else {
|
||||||
collapsed.parentElement.classList.add('collapsed');
|
collapsed.parentElement.classList.add('collapsed');
|
||||||
|
target.setAttribute('aria-label', 'expand');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,7 +87,7 @@ export const StyledMarkdownBlock = styled(
|
||||||
padding: ${props => props.theme.spacing.unit * 4}px;
|
padding: ${props => props.theme.spacing.unit * 4}px;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
border-radius: 0px
|
border-radius: 0px;
|
||||||
border: 1px solid rgba(38, 50, 56, 0.1);
|
border: 1px solid rgba(38, 50, 56, 0.1);
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export const DropdownLabel = styled.span`
|
||||||
top: -11px;
|
top: -11px;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
font-weight: ${({ theme }) => theme.typography.fontWeightBold};
|
font-weight: ${({ theme }) => theme.typography.fontWeightBold};
|
||||||
color: ${({ theme }) => transparentize(0.6, theme.rightPanel.textColor)};
|
color: ${({ theme }) => transparentize(0.3, theme.rightPanel.textColor)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const DropdownWrapper = styled.div`
|
export const DropdownWrapper = styled.div`
|
||||||
|
|
|
@ -43,7 +43,12 @@ export class DiscriminatorDropdown extends React.Component<{
|
||||||
this.sortOptions(options, enumValues);
|
this.sortOptions(options, enumValues);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledDropdown value={activeValue} options={options} onChange={this.changeActiveChild} />
|
<StyledDropdown
|
||||||
|
value={activeValue}
|
||||||
|
options={options}
|
||||||
|
onChange={this.changeActiveChild}
|
||||||
|
ariaLabel="Example"
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ export class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxStat
|
||||||
value={this.state.term}
|
value={this.state.term}
|
||||||
onKeyDown={this.handleKeyDown}
|
onKeyDown={this.handleKeyDown}
|
||||||
placeholder="Search..."
|
placeholder="Search..."
|
||||||
|
aria-label="Search"
|
||||||
type="text"
|
type="text"
|
||||||
onChange={this.search}
|
onChange={this.search}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -67,6 +67,10 @@ export const SearchResultsBox = styled.div`
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
|
|
||||||
|
li {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
${MenuItemLabel} {
|
${MenuItemLabel} {
|
||||||
padding-top: 6px;
|
padding-top: 6px;
|
||||||
padding-bottom: 6px;
|
padding-bottom: 6px;
|
||||||
|
|
|
@ -12,7 +12,7 @@ const AUTH_TYPES = {
|
||||||
oauth2: 'OAuth2',
|
oauth2: 'OAuth2',
|
||||||
apiKey: 'API Key',
|
apiKey: 'API Key',
|
||||||
http: 'HTTP',
|
http: 'HTTP',
|
||||||
openIdConnect: 'Open ID Connect',
|
openIdConnect: 'OpenID Connect',
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface OAuthFlowProps {
|
export interface OAuthFlowProps {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as classnames from 'classnames';
|
import { default as classnames } from 'classnames';
|
||||||
import { darken } from 'polished';
|
import { darken } from 'polished';
|
||||||
|
|
||||||
import { deprecatedCss, ShelfIcon } from '../../common-elements';
|
import { deprecatedCss, ShelfIcon } from '../../common-elements';
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class SourceCode extends React.PureComponent<SourceCodeProps> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SourceCodeWithCopy extends React.PureComponent<SourceCodeProps> {
|
export class SourceCodeWithCopy extends React.Component<SourceCodeProps> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<CopyButtonWrapper data={this.props.source}>
|
<CopyButtonWrapper data={this.props.source}>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'core-js/es/promise';
|
import 'core-js/es/promise';
|
||||||
|
|
||||||
import 'core-js/es/array/find';
|
import 'core-js/es/array/find';
|
||||||
|
import 'core-js/es/array/includes';
|
||||||
import 'core-js/es/object/assign';
|
import 'core-js/es/object/assign';
|
||||||
import 'core-js/es/object/entries';
|
import 'core-js/es/object/entries';
|
||||||
import 'core-js/es/object/is';
|
import 'core-js/es/object/is';
|
||||||
|
|
|
@ -5,6 +5,7 @@ export interface LabelsConfig {
|
||||||
default: string;
|
default: string;
|
||||||
deprecated: string;
|
deprecated: string;
|
||||||
example: string;
|
example: string;
|
||||||
|
examples: string;
|
||||||
nullable: string;
|
nullable: string;
|
||||||
recursive: string;
|
recursive: string;
|
||||||
arrayOf: string;
|
arrayOf: string;
|
||||||
|
@ -20,6 +21,7 @@ const labels: LabelsConfig = {
|
||||||
default: 'Default',
|
default: 'Default',
|
||||||
deprecated: 'Deprecated',
|
deprecated: 'Deprecated',
|
||||||
example: 'Example',
|
example: 'Example',
|
||||||
|
examples: 'Examples',
|
||||||
nullable: 'Nullable',
|
nullable: 'Nullable',
|
||||||
recursive: 'Recursive',
|
recursive: 'Recursive',
|
||||||
arrayOf: 'Array of ',
|
arrayOf: 'Array of ',
|
||||||
|
|
|
@ -261,10 +261,12 @@ export class OpenAPIParser {
|
||||||
receiver.properties[prop] = subSchema.properties[prop];
|
receiver.properties[prop] = subSchema.properties[prop];
|
||||||
} else {
|
} else {
|
||||||
// merge inner properties
|
// merge inner properties
|
||||||
receiver.properties[prop] = this.mergeAllOf(
|
const mergedProp = this.mergeAllOf(
|
||||||
{ allOf: [receiver.properties[prop], subSchema.properties[prop]] },
|
{ allOf: [receiver.properties[prop], subSchema.properties[prop]] },
|
||||||
$ref + '/properties/' + prop,
|
$ref + '/properties/' + prop,
|
||||||
);
|
);
|
||||||
|
receiver.properties[prop] = mergedProp
|
||||||
|
this.exitParents(mergedProp); // every prop resolution should have separate recursive stack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ export interface RedocRawOptions {
|
||||||
expandDefaultServerVariables?: boolean;
|
expandDefaultServerVariables?: boolean;
|
||||||
maxDisplayedEnumValues?: number;
|
maxDisplayedEnumValues?: number;
|
||||||
ignoreNamedSchemas?: string[] | string;
|
ignoreNamedSchemas?: string[] | string;
|
||||||
|
hideSchemaPattern?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function argValueToBoolean(val?: string | boolean, defaultValue?: boolean): boolean {
|
function argValueToBoolean(val?: string | boolean, defaultValue?: boolean): boolean {
|
||||||
|
@ -194,6 +195,7 @@ export class RedocNormalizedOptions {
|
||||||
maxDisplayedEnumValues?: number;
|
maxDisplayedEnumValues?: number;
|
||||||
|
|
||||||
ignoreNamedSchemas: Set<string>;
|
ignoreNamedSchemas: Set<string>;
|
||||||
|
hideSchemaPattern: boolean;
|
||||||
|
|
||||||
constructor(raw: RedocRawOptions, defaults: RedocRawOptions = {}) {
|
constructor(raw: RedocRawOptions, defaults: RedocRawOptions = {}) {
|
||||||
raw = { ...defaults, ...raw };
|
raw = { ...defaults, ...raw };
|
||||||
|
@ -250,7 +252,10 @@ export class RedocNormalizedOptions {
|
||||||
|
|
||||||
this.expandDefaultServerVariables = argValueToBoolean(raw.expandDefaultServerVariables);
|
this.expandDefaultServerVariables = argValueToBoolean(raw.expandDefaultServerVariables);
|
||||||
this.maxDisplayedEnumValues = argValueToNumber(raw.maxDisplayedEnumValues);
|
this.maxDisplayedEnumValues = argValueToNumber(raw.maxDisplayedEnumValues);
|
||||||
const ignoreNamedSchemas = Array.isArray(raw.ignoreNamedSchemas) ? raw.ignoreNamedSchemas : raw.ignoreNamedSchemas?.split(',').map(s => s.trim());
|
const ignoreNamedSchemas = Array.isArray(raw.ignoreNamedSchemas)
|
||||||
|
? raw.ignoreNamedSchemas
|
||||||
|
: raw.ignoreNamedSchemas?.split(',').map((s) => s.trim());
|
||||||
this.ignoreNamedSchemas = new Set(ignoreNamedSchemas);
|
this.ignoreNamedSchemas = new Set(ignoreNamedSchemas);
|
||||||
|
this.hideSchemaPattern = argValueToBoolean(raw.hideSchemaPattern);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ import { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
||||||
import { extractExtensions } from '../../utils/openapi';
|
import { extractExtensions } from '../../utils/openapi';
|
||||||
import { OpenAPIParser } from '../OpenAPIParser';
|
import { OpenAPIParser } from '../OpenAPIParser';
|
||||||
import { SchemaModel } from './Schema';
|
import { SchemaModel } from './Schema';
|
||||||
|
import { ExampleModel } from './Example';
|
||||||
|
import { mapValues } from '../../utils/helpers';
|
||||||
|
|
||||||
const DEFAULT_SERIALIZATION: Record<
|
const DEFAULT_SERIALIZATION: Record<
|
||||||
OpenAPIParameterLocation,
|
OpenAPIParameterLocation,
|
||||||
|
@ -46,6 +48,7 @@ export class FieldModel {
|
||||||
required: boolean;
|
required: boolean;
|
||||||
description: string;
|
description: string;
|
||||||
example?: string;
|
example?: string;
|
||||||
|
examples?: Record<string, ExampleModel>;
|
||||||
deprecated: boolean;
|
deprecated: boolean;
|
||||||
in?: OpenAPIParameterLocation;
|
in?: OpenAPIParameterLocation;
|
||||||
kind: string;
|
kind: string;
|
||||||
|
@ -81,6 +84,13 @@ export class FieldModel {
|
||||||
info.description === undefined ? this.schema.description || '' : info.description;
|
info.description === undefined ? this.schema.description || '' : info.description;
|
||||||
this.example = info.example || this.schema.example;
|
this.example = info.example || this.schema.example;
|
||||||
|
|
||||||
|
if (info.examples !== undefined) {
|
||||||
|
this.examples = mapValues(
|
||||||
|
info.examples,
|
||||||
|
(example, name) => new ExampleModel(parser, example, name, info.encoding),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (serializationMime) {
|
if (serializationMime) {
|
||||||
this.serializationMime = serializationMime;
|
this.serializationMime = serializationMime;
|
||||||
} else if (info.style) {
|
} else if (info.style) {
|
||||||
|
|
|
@ -53,6 +53,7 @@ export class MediaTypeModel {
|
||||||
skipReadOnly: this.isRequestType,
|
skipReadOnly: this.isRequestType,
|
||||||
skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,
|
skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,
|
||||||
skipWriteOnly: !this.isRequestType,
|
skipWriteOnly: !this.isRequestType,
|
||||||
|
maxSampleDepth: 10,
|
||||||
};
|
};
|
||||||
if (this.schema && this.schema.oneOf) {
|
if (this.schema && this.schema.oneOf) {
|
||||||
this.examples = {};
|
this.examples = {};
|
||||||
|
|
|
@ -32,7 +32,8 @@ function parseOptionsFromElement(element: Element) {
|
||||||
const res = {};
|
const res = {};
|
||||||
for (const attrName in attrMap) {
|
for (const attrName in attrMap) {
|
||||||
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
||||||
res[optionName] = attrMap[attrName];
|
const optionValue = attrMap[attrName];
|
||||||
|
res[optionName] = attrName === 'theme' ? JSON.parse(optionValue) : optionValue;
|
||||||
// TODO: normalize options
|
// TODO: normalize options
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
25
src/theme.ts
25
src/theme.ts
|
@ -12,7 +12,7 @@ const defaultTheme: ThemeInterface = {
|
||||||
large: '105rem',
|
large: '105rem',
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
tonalOffset: 0.3,
|
tonalOffset: 0.2,
|
||||||
primary: {
|
primary: {
|
||||||
main: '#32329f',
|
main: '#32329f',
|
||||||
light: ({ colors }) => lighten(colors.tonalOffset, colors.primary.main),
|
light: ({ colors }) => lighten(colors.tonalOffset, colors.primary.main),
|
||||||
|
@ -53,30 +53,34 @@ const defaultTheme: ThemeInterface = {
|
||||||
success: {
|
success: {
|
||||||
color: ({ colors }) => colors.success.main,
|
color: ({ colors }) => colors.success.main,
|
||||||
backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),
|
backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),
|
||||||
|
tabTextColor: ({ colors }) => colors.responses.success.color,
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
color: ({ colors }) => colors.error.main,
|
color: ({ colors }) => colors.error.main,
|
||||||
backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),
|
backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),
|
||||||
|
tabTextColor: ({ colors }) => colors.responses.error.color,
|
||||||
},
|
},
|
||||||
redirect: {
|
redirect: {
|
||||||
color: ({ colors }) => colors.warning.main,
|
color: ({ colors }) => colors.warning.main,
|
||||||
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color),
|
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color),
|
||||||
|
tabTextColor: ({ colors }) => colors.responses.redirect.color,
|
||||||
},
|
},
|
||||||
info: {
|
info: {
|
||||||
color: '#87ceeb',
|
color: '#87ceeb',
|
||||||
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color),
|
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color),
|
||||||
|
tabTextColor: ({ colors }) => colors.responses.info.color,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
get: '#6bbd5b',
|
get: '#2F8132',
|
||||||
post: '#248fb2',
|
post: '#186FAF',
|
||||||
put: '#9b708b',
|
put: '#95507c',
|
||||||
options: '#d3ca12',
|
options: '#947014',
|
||||||
patch: '#e09d43',
|
patch: '#bf581d',
|
||||||
delete: '#e27a7a',
|
delete: '#cc3333',
|
||||||
basic: '#999',
|
basic: '#707070',
|
||||||
link: '#31bbb6',
|
link: '#07818F',
|
||||||
head: '#c167e4',
|
head: '#A23DAD',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
|
@ -206,6 +210,7 @@ export interface ColorSetting {
|
||||||
export interface HTTPResponseColos {
|
export interface HTTPResponseColos {
|
||||||
color: string;
|
color: string;
|
||||||
backgroundColor: string;
|
backgroundColor: string;
|
||||||
|
tabTextColor: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FontSettings {
|
export interface FontSettings {
|
||||||
|
|
1
src/types/open-api.d.ts
vendored
1
src/types/open-api.d.ts
vendored
|
@ -95,6 +95,7 @@ export interface OpenAPIParameter {
|
||||||
example?: any;
|
example?: any;
|
||||||
examples?: { [media: string]: Referenced<OpenAPIExample> };
|
examples?: { [media: string]: Referenced<OpenAPIExample> };
|
||||||
content?: { [media: string]: OpenAPIMediaType };
|
content?: { [media: string]: OpenAPIMediaType };
|
||||||
|
encoding?: Record<string, OpenAPIEncoding>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OpenAPIExample {
|
export interface OpenAPIExample {
|
||||||
|
|
3127
src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap
Normal file
3127
src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap
Normal file
File diff suppressed because it is too large
Load Diff
18
src/utils/__tests__/loadAndBundleSpec.test.ts
Normal file
18
src/utils/__tests__/loadAndBundleSpec.test.ts
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import * as yaml from 'yaml-js';
|
||||||
|
import { readFileSync } from 'fs';
|
||||||
|
import { resolve } from 'path';
|
||||||
|
import { loadAndBundleSpec } from '../loadAndBundleSpec';
|
||||||
|
|
||||||
|
describe('#loadAndBundleSpec', () => {
|
||||||
|
it('should load And Bundle Spec demo/openapi.yaml', async () => {
|
||||||
|
const spec = yaml.load(readFileSync(resolve(__dirname, '../../../demo/openapi.yaml')));
|
||||||
|
const bundledSpec = await loadAndBundleSpec(spec);
|
||||||
|
expect(bundledSpec).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should load And Bundle Spec demo/swagger.yaml', async () => {
|
||||||
|
const spec = yaml.load(readFileSync(resolve(__dirname, '../../../demo/swagger.yaml')));
|
||||||
|
const bundledSpec = await loadAndBundleSpec(spec);
|
||||||
|
expect(bundledSpec).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
});
|
|
@ -101,6 +101,13 @@ describe('Utils', () => {
|
||||||
expect(getOperationSummary(operation as any).length).toBe(50);
|
expect(getOperationSummary(operation as any).length).toBe(50);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Should return pathName if no summary, operationId, description', () => {
|
||||||
|
const operation = {
|
||||||
|
pathName: '/sandbox/test'
|
||||||
|
};
|
||||||
|
expect(getOperationSummary(operation as any)).toBe('/sandbox/test');
|
||||||
|
});
|
||||||
|
|
||||||
it('Should return <no summary> if no info', () => {
|
it('Should return <no summary> if no info', () => {
|
||||||
const operation = {
|
const operation = {
|
||||||
description: undefined,
|
description: undefined,
|
||||||
|
@ -335,7 +342,8 @@ describe('Utils', () => {
|
||||||
min: number | undefined = undefined,
|
min: number | undefined = undefined,
|
||||||
max: number | undefined = undefined,
|
max: number | undefined = undefined,
|
||||||
multipleOf: number | undefined = undefined,
|
multipleOf: number | undefined = undefined,
|
||||||
) => ({ type: 'array', minItems: min, maxItems: max, multipleOf });
|
uniqueItems?: boolean,
|
||||||
|
) => ({ type: 'array', minItems: min, maxItems: max, multipleOf, uniqueItems });
|
||||||
|
|
||||||
it('should not have a humanized constraint without schema constraints', () => {
|
it('should not have a humanized constraint without schema constraints', () => {
|
||||||
expect(humanizeConstraints(itemConstraintSchema())).toHaveLength(0);
|
expect(humanizeConstraints(itemConstraintSchema())).toHaveLength(0);
|
||||||
|
@ -372,6 +380,12 @@ describe('Utils', () => {
|
||||||
'multiple of 0.5',
|
'multiple of 0.5',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have a humanized constraint when uniqueItems is set', () => {
|
||||||
|
expect(humanizeConstraints(itemConstraintSchema(undefined, undefined, undefined, true))).toContain(
|
||||||
|
'unique',
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('OpenAPI pluralizeType', () => {
|
describe('OpenAPI pluralizeType', () => {
|
||||||
|
|
|
@ -68,11 +68,11 @@ export function mapLang(lang: string): string {
|
||||||
* @param lang highlight language
|
* @param lang highlight language
|
||||||
* @return highlighted source code as **html string**
|
* @return highlighted source code as **html string**
|
||||||
*/
|
*/
|
||||||
export function highlight(source: string, lang: string = DEFAULT_LANG): string {
|
export function highlight(source: string | number | boolean, lang: string = DEFAULT_LANG): string {
|
||||||
lang = lang.toLowerCase();
|
lang = lang.toLowerCase();
|
||||||
let grammar = Prism.languages[lang];
|
let grammar = Prism.languages[lang];
|
||||||
if (!grammar) {
|
if (!grammar) {
|
||||||
grammar = Prism.languages[mapLang(lang)];
|
grammar = Prism.languages[mapLang(lang)];
|
||||||
}
|
}
|
||||||
return Prism.highlight(source, grammar, lang);
|
return Prism.highlight(source.toString(), grammar, lang);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,9 +73,9 @@ function valueToHTML(value, maxExpandLevel: number) {
|
||||||
|
|
||||||
function arrayToHTML(json, maxExpandLevel: number) {
|
function arrayToHTML(json, maxExpandLevel: number) {
|
||||||
const collapsed = level > maxExpandLevel ? 'collapsed' : '';
|
const collapsed = level > maxExpandLevel ? 'collapsed' : '';
|
||||||
let output = `<button class="collapser"></button>${punctuation(
|
let output = `<button class="collapser" aria-label="${
|
||||||
'[',
|
level > maxExpandLevel + 1 ? 'expand' : 'collapse'
|
||||||
)}<span class="ellipsis"></span><ul class="array collapsible">`;
|
}"></button>${punctuation('[')}<span class="ellipsis"></span><ul class="array collapsible">`;
|
||||||
let hasContents = false;
|
let hasContents = false;
|
||||||
const length = json.length;
|
const length = json.length;
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
|
@ -98,9 +98,9 @@ function objectToHTML(json, maxExpandLevel: number) {
|
||||||
const collapsed = level > maxExpandLevel ? 'collapsed' : '';
|
const collapsed = level > maxExpandLevel ? 'collapsed' : '';
|
||||||
const keys = Object.keys(json);
|
const keys = Object.keys(json);
|
||||||
const length = keys.length;
|
const length = keys.length;
|
||||||
let output = `<button class="collapser"></button>${punctuation(
|
let output = `<button class="collapser" aria-label="${
|
||||||
'{',
|
level > maxExpandLevel + 1 ? 'expand' : 'collapse'
|
||||||
)}<span class="ellipsis"></span><ul class="obj collapsible">`;
|
}"></button>${punctuation('{')}<span class="ellipsis"></span><ul class="obj collapsible">`;
|
||||||
let hasContents = false;
|
let hasContents = false;
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
const key = keys[i];
|
const key = keys[i];
|
||||||
|
|
|
@ -1,19 +1,31 @@
|
||||||
import * as JsonSchemaRefParser from 'json-schema-ref-parser';
|
import { Source, Document, bundle, Config } from '@redocly/openapi-core';
|
||||||
/* tslint:disable-next-line:no-implicit-dependencies */
|
/* tslint:disable-next-line:no-implicit-dependencies */
|
||||||
import { convertObj } from 'swagger2openapi';
|
import { convertObj } from 'swagger2openapi';
|
||||||
import { OpenAPISpec } from '../types';
|
import { OpenAPISpec } from '../types';
|
||||||
|
import { IS_BROWSER } from './dom';
|
||||||
|
|
||||||
export async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {
|
export async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {
|
||||||
const parser = new JsonSchemaRefParser();
|
const config = new Config({});
|
||||||
const spec = (await parser.bundle(specUrlOrObject, {
|
const bundleOpts = {
|
||||||
resolve: { http: { withCredentials: false } },
|
config,
|
||||||
} as object)) as any;
|
base: IS_BROWSER ? window.location.href : process.cwd()
|
||||||
|
|
||||||
if (spec.swagger !== undefined) {
|
|
||||||
return convertSwagger2OpenAPI(spec);
|
|
||||||
} else {
|
|
||||||
return spec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IS_BROWSER) {
|
||||||
|
config.resolve.http.customFetch = global.fetch;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof specUrlOrObject === 'object' && specUrlOrObject !== null) {
|
||||||
|
bundleOpts['doc'] = {
|
||||||
|
source: { absoluteRef: '' } as Source,
|
||||||
|
parsed: specUrlOrObject
|
||||||
|
} as Document
|
||||||
|
} else {
|
||||||
|
bundleOpts['ref'] = specUrlOrObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { bundle: { parsed } } = await bundle(bundleOpts);
|
||||||
|
return parsed.swagger !== undefined ? convertSwagger2OpenAPI(parsed) : parsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertSwagger2OpenAPI(spec: any): Promise<OpenAPISpec> {
|
export function convertSwagger2OpenAPI(spec: any): Promise<OpenAPISpec> {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { dirname } from 'path';
|
import { dirname } from 'path';
|
||||||
import * as URLtemplate from 'url-template';
|
import * as URLtemplate from 'url-template';
|
||||||
|
|
||||||
|
import { ExtendedOpenAPIOperation } from '../services';
|
||||||
import { FieldModel } from '../services/models';
|
import { FieldModel } from '../services/models';
|
||||||
import { OpenAPIParser } from '../services/OpenAPIParser';
|
import { OpenAPIParser } from '../services/OpenAPIParser';
|
||||||
import {
|
import {
|
||||||
OpenAPIEncoding,
|
OpenAPIEncoding,
|
||||||
OpenAPIMediaType,
|
OpenAPIMediaType,
|
||||||
OpenAPIOperation,
|
|
||||||
OpenAPIParameter,
|
OpenAPIParameter,
|
||||||
OpenAPIParameterStyle,
|
OpenAPIParameterStyle,
|
||||||
OpenAPISchema,
|
OpenAPISchema,
|
||||||
|
@ -62,12 +62,13 @@ export function isOperationName(key: string): boolean {
|
||||||
return key in operationNames;
|
return key in operationNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOperationSummary(operation: OpenAPIOperation): string {
|
export function getOperationSummary(operation: ExtendedOpenAPIOperation): string {
|
||||||
return (
|
return (
|
||||||
operation.summary ||
|
operation.summary ||
|
||||||
operation.operationId ||
|
operation.operationId ||
|
||||||
(operation.description && operation.description.substring(0, 50)) ||
|
(operation.description && operation.description.substring(0, 50)) ||
|
||||||
'<no summary>'
|
operation.pathName ||
|
||||||
|
'<no summary>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,6 +449,10 @@ export function humanizeConstraints(schema: OpenAPISchema): string[] {
|
||||||
res.push(numberRange);
|
res.push(numberRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (schema.uniqueItems) {
|
||||||
|
res.push('unique');
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* tslint:disable:no-implicit-dependencies */
|
/* tslint:disable:no-implicit-dependencies */
|
||||||
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||||
import * as webpack from 'webpack';
|
import * as webpack from 'webpack';
|
||||||
|
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
const nodeExternals = require('webpack-node-externals')({
|
const nodeExternals = require('webpack-node-externals')({
|
||||||
|
@ -41,23 +40,17 @@ export default (env: { standalone?: boolean } = {}, { mode }) => ({
|
||||||
libraryTarget: 'umd',
|
libraryTarget: 'umd',
|
||||||
globalObject: 'this',
|
globalObject: 'this',
|
||||||
},
|
},
|
||||||
|
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.tsx', '.js', '.json'],
|
extensions: ['.ts', '.tsx', '.js', '.json'],
|
||||||
},
|
},
|
||||||
|
|
||||||
node: {
|
node: {
|
||||||
fs: 'empty',
|
fs: 'empty',
|
||||||
},
|
},
|
||||||
|
|
||||||
performance: false,
|
performance: false,
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: !!env.standalone,
|
minimize: !!env.standalone,
|
||||||
},
|
},
|
||||||
|
|
||||||
externals: env.standalone
|
externals: env.standalone
|
||||||
? {
|
? {
|
||||||
esprima: 'esprima',
|
esprima: 'esprima',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user