mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
Merge branch 'master' of github.com:Redocly/redoc into cli_static_serving
This commit is contained in:
commit
dfda043ce6
25
CHANGELOG.md
25
CHANGELOG.md
|
@ -1,3 +1,28 @@
|
|||
# [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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* new extensions hook PropertyDetailsCell + wrap property name into span ([0fae030](https://github.com/Redocly/redoc/commit/0fae03099645bd9d3795709175640583b08dfc3d))
|
||||
|
||||
|
||||
|
||||
# [2.0.0-rc.43](https://github.com/Redocly/redoc/compare/v2.0.0-rc.42...v2.0.0-rc.43) (2020-10-13)
|
||||
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ You can use all of the following options with standalone version on <redoc> tag
|
|||
* `disableSearch` - disable search indexing and search box.
|
||||
* `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.
|
||||
* `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.
|
||||
* `hideHostname` - if set, the protocol and hostname is not shown in the operation definition.
|
||||
* `hideLoading` - do not show loading animation. Useful for small docs.
|
||||
|
|
106
cli/package-lock.json → cli/npm-shrinkwrap.json
generated
106
cli/package-lock.json → cli/npm-shrinkwrap.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "redoc-cli",
|
||||
"version": "0.9.12",
|
||||
"version": "0.10.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -92,9 +92,9 @@
|
|||
"integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ=="
|
||||
},
|
||||
"@babel/runtime": {
|
||||
"version": "7.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
|
||||
"integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
|
||||
"integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
|
||||
"requires": {
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
}
|
||||
|
@ -198,6 +198,11 @@
|
|||
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
|
||||
"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/react-dropdown-aria": {
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@redocly/react-dropdown-aria/-/react-dropdown-aria-2.0.11.tgz",
|
||||
|
@ -705,9 +710,9 @@
|
|||
"integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA=="
|
||||
},
|
||||
"dompurify": {
|
||||
"version": "2.0.12",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz",
|
||||
"integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg=="
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.0.tgz",
|
||||
"integrity": "sha512-bqFOQ7XRmmozp0VsKdIEe8UwZYxj0yttz7l80GBtBqdVRY48cOpXH2J/CVO7AEkV51qY0EBVXfilec18mdmQ/w=="
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.5.2",
|
||||
|
@ -739,9 +744,9 @@
|
|||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"eventemitter3": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.5.tgz",
|
||||
"integrity": "sha512-QR0rh0YiPuxuDQ6+T9GAO/xWTExXpxIes1Nl9RykNGTnE1HJmkuEfxJH9cubjIOQZ/GH4qNBR4u8VSHaKiWs4g=="
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
|
||||
},
|
||||
"events": {
|
||||
"version": "3.1.0",
|
||||
|
@ -959,9 +964,9 @@
|
|||
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
|
||||
},
|
||||
"json-pointer": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz",
|
||||
"integrity": "sha1-jlAFUKaqxUZKRzN32leqbMIoKNc=",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.1.tgz",
|
||||
"integrity": "sha512-3OvjqKdCBvH41DLpV4iSt6v2XhZXV1bPB4OROuknvUXI7ZQNofieCPkmE26stEJ9zdQuvIxDHCuYhfgxFAAs+Q==",
|
||||
"requires": {
|
||||
"foreach": "^2.0.4"
|
||||
}
|
||||
|
@ -1086,22 +1091,22 @@
|
|||
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
|
||||
},
|
||||
"mobx": {
|
||||
"version": "4.13.0",
|
||||
"resolved": "https://registry.npmjs.org/mobx/-/mobx-4.13.0.tgz",
|
||||
"integrity": "sha512-+hJTBIBRz4sWKpBTj2t2YbjJVlFJIGYiVoHnNUl03krsiFzXGNtqLjFvTPE1+fnN6Mq6LGfvgRKiGsBtZvZBwg=="
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mobx/-/mobx-6.0.1.tgz",
|
||||
"integrity": "sha512-Pk6uJXZ34yqd661yRmS6z/9avm4FOGXpFpVjnEfiYYOsZXnAxv1fpYjxTCEZ9tuwk0Xe1qnUUlgm+rJtGe0YJA=="
|
||||
},
|
||||
"mobx-react": {
|
||||
"version": "6.2.5",
|
||||
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-6.2.5.tgz",
|
||||
"integrity": "sha512-LxtXXW0GkOAO6VOIg2m/6WL6ZuKlzOWwESIFdrWelI0ZMIvtKCMZVUuulcO5GAWSDsH0ApaMkGLoaPqKjzyziQ==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-6.3.1.tgz",
|
||||
"integrity": "sha512-IOxdJGnRSNSJrL2uGpWO5w9JH5q5HoxEqwOF4gye1gmZYdjoYkkMzSGMDnRCUpN/BNzZcFoMdHXrjvkwO7KgaQ==",
|
||||
"requires": {
|
||||
"mobx-react-lite": ">=2.0.6"
|
||||
"mobx-react-lite": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"mobx-react-lite": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-2.0.7.tgz",
|
||||
"integrity": "sha512-YKAh2gThC6WooPnVZCoC+rV1bODAKFwkhxikzgH18wpBjkgTkkR9Sb0IesQAH5QrAEH/JQVmy47jcpQkf2Au3Q=="
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-2.2.2.tgz",
|
||||
"integrity": "sha512-2SlXALHIkyUPDsV4VTKVR9DW7K3Ksh1aaIv3NrNJygTbhXe2A9GrcKHZ2ovIiOp/BXilOcTYemfHHZubP431dg=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
|
@ -1173,23 +1178,24 @@
|
|||
}
|
||||
},
|
||||
"oas-linter": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.1.3.tgz",
|
||||
"integrity": "sha512-jFWBHjSoqODGo7cKA/VWqqWSLbHNtnyCEpa2nMMS64SzCUbZDk63Oe7LqQZ2qJA0K2VRreYLt6cVkYy6MqNRDg==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.1.tgz",
|
||||
"integrity": "sha512-e5G6bbq3Nrfxm+SDPR5AiZ6n2smVUmhLA1OgI2/Bl8e2ywfWsKw/yuqrwiXXiNHb1wdM/GyPMX6QjCGJODlaaA==",
|
||||
"requires": {
|
||||
"@exodus/schemasafe": "^1.0.0-rc.2",
|
||||
"should": "^13.2.1",
|
||||
"yaml": "^1.8.3"
|
||||
"yaml": "^1.10.0"
|
||||
}
|
||||
},
|
||||
"oas-resolver": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.4.3.tgz",
|
||||
"integrity": "sha512-+66lGk5GewIXoIkqxfeWp89M/SgQT67oITiuG6qNIUuq1gczIIy68ZrMiE+gyDZY2IAdVxY9k73o9nHBnKwHPA==",
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.2.tgz",
|
||||
"integrity": "sha512-dEuG5nE9IMl0FQNQuROsoriP4/944PajSBKAoZMyp9b2eXfmPv9ZKeHRCKjf5RWLm0GezaPKcdCLbB0/Xiqtdw==",
|
||||
"requires": {
|
||||
"node-fetch-h2": "^2.3.0",
|
||||
"oas-kit-common": "^1.0.8",
|
||||
"reftools": "^1.1.5",
|
||||
"yaml": "^1.8.3",
|
||||
"reftools": "^1.1.6",
|
||||
"yaml": "^1.10.0",
|
||||
"yargs": "^15.3.1"
|
||||
}
|
||||
},
|
||||
|
@ -1229,9 +1235,9 @@
|
|||
}
|
||||
},
|
||||
"openapi-sampler": {
|
||||
"version": "1.0.0-beta.16",
|
||||
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.16.tgz",
|
||||
"integrity": "sha512-05+GvwMagTY7GxoDQoWJfmAUFlxfebciiEzqKmu4iq6+MqBEn62AMUkn0CTxyKhnUGIaR2KXjTeslxIeJwVIOw==",
|
||||
"version": "1.0.0-beta.18",
|
||||
"resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.18.tgz",
|
||||
"integrity": "sha512-nG/0kvvSY5FbrU5A+Dbp1xTQN++7pKIh87/atryZlxrzDuok5Y6TCbpxO1jYqpUKLycE4ReKGHCywezngG6xtQ==",
|
||||
"requires": {
|
||||
"json-pointer": "^0.6.0"
|
||||
}
|
||||
|
@ -1300,9 +1306,9 @@
|
|||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||
},
|
||||
"polished": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/polished/-/polished-3.6.5.tgz",
|
||||
"integrity": "sha512-VwhC9MlhW7O5dg/z7k32dabcAFW1VI2+7fSe8cE/kXcfL7mVdoa5UxciYGW2sJU78ldDLT6+ROEKIZKFNTnUXQ==",
|
||||
"version": "3.6.7",
|
||||
"resolved": "https://registry.npmjs.org/polished/-/polished-3.6.7.tgz",
|
||||
"integrity": "sha512-b4OViUOihwV0icb9PHmWbR+vPqaSzSAEbgLskvb7ANPATVXGiYv/TQFHQo65S53WU9i5EQ1I03YDOJW7K0bmYg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.9.2"
|
||||
}
|
||||
|
@ -1313,9 +1319,9 @@
|
|||
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
|
||||
},
|
||||
"prismjs": {
|
||||
"version": "1.21.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz",
|
||||
"integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==",
|
||||
"version": "1.22.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.22.0.tgz",
|
||||
"integrity": "sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==",
|
||||
"requires": {
|
||||
"clipboard": "^2.0.0"
|
||||
}
|
||||
|
@ -1468,9 +1474,9 @@
|
|||
}
|
||||
},
|
||||
"redoc": {
|
||||
"version": "2.0.0-rc.40",
|
||||
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.40.tgz",
|
||||
"integrity": "sha512-f1na5vWCr37R5+G4xhbD1TjH6j6b/he8nEMGGJOwDcIMMcDK88S0YEWuhplhdVuZdc4c61CoxZqGXqcDRp5m0w==",
|
||||
"version": "2.0.0-rc.45",
|
||||
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.45.tgz",
|
||||
"integrity": "sha512-yOgyXFybwBItvY+y9cFEA6X0W6KDdnkdeWK8LMkTxWN4HUecRwPFYPRdzx+SvDUb8ICh4PDtfyDU3Fo1e9N8Iw==",
|
||||
"requires": {
|
||||
"@redocly/react-dropdown-aria": "^2.0.11",
|
||||
"@types/node": "^13.11.1",
|
||||
|
@ -1499,16 +1505,16 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "13.13.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.15.tgz",
|
||||
"integrity": "sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw=="
|
||||
"version": "13.13.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.29.tgz",
|
||||
"integrity": "sha512-WPGpyEDx4/F4Rx1p1Zar8m+JsMxpSY/wNFPlyNXWV+UzJwkYt3LQg2be/qJgpsLdVJsfxTR5ipY6rv2579jStQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"reftools": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.5.tgz",
|
||||
"integrity": "sha512-o7RX5wMzITYj+8P8oaccFH2xYu5nQ63TH0d73Ce5YgpiY9NyFytaQfeg1p1Z5T4yfjKSj0sYuUscBqZgkLsooQ=="
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.6.tgz",
|
||||
"integrity": "sha512-rQfJ025lvPjw9qyQuNPqE+cRs5qVs7BMrZwgRJnmuMcX/8r/eJE8f5/RCunJWViXKHmN5K2DFafYzglLOHE/tw=="
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
"version": "0.13.7",
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "redoc-cli",
|
||||
"version": "0.9.12",
|
||||
"version": "0.10.0",
|
||||
"description": "ReDoc's Command Line Interface",
|
||||
"main": "index.js",
|
||||
"bin": "index.js",
|
||||
|
@ -17,11 +17,11 @@
|
|||
"isarray": "^2.0.5",
|
||||
"mime-types": "^2.1.27",
|
||||
"mkdirp": "^1.0.4",
|
||||
"mobx": "^4.2.0",
|
||||
"mobx": "^6.0.1",
|
||||
"node-libs-browser": "^2.2.1",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"redoc": "^2.0.0-rc.40",
|
||||
"redoc": "2.0.0-rc.45",
|
||||
"styled-components": "^5.1.1",
|
||||
"tslib": "^2.0.0",
|
||||
"yargs": "^15.4.1"
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "redoc",
|
||||
"version": "2.0.0-rc.43",
|
||||
"version": "2.0.0-rc.45",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "redoc",
|
||||
"version": "2.0.0-rc.43",
|
||||
"version": "2.0.0-rc.45",
|
||||
"description": "ReDoc",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -65,7 +65,7 @@ export const PrismDiv = styled.div`
|
|||
}
|
||||
|
||||
.token.boolean {
|
||||
color: firebrick;
|
||||
color: #e64441;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
|
|
|
@ -98,6 +98,8 @@ export const PropertyDetailsCell = styled.td`
|
|||
border-left: none;
|
||||
}
|
||||
`}
|
||||
|
||||
${extensionsHook('PropertyDetailsCell')};
|
||||
`;
|
||||
|
||||
export const PropertyBullet = styled.span`
|
||||
|
|
|
@ -34,7 +34,7 @@ export const FieldLabel = styled.span`
|
|||
`;
|
||||
|
||||
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)`
|
||||
|
@ -62,12 +62,12 @@ export const RecursiveLabel = styled(FieldLabel)`
|
|||
`;
|
||||
|
||||
export const NullableLabel = styled(FieldLabel)`
|
||||
color: #3195a6;
|
||||
color: #0e7c86;
|
||||
font-size: 13px;
|
||||
`;
|
||||
|
||||
export const PatternLabel = styled(FieldLabel)`
|
||||
color: #3195a6;
|
||||
color: #0e7c86;
|
||||
&::before,
|
||||
&::after {
|
||||
font-weight: bold;
|
||||
|
|
|
@ -2,5 +2,5 @@ import { css } from '../styled-components';
|
|||
|
||||
export const deprecatedCss = css`
|
||||
text-decoration: line-through;
|
||||
color: #bdccd3;
|
||||
color: #707070;
|
||||
`;
|
||||
|
|
|
@ -2,7 +2,7 @@ import styled from '../styled-components';
|
|||
import { PrismDiv } from './PrismDiv';
|
||||
|
||||
export const SampleControls = styled.div`
|
||||
opacity: 0.4;
|
||||
opacity: 0.7;
|
||||
transition: opacity 0.3s ease;
|
||||
text-align: right;
|
||||
&:focus-within {
|
||||
|
|
|
@ -64,7 +64,7 @@ export class Field extends React.Component<FieldProps> {
|
|||
onKeyPress={this.handleKeyPress}
|
||||
aria-label="expand properties"
|
||||
>
|
||||
{name}
|
||||
<span>{name}</span>
|
||||
<ShelfIcon direction={expanded ? 'down' : 'right'} />
|
||||
</button>
|
||||
{required && <RequiredLabel> required </RequiredLabel>}
|
||||
|
@ -72,7 +72,7 @@ export class Field extends React.Component<FieldProps> {
|
|||
) : (
|
||||
<PropertyNameCell className={deprecated ? 'deprecated' : undefined} kind={kind} title={name}>
|
||||
<PropertyBullet />
|
||||
{name}
|
||||
<span>{name}</span>
|
||||
{required && <RequiredLabel> required </RequiredLabel>}
|
||||
</PropertyNameCell>
|
||||
);
|
||||
|
|
|
@ -20,7 +20,7 @@ export const DropdownLabel = styled.span`
|
|||
top: -11px;
|
||||
left: 12px;
|
||||
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`
|
||||
|
|
|
@ -12,7 +12,7 @@ const AUTH_TYPES = {
|
|||
oauth2: 'OAuth2',
|
||||
apiKey: 'API Key',
|
||||
http: 'HTTP',
|
||||
openIdConnect: 'Open ID Connect',
|
||||
openIdConnect: 'OpenID Connect',
|
||||
};
|
||||
|
||||
export interface OAuthFlowProps {
|
||||
|
|
20
src/theme.ts
20
src/theme.ts
|
@ -12,7 +12,7 @@ const defaultTheme: ThemeInterface = {
|
|||
large: '105rem',
|
||||
},
|
||||
colors: {
|
||||
tonalOffset: 0.3,
|
||||
tonalOffset: 0.2,
|
||||
primary: {
|
||||
main: '#32329f',
|
||||
light: ({ colors }) => lighten(colors.tonalOffset, colors.primary.main),
|
||||
|
@ -68,15 +68,15 @@ const defaultTheme: ThemeInterface = {
|
|||
},
|
||||
},
|
||||
http: {
|
||||
get: '#6bbd5b',
|
||||
post: '#248fb2',
|
||||
put: '#9b708b',
|
||||
options: '#d3ca12',
|
||||
patch: '#e09d43',
|
||||
delete: '#e27a7a',
|
||||
basic: '#999',
|
||||
link: '#31bbb6',
|
||||
head: '#c167e4',
|
||||
get: '#2F8132',
|
||||
post: '#186FAF',
|
||||
put: '#95507c',
|
||||
options: '#947014',
|
||||
patch: '#bf581d',
|
||||
delete: '#cc3333',
|
||||
basic: '#707070',
|
||||
link: '#07818F',
|
||||
head: '#A23DAD',
|
||||
},
|
||||
},
|
||||
schema: {
|
||||
|
|
|
@ -335,7 +335,8 @@ describe('Utils', () => {
|
|||
min: number | undefined = undefined,
|
||||
max: 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', () => {
|
||||
expect(humanizeConstraints(itemConstraintSchema())).toHaveLength(0);
|
||||
|
@ -372,6 +373,12 @@ describe('Utils', () => {
|
|||
'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', () => {
|
||||
|
|
|
@ -448,6 +448,10 @@ export function humanizeConstraints(schema: OpenAPISchema): string[] {
|
|||
res.push(numberRange);
|
||||
}
|
||||
|
||||
if (schema.uniqueItems) {
|
||||
res.push('unique');
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user