File tree Expand file tree Collapse file tree 7 files changed +74
-15
lines changed
docusaurus-plugin-openapi
docusaurus-preset-openapi Expand file tree Collapse file tree 7 files changed +74
-15
lines changed Original file line number Diff line number Diff line change 1+ ## 0.4.0 (Dec 23, 2021)
2+
3+ High level enhancements
4+
5+ - Docusaurus beta.14 support
6+
7+ ``` js
8+ // Be sure to update @docusaurus/core:
9+ " dependencies" : {
10+ " @docusaurus/core" : " 2.0.0-beta.14" ,
11+ // ...
12+ }
13+ ```
14+
15+ - With the release of Docusaurus beta.14 (Thanks @slorber !), we can now support configuration of ` webpack-dev-server ` 's proxy via our ` docusaurus-plugin-proxy ` plugin.
16+
17+ This can be useful when you have a separate API backend development server and you want to send API requests on the same domain.
18+
19+ With the following, a request to ` /api/users ` will now proxy the request to ` http://localhost:3001/api/users ` :
20+
21+ ``` js
22+ // docusaurus.config.js
23+
24+ const config = {
25+ plugins: [[" docusaurus-plugin-proxy" , { " /api" : " http://localhost:3001" }]],
26+ // ...
27+ };
28+ ```
29+
30+ To proxy ` /api/users ` to ` http://localhost:3001/users ` , the path can be rewritten:
31+
32+ ``` js
33+ // docusaurus.config.js
34+
35+ const config = {
36+ plugins: [
37+ [
38+ " docusaurus-plugin-proxy" ,
39+ {
40+ " /api" : {
41+ target: " http://localhost:3001" ,
42+ pathRewrite: { " ^/api" : " " },
43+ },
44+ },
45+ ],
46+ ],
47+ // ...
48+ };
49+ ```
50+
51+ For more config options, see [ devServer.proxy] ( https://webpack.js.org/configuration/dev-server/#devserverproxy ) .
52+
53+ - Better yarn 3 support
54+
55+ Other enhancements and bug fixes
56+
57+ - Bump to beta 14 and fix proxy plugin ([ #120 ] ( https://github.com/cloud-annotations/docusaurus-plugin-openapi/pull/120 ) )
58+ - Fix dependency resolutions ([ #119 ] ( https://github.com/cloud-annotations/docusaurus-plugin-openapi/pull/119 ) )
59+
160## 0.3.1 (Dec 21, 2021)
261
362High level enhancements
Original file line number Diff line number Diff line change 11{
22 "name" : " demo" ,
3- "version" : " 0.3.1 " ,
3+ "version" : " 0.4.0 " ,
44 "private" : true ,
55 "scripts" : {
66 "docusaurus" : " docusaurus" ,
1818 "@mdx-js/react" : " ^1.6.21" ,
1919 "@svgr/webpack" : " ^5.5.0" ,
2020 "clsx" : " ^1.1.1" ,
21- "docusaurus-preset-openapi" : " ^0.3.1 " ,
21+ "docusaurus-preset-openapi" : " ^0.4.0 " ,
2222 "file-loader" : " ^6.2.0" ,
2323 "prism-react-renderer" : " ^1.2.1" ,
2424 "react" : " ^17.0.1" ,
Original file line number Diff line number Diff line change 11{
2- "version" : " 0.3.1 " ,
2+ "version" : " 0.4.0 " ,
33 "npmClient" : " yarn" ,
44 "useWorkspaces" : true
55}
Original file line number Diff line number Diff line change 11{
22 "name" : " docusaurus-plugin-openapi" ,
33 "description" : " OpenAPI plugin for Docusaurus." ,
4- "version" : " 0.3.1 " ,
4+ "version" : " 0.4.0 " ,
55 "license" : " MIT" ,
66 "publishConfig" : {
77 "access" : " public"
1717 "@docusaurus/types" : " ^2.0.0-beta.14" ,
1818 "@types/fs-extra" : " ^9.0.13" ,
1919 "@types/js-yaml" : " ^4.0.5" ,
20+ "@types/json-schema" : " ^7.0.9" ,
2021 "@types/lodash" : " ^4.14.176" ,
2122 "@types/postman-collection" : " ^3.5.3" ,
22- "@types/json-schema" : " ^7.0.9" ,
2323 "utility-types" : " ^3.10.0"
2424 },
2525 "dependencies" : {
Original file line number Diff line number Diff line change 11{
22 "name" : " docusaurus-plugin-proxy" ,
33 "description" : " A dev server proxy for Docusaurus." ,
4- "version" : " 0.3.1 " ,
4+ "version" : " 0.4.0 " ,
55 "license" : " MIT" ,
66 "publishConfig" : {
77 "access" : " public"
1313 "watch" : " tsc --watch"
1414 },
1515 "devDependencies" : {
16- "@types/webpack-dev-server " : " ^4.5.0 " ,
17- "@docusaurus/ types" : " ^2.0.0-beta.14 "
16+ "@docusaurus/types " : " ^2.0.0-beta.14 " ,
17+ "@types/webpack-dev-server " : " ^4.5.0 "
1818 },
1919 "engines" : {
2020 "node" : " >=14"
Original file line number Diff line number Diff line change 11{
22 "name" : " docusaurus-preset-openapi" ,
33 "description" : " OpenAPI preset for Docusaurus." ,
4- "version" : " 0.3.1 " ,
4+ "version" : " 0.4.0 " ,
55 "license" : " MIT" ,
66 "keywords" : [
77 " openapi" ,
2929 },
3030 "dependencies" : {
3131 "@docusaurus/preset-classic" : " ^2.0.0-beta.14" ,
32- "docusaurus-plugin-openapi" : " ^0.3.1 " ,
33- "docusaurus-plugin-proxy" : " ^0.3.1 " ,
34- "docusaurus-theme-openapi" : " ^0.3.1 "
32+ "docusaurus-plugin-openapi" : " ^0.4.0 " ,
33+ "docusaurus-plugin-proxy" : " ^0.4.0 " ,
34+ "docusaurus-theme-openapi" : " ^0.4.0 "
3535 },
3636 "peerDependencies" : {
3737 "react" : " ^16.8.4 || ^17.0.0" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " docusaurus-theme-openapi" ,
33 "description" : " OpenAPI theme for Docusaurus." ,
4- "version" : " 0.3.1 " ,
4+ "version" : " 0.4.0 " ,
55 "license" : " MIT" ,
66 "publishConfig" : {
77 "access" : " public"
2929 "dependencies" : {
3030 "@mdx-js/react" : " ^1.6.21" ,
3131 "@monaco-editor/react" : " ^4.3.1" ,
32- "monaco-editor" : " ^0.31.1" ,
3332 "buffer" : " ^6.0.3" ,
3433 "clsx" : " ^1.1.1" ,
35- "docusaurus-plugin-openapi" : " ^0.3.1 " ,
34+ "docusaurus-plugin-openapi" : " ^0.4.0 " ,
3635 "immer" : " ^9.0.6" ,
3736 "lodash" : " ^4.17.20" ,
37+ "monaco-editor" : " ^0.31.1" ,
3838 "postman-code-generators" : " ^1.0.0" ,
3939 "postman-collection" : " ^4.1.0" ,
4040 "prism-react-renderer" : " ^1.2.1" ,
You can’t perform that action at this time.
0 commit comments