@strapi/plugin-documentation 4.0.0-beta.17 → 4.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
EmptyStateLayout,
|
|
16
16
|
useFocusWhenNavigate,
|
|
17
17
|
} from '@strapi/helper-plugin';
|
|
18
|
+
import { Helmet } from 'react-helmet';
|
|
18
19
|
import { Button } from '@strapi/design-system/Button';
|
|
19
20
|
import { Layout, HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
|
|
20
21
|
import { Main } from '@strapi/design-system/Main';
|
|
@@ -68,14 +69,17 @@ const PluginPage = () => {
|
|
|
68
69
|
setShowConfirmDelete(!showConfirmDelete);
|
|
69
70
|
};
|
|
70
71
|
|
|
72
|
+
const title = formatMessage({
|
|
73
|
+
id: getTrad('plugin.name'),
|
|
74
|
+
defaultMessage: 'Documentation',
|
|
75
|
+
});
|
|
76
|
+
|
|
71
77
|
return (
|
|
72
78
|
<Layout>
|
|
73
|
-
<
|
|
79
|
+
<Helmet title={title} />
|
|
80
|
+
<Main aria-busy={isLoading}>
|
|
74
81
|
<HeaderLayout
|
|
75
|
-
title={
|
|
76
|
-
id: getTrad('plugin.name'),
|
|
77
|
-
defaultMessage: 'Documentation',
|
|
78
|
-
})}
|
|
82
|
+
title={title}
|
|
79
83
|
subtitle={formatMessage({
|
|
80
84
|
id: getTrad('pages.PluginPage.header.description'),
|
|
81
85
|
defaultMessage: 'Configure the documentation plugin',
|
|
@@ -449,9 +449,9 @@ describe('Plugin | Documentation | PluginPage', () => {
|
|
|
449
449
|
|
|
450
450
|
.c4 {
|
|
451
451
|
background: #f6f6f9;
|
|
452
|
-
padding-top:
|
|
452
|
+
padding-top: 40px;
|
|
453
453
|
padding-right: 56px;
|
|
454
|
-
padding-bottom:
|
|
454
|
+
padding-bottom: 40px;
|
|
455
455
|
padding-left: 56px;
|
|
456
456
|
}
|
|
457
457
|
|
|
@@ -514,7 +514,7 @@ describe('Plugin | Documentation | PluginPage', () => {
|
|
|
514
514
|
line-height: 1.5;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
.c3 {
|
|
517
|
+
.c3:focus-visible {
|
|
518
518
|
outline: none;
|
|
519
519
|
}
|
|
520
520
|
|
|
@@ -525,6 +525,7 @@ describe('Plugin | Documentation | PluginPage', () => {
|
|
|
525
525
|
class="c1 c2"
|
|
526
526
|
>
|
|
527
527
|
<main
|
|
528
|
+
aria-busy="false"
|
|
528
529
|
aria-labelledby="main-content-title"
|
|
529
530
|
class="c3"
|
|
530
531
|
id="main-content"
|
|
@@ -366,9 +366,9 @@ describe('Plugin | Documentation | SettingsPage', () => {
|
|
|
366
366
|
|
|
367
367
|
.c1 {
|
|
368
368
|
background: #f6f6f9;
|
|
369
|
-
padding-top:
|
|
369
|
+
padding-top: 40px;
|
|
370
370
|
padding-right: 56px;
|
|
371
|
-
padding-bottom:
|
|
371
|
+
padding-bottom: 40px;
|
|
372
372
|
padding-left: 56px;
|
|
373
373
|
}
|
|
374
374
|
|
|
@@ -422,7 +422,7 @@ describe('Plugin | Documentation | SettingsPage', () => {
|
|
|
422
422
|
line-height: 1.5;
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
-
.c0 {
|
|
425
|
+
.c0:focus-visible {
|
|
426
426
|
outline: none;
|
|
427
427
|
}
|
|
428
428
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-documentation",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.18",
|
|
4
4
|
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
|
|
5
5
|
"strapi": {
|
|
6
6
|
"displayName": "Documentation",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"test": "echo \"no tests yet\""
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@strapi/helper-plugin": "4.0.0-beta.
|
|
16
|
-
"@strapi/utils": "4.0.0-beta.
|
|
15
|
+
"@strapi/helper-plugin": "4.0.0-beta.18",
|
|
16
|
+
"@strapi/utils": "4.0.0-beta.18",
|
|
17
17
|
"bcryptjs": "2.4.3",
|
|
18
18
|
"cheerio": "^1.0.0-rc.5",
|
|
19
19
|
"fs-extra": "^9.1.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"npm": ">=6.0.0"
|
|
72
72
|
},
|
|
73
73
|
"license": "SEE LICENSE IN LICENSE",
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "3e9e3f13cb85822e6d92b0e448ae0b94d440dac1"
|
|
75
75
|
}
|
|
@@ -115,11 +115,15 @@ module.exports = ({ strapi }) => {
|
|
|
115
115
|
const apiDirPath = path.join(this.getApiDocumentationPath(api), version);
|
|
116
116
|
|
|
117
117
|
const apiDocPath = path.join(apiDirPath, `${apiName}.json`);
|
|
118
|
-
|
|
119
|
-
await fs.ensureFile(apiDocPath);
|
|
120
118
|
const apiPathsObject = builApiEndpointPath(api);
|
|
121
119
|
|
|
120
|
+
if (!apiPathsObject) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
await fs.ensureFile(apiDocPath);
|
|
122
125
|
await fs.writeJson(apiDocPath, apiPathsObject, { spaces: 2 });
|
|
126
|
+
|
|
123
127
|
paths = { ...paths, ...apiPathsObject.paths };
|
|
124
128
|
}
|
|
125
129
|
|