@strapi/plugin-documentation 4.3.8 → 4.3.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-documentation",
3
- "version": "4.3.8",
3
+ "version": "4.3.9",
4
4
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,8 +24,8 @@
24
24
  "test": "echo \"no tests yet\""
25
25
  },
26
26
  "dependencies": {
27
- "@strapi/helper-plugin": "4.3.8",
28
- "@strapi/utils": "4.3.8",
27
+ "@strapi/helper-plugin": "4.3.9",
28
+ "@strapi/utils": "4.3.9",
29
29
  "bcryptjs": "2.4.3",
30
30
  "cheerio": "^1.0.0-rc.12",
31
31
  "fs-extra": "10.0.0",
@@ -53,7 +53,7 @@
53
53
  "msw": "0.42.3"
54
54
  },
55
55
  "engines": {
56
- "node": ">=14.19.1 <=16.x.x",
56
+ "node": ">=14.19.1 <=18.x.x",
57
57
  "npm": ">=6.0.0"
58
58
  },
59
59
  "strapi": {
@@ -62,5 +62,5 @@
62
62
  "description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
63
63
  "kind": "plugin"
64
64
  },
65
- "gitHead": "c44f21d5ba95d3f2fbba239cf241081dddd54dd7"
65
+ "gitHead": "8ebf58d9edb62872acf88d19d1f878b4a1632ff7"
66
66
  }
@@ -15,12 +15,13 @@ module.exports = ({ strapi }) => {
15
15
 
16
16
  return {
17
17
  registerDoc(doc) {
18
+ let registeredDoc = doc;
18
19
  // parseYaml
19
20
  if (typeof doc === 'string') {
20
- doc = require('yaml').parse(doc);
21
+ registeredDoc = require('yaml').parse(registeredDoc);
21
22
  }
22
23
  // receive an object we can register it directly
23
- registeredDocs.push(doc);
24
+ registeredDocs.push(registeredDoc);
24
25
  },
25
26
  getDocumentationVersion() {
26
27
  return _.get(config, 'info.version');
@@ -46,7 +46,7 @@ const getPathParams = (routePath) => {
46
46
  description: '',
47
47
  deprecated: false,
48
48
  required: true,
49
- schema: { type: 'string' },
49
+ schema: { type: 'number' },
50
50
  };
51
51
  });
52
52
  };
@@ -102,7 +102,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
102
102
  [`${pascalCase(uniqueName)}LocalizationResponse`]: {
103
103
  type: 'object',
104
104
  properties: {
105
- id: { type: 'string' },
105
+ id: { type: 'number' },
106
106
  ...cleanSchemaAttributes(attributes, { addComponentSchema }),
107
107
  },
108
108
  },
@@ -118,7 +118,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
118
118
  [`${pascalCase(uniqueName)}ListResponseDataItem`]: {
119
119
  type: 'object',
120
120
  properties: {
121
- id: { type: 'string' },
121
+ id: { type: 'number' },
122
122
  attributes: {
123
123
  type: 'object',
124
124
  properties: cleanSchemaAttributes(attributes, {
@@ -133,7 +133,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
133
133
  [`${pascalCase(uniqueName)}ListResponseDataItemLocalized`]: {
134
134
  type: 'object',
135
135
  properties: {
136
- id: { type: 'string' },
136
+ id: { type: 'number' },
137
137
  attributes: {
138
138
  type: 'object',
139
139
  properties: cleanSchemaAttributes(attributes, { addComponentSchema }),
@@ -172,7 +172,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
172
172
  [`${pascalCase(uniqueName)}ResponseDataObject`]: {
173
173
  type: 'object',
174
174
  properties: {
175
- id: { type: 'string' },
175
+ id: { type: 'number' },
176
176
  attributes: {
177
177
  type: 'object',
178
178
  properties: cleanSchemaAttributes(attributes, {
@@ -187,7 +187,7 @@ const getAllSchemasForContentType = ({ routeInfo, attributes, uniqueName }) => {
187
187
  [`${pascalCase(uniqueName)}ResponseDataObjectLocalized`]: {
188
188
  type: 'object',
189
189
  properties: {
190
- id: { type: 'string' },
190
+ id: { type: 'number' },
191
191
  attributes: {
192
192
  type: 'object',
193
193
  properties: cleanSchemaAttributes(attributes, { addComponentSchema }),
@@ -97,7 +97,7 @@ const cleanSchemaAttributes = (
97
97
  const rawComponentSchema = {
98
98
  type: 'object',
99
99
  properties: {
100
- ...(isRequest ? {} : { id: { type: 'string' } }),
100
+ ...(isRequest ? {} : { id: { type: 'number' } }),
101
101
  ...cleanSchemaAttributes(componentAttributes, {
102
102
  typeMap,
103
103
  isRequest,
@@ -128,7 +128,7 @@ const cleanSchemaAttributes = (
128
128
  const rawComponentSchema = {
129
129
  type: 'object',
130
130
  properties: {
131
- ...(isRequest ? {} : { id: { type: 'string' } }),
131
+ ...(isRequest ? {} : { id: { type: 'number' } }),
132
132
  __component: { type: 'string' },
133
133
  ...cleanSchemaAttributes(componentAttributes, {
134
134
  typeMap,
@@ -15,7 +15,7 @@ module.exports = (isListOfEntities, attributes) => {
15
15
  items: {
16
16
  type: 'object',
17
17
  properties: {
18
- id: { type: 'string' },
18
+ id: { type: 'number' },
19
19
  attributes: { type: 'object', properties: attributes },
20
20
  },
21
21
  },
@@ -25,7 +25,7 @@ module.exports = (isListOfEntities, attributes) => {
25
25
  return {
26
26
  type: 'object',
27
27
  properties: {
28
- id: { type: 'string' },
28
+ id: { type: 'number' },
29
29
  attributes: { type: 'object', properties: attributes },
30
30
  },
31
31
  };
@@ -81,4 +81,15 @@ module.exports = [
81
81
  type: 'string',
82
82
  },
83
83
  },
84
+ {
85
+ name: 'filters',
86
+ in: 'query',
87
+ description: 'Filters to apply',
88
+ deprecated: false,
89
+ required: false,
90
+ schema: {
91
+ type: 'object',
92
+ },
93
+ style: 'deepObject',
94
+ },
84
95
  ];