@strapi/plugin-documentation 5.43.0 → 5.44.0
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/dist/admin/translations/cs.json.js +24 -3
- package/dist/admin/translations/cs.json.js.map +1 -1
- package/dist/admin/translations/cs.json.mjs +24 -3
- package/dist/admin/translations/cs.json.mjs.map +1 -1
- package/dist/server/services/helpers/build-api-endpoint-path.js +1 -1
- package/dist/server/services/helpers/build-api-endpoint-path.js.map +1 -1
- package/dist/server/services/helpers/build-api-endpoint-path.mjs +1 -1
- package/dist/server/services/helpers/build-api-endpoint-path.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var cs = {
|
|
4
|
+
"coming-soon": "Tento obsah se právě připravuje a za několik týdnů bude zpět!",
|
|
4
5
|
"components.Row.open": "Otevřený",
|
|
5
6
|
"components.Row.regenerate": "Znovu vygenerovat",
|
|
6
7
|
"containers.HomePage.Block.title": "Verze",
|
|
@@ -8,18 +9,38 @@ var cs = {
|
|
|
8
9
|
"containers.HomePage.PluginHeader.title": "Dokumentace — Nastavení",
|
|
9
10
|
"containers.HomePage.PopUpWarning.confirm": "Rozumím",
|
|
10
11
|
"containers.HomePage.PopUpWarning.message": "Jste si jisti, že chcete odstranit tuto verzi?",
|
|
12
|
+
"containers.HomePage.copied": "Token byl zkopírován do schránky",
|
|
13
|
+
"containers.HomePage.form.jwtToken": "Získat váš JWT token",
|
|
14
|
+
"containers.HomePage.form.jwtToken.description": "Zkopírujte tento token a použijte jej ve Swaggeru pro odesílání požadavků",
|
|
11
15
|
"containers.HomePage.form.password": "Heslo",
|
|
12
16
|
"containers.HomePage.form.password.inputDescription": "Nastavit heslo pro přístup k dokumentaci.",
|
|
13
17
|
"containers.HomePage.form.restrictedAccess": "Omezený přístup",
|
|
14
18
|
"containers.HomePage.form.restrictedAccess.inputDescription": "Omezit přístup k endpointu dokumentace. Ve výchozím nastavení je přístup veřejný.",
|
|
15
19
|
"containers.HomePage.form.showGeneratedFiles": "Zobrazit vygenerované soubory",
|
|
16
20
|
"containers.HomePage.form.showGeneratedFiles.inputDescription": "Užitečné, pokud chcete přepsat vygenerovanou dokumentaci. \nPokud povolíte tuto možnost, úpravy vaší dokumentace budou snazší.",
|
|
17
|
-
"error.deleteDoc.versionMissing": "Verze kterou se snažíte odstranit neexistuje.",
|
|
21
|
+
"error.deleteDoc.versionMissing": "Verze, kterou se snažíte odstranit, neexistuje.",
|
|
18
22
|
"error.noVersion": "Verze je vyžadována",
|
|
19
23
|
"error.regenerateDoc": "Při pokusu o vygenerování dokumentace došlo k chybě",
|
|
20
|
-
"error.regenerateDoc.versionMissing": "Verze kterou se snažíte vygenerovat neexistuje.",
|
|
24
|
+
"error.regenerateDoc.versionMissing": "Verze, kterou se snažíte vygenerovat, neexistuje.",
|
|
25
|
+
"notification.delete.success": "Dokumentace byla odstraněna",
|
|
26
|
+
"notification.generate.success": "Dokumentace byla vygenerována",
|
|
21
27
|
"notification.update.success": "Nastavení bylo úspěšně uloženo",
|
|
22
|
-
"
|
|
28
|
+
"pages.PluginPage.Button.open": "Otevřít dokumentaci",
|
|
29
|
+
"pages.PluginPage.header.description": "Nakonfigurujte plugin dokumentace",
|
|
30
|
+
"pages.PluginPage.table.generated": "Naposledy vygenerováno",
|
|
31
|
+
"pages.PluginPage.table.icon.regenerate": "Znovu vygenerovat {target}",
|
|
32
|
+
"pages.PluginPage.table.icon.show": "Otevřít {target}",
|
|
33
|
+
"pages.PluginPage.table.version": "Verze",
|
|
34
|
+
"pages.SettingsPage.header.description": "Nakonfigurujte plugin dokumentace",
|
|
35
|
+
"pages.SettingsPage.header.save": "Uložit",
|
|
36
|
+
"pages.SettingsPage.toggle.hint": "Nastavte endpoint dokumentace jako soukromý",
|
|
37
|
+
"pages.SettingsPage.toggle.label": "Omezený přístup",
|
|
38
|
+
"plugin.description.long": "Vytvořte dokument OpenAPI a zobrazte své API pomocí SWAGGER UI.",
|
|
39
|
+
"plugin.description.short": "Vytvořte dokument OpenAPI a zobrazte své API pomocí SWAGGER UI.",
|
|
40
|
+
"plugin.name": "Dokumentace",
|
|
41
|
+
"Input.error.contain.lowercase": "Heslo musí obsahovat alespoň jedno malé písmeno",
|
|
42
|
+
"Input.error.contain.number": "Heslo musí obsahovat alespoň jednu číslici",
|
|
43
|
+
"Input.error.contain.uppercase": "Heslo musí obsahovat alespoň jedno velké písmeno"
|
|
23
44
|
};
|
|
24
45
|
|
|
25
46
|
module.exports = cs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var cs = {
|
|
2
|
+
"coming-soon": "Tento obsah se právě připravuje a za několik týdnů bude zpět!",
|
|
2
3
|
"components.Row.open": "Otevřený",
|
|
3
4
|
"components.Row.regenerate": "Znovu vygenerovat",
|
|
4
5
|
"containers.HomePage.Block.title": "Verze",
|
|
@@ -6,18 +7,38 @@ var cs = {
|
|
|
6
7
|
"containers.HomePage.PluginHeader.title": "Dokumentace — Nastavení",
|
|
7
8
|
"containers.HomePage.PopUpWarning.confirm": "Rozumím",
|
|
8
9
|
"containers.HomePage.PopUpWarning.message": "Jste si jisti, že chcete odstranit tuto verzi?",
|
|
10
|
+
"containers.HomePage.copied": "Token byl zkopírován do schránky",
|
|
11
|
+
"containers.HomePage.form.jwtToken": "Získat váš JWT token",
|
|
12
|
+
"containers.HomePage.form.jwtToken.description": "Zkopírujte tento token a použijte jej ve Swaggeru pro odesílání požadavků",
|
|
9
13
|
"containers.HomePage.form.password": "Heslo",
|
|
10
14
|
"containers.HomePage.form.password.inputDescription": "Nastavit heslo pro přístup k dokumentaci.",
|
|
11
15
|
"containers.HomePage.form.restrictedAccess": "Omezený přístup",
|
|
12
16
|
"containers.HomePage.form.restrictedAccess.inputDescription": "Omezit přístup k endpointu dokumentace. Ve výchozím nastavení je přístup veřejný.",
|
|
13
17
|
"containers.HomePage.form.showGeneratedFiles": "Zobrazit vygenerované soubory",
|
|
14
18
|
"containers.HomePage.form.showGeneratedFiles.inputDescription": "Užitečné, pokud chcete přepsat vygenerovanou dokumentaci. \nPokud povolíte tuto možnost, úpravy vaší dokumentace budou snazší.",
|
|
15
|
-
"error.deleteDoc.versionMissing": "Verze kterou se snažíte odstranit neexistuje.",
|
|
19
|
+
"error.deleteDoc.versionMissing": "Verze, kterou se snažíte odstranit, neexistuje.",
|
|
16
20
|
"error.noVersion": "Verze je vyžadována",
|
|
17
21
|
"error.regenerateDoc": "Při pokusu o vygenerování dokumentace došlo k chybě",
|
|
18
|
-
"error.regenerateDoc.versionMissing": "Verze kterou se snažíte vygenerovat neexistuje.",
|
|
22
|
+
"error.regenerateDoc.versionMissing": "Verze, kterou se snažíte vygenerovat, neexistuje.",
|
|
23
|
+
"notification.delete.success": "Dokumentace byla odstraněna",
|
|
24
|
+
"notification.generate.success": "Dokumentace byla vygenerována",
|
|
19
25
|
"notification.update.success": "Nastavení bylo úspěšně uloženo",
|
|
20
|
-
"
|
|
26
|
+
"pages.PluginPage.Button.open": "Otevřít dokumentaci",
|
|
27
|
+
"pages.PluginPage.header.description": "Nakonfigurujte plugin dokumentace",
|
|
28
|
+
"pages.PluginPage.table.generated": "Naposledy vygenerováno",
|
|
29
|
+
"pages.PluginPage.table.icon.regenerate": "Znovu vygenerovat {target}",
|
|
30
|
+
"pages.PluginPage.table.icon.show": "Otevřít {target}",
|
|
31
|
+
"pages.PluginPage.table.version": "Verze",
|
|
32
|
+
"pages.SettingsPage.header.description": "Nakonfigurujte plugin dokumentace",
|
|
33
|
+
"pages.SettingsPage.header.save": "Uložit",
|
|
34
|
+
"pages.SettingsPage.toggle.hint": "Nastavte endpoint dokumentace jako soukromý",
|
|
35
|
+
"pages.SettingsPage.toggle.label": "Omezený přístup",
|
|
36
|
+
"plugin.description.long": "Vytvořte dokument OpenAPI a zobrazte své API pomocí SWAGGER UI.",
|
|
37
|
+
"plugin.description.short": "Vytvořte dokument OpenAPI a zobrazte své API pomocí SWAGGER UI.",
|
|
38
|
+
"plugin.name": "Dokumentace",
|
|
39
|
+
"Input.error.contain.lowercase": "Heslo musí obsahovat alespoň jedno malé písmeno",
|
|
40
|
+
"Input.error.contain.number": "Heslo musí obsahovat alespoň jednu číslici",
|
|
41
|
+
"Input.error.contain.uppercase": "Heslo musí obsahovat alespoň jedno velké písmeno"
|
|
21
42
|
};
|
|
22
43
|
|
|
23
44
|
export { cs as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-api-endpoint-path.js","sources":["../../../../server/src/services/helpers/build-api-endpoint-path.ts"],"sourcesContent":["import _ from 'lodash';\nimport * as pathToRegexp from 'path-to-regexp';\n\nimport type { Core } from '@strapi/types';\nimport type { OpenAPIV3 } from 'openapi-types';\n\nimport pascalCase from './utils/pascal-case';\nimport queryParams from './utils/query-params';\nimport loopContentTypeNames from './utils/loop-content-type-names';\nimport getApiResponses from './utils/get-api-responses';\nimport { hasFindMethod } from './utils/routes';\n\nimport type { Api, ApiInfo } from '../../types';\n\n/**\n * @description Parses a route with ':variable'\n *\n * @param {string} routePath - The route's path property\n * @returns {string}\n */\nconst parsePathWithVariables = (routePath: string): string => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens\n .map((token) => {\n switch (token.type) {\n case 'text':\n return token.value;\n case 'param':\n return `{${token.name}}`;\n case 'wildcard':\n return `{${token.name}}`;\n case 'group':\n // Handle group tokens by mapping them within the same function context\n return `(${parsePathWithVariables(token.tokens.map((t) => t satisfies pathToRegexp.Token).join(''))})`;\n default:\n throw new Error(`Unknown token type: ${(token as any).type}`);\n }\n })\n .join('');\n};\n\n/**\n * @description Builds the required object for a path parameter\n *\n * @param {string} routePath - The route's path property\n *\n * @returns {object } Swagger path params object\n */\nconst getPathParams = (routePath: string): OpenAPIV3.ParameterObject[] => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens.reduce((acc, param) => {\n // Skip non-parameter tokens\n if (param.type !== 'param') {\n return acc;\n }\n\n acc.push({\n name: `${param.name}`,\n in: 'path',\n description: '',\n deprecated: false,\n required: true,\n schema: { type: 'number' },\n });\n\n return acc;\n }, [] as OpenAPIV3.ParameterObject[]);\n};\n\nconst getPathWithPrefix = (prefix: string | undefined, route: Core.Route) => {\n // When the prefix is set on the routes and\n // the current route is not trying to remove it\n if (prefix && !_.has(route.config, 'prefix')) {\n // Add the prefix to the path\n return prefix.concat(route.path);\n }\n\n // Otherwise just return path\n return route.path;\n};\n\n/**\n * @description Gets all paths based on routes\n *\n * @param {object} apiInfo\n * @property {object} apiInfo.routeInfo - The api routes object\n * @property {string} apiInfo.uniqueName - Content type name | Api name + Content type name\n * @property {object} apiInfo.contentTypeInfo - The info object found on content type schemas\n *\n * @returns {object}\n */\nconst getPaths = ({ routeInfo, uniqueName, contentTypeInfo, kind }: ApiInfo) => {\n // Get the routes for the current content type\n const contentTypeRoutes = routeInfo.routes.filter((route) => {\n return (\n route.path.includes(contentTypeInfo.pluralName) ||\n route.path.includes(contentTypeInfo.singularName)\n );\n });\n\n const paths = contentTypeRoutes.reduce((acc: any, route: Core.Route) => {\n // TODO: Find a more reliable way to determine list of entities vs a single entity\n const isListOfEntities = hasFindMethod(route.handler);\n const methodVerb = route.method.toLowerCase();\n const hasPathParams = route.path.includes('/:');\n const pathWithPrefix = getPathWithPrefix(routeInfo.prefix, route);\n const routePath = hasPathParams ? parsePathWithVariables(pathWithPrefix) : pathWithPrefix;\n\n const responses = getApiResponses({\n uniqueName,\n route,\n isListOfEntities: kind !== 'singleType' && isListOfEntities,\n });\n\n const swaggerConfig: OpenAPIV3.OperationObject = {\n responses,\n tags: [_.upperFirst(uniqueName)],\n parameters: [],\n operationId: `${methodVerb}${routePath}`,\n };\n\n if (isListOfEntities) {\n swaggerConfig.parameters?.push(...queryParams);\n }\n\n if (hasPathParams) {\n const pathParams = getPathParams(route.path);\n swaggerConfig.parameters?.push(...pathParams);\n }\n\n if (['post', 'put'].includes(methodVerb)) {\n const refName = 'Request';\n const requestBody = {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: `#/components/schemas/${pascalCase(uniqueName)}${refName}`,\n },\n },\n },\n };\n\n swaggerConfig.requestBody = requestBody;\n }\n\n _.set(acc, `${routePath}.${methodVerb}`, swaggerConfig);\n\n return acc;\n }, {});\n\n return paths;\n};\n\n/**\n * @description - Builds the Swagger paths object for each api\n */\nconst buildApiEndpointPath = (api: Api) => {\n // A reusable loop for building paths and component schemas\n // Uses the api param to build a new set of params for each content type\n // Passes these new params to the function provided\n return loopContentTypeNames(api, getPaths);\n};\n\nexport default buildApiEndpointPath;\n"],"names":["parsePathWithVariables","routePath","tokens","pathToRegexp","parse","map","token","type","value","name","t","join","Error","getPathParams","reduce","acc","param","push","in","description","deprecated","required","schema","getPathWithPrefix","prefix","route","_","has","config","concat","path","getPaths","routeInfo","uniqueName","contentTypeInfo","kind","contentTypeRoutes","routes","filter","includes","pluralName","singularName","paths","isListOfEntities","hasFindMethod","handler","methodVerb","method","toLowerCase","hasPathParams","pathWithPrefix","responses","getApiResponses","swaggerConfig","tags","upperFirst","parameters","operationId","queryParams","pathParams","refName","requestBody","content","$ref","pascalCase","set","buildApiEndpointPath","api","loopContentTypeNames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;IAMA,MAAMA,yBAAyB,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ACJC,WAAAA,EAAa,EAAA;YACbC,UAAAA,EAAY,KAAA;YACZC,QAAAA,EAAU,IAAA;YACVC,MAAAA,EAAQ;
|
|
1
|
+
{"version":3,"file":"build-api-endpoint-path.js","sources":["../../../../server/src/services/helpers/build-api-endpoint-path.ts"],"sourcesContent":["import _ from 'lodash';\nimport * as pathToRegexp from 'path-to-regexp';\n\nimport type { Core } from '@strapi/types';\nimport type { OpenAPIV3 } from 'openapi-types';\n\nimport pascalCase from './utils/pascal-case';\nimport queryParams from './utils/query-params';\nimport loopContentTypeNames from './utils/loop-content-type-names';\nimport getApiResponses from './utils/get-api-responses';\nimport { hasFindMethod } from './utils/routes';\n\nimport type { Api, ApiInfo } from '../../types';\n\n/**\n * @description Parses a route with ':variable'\n *\n * @param {string} routePath - The route's path property\n * @returns {string}\n */\nconst parsePathWithVariables = (routePath: string): string => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens\n .map((token) => {\n switch (token.type) {\n case 'text':\n return token.value;\n case 'param':\n return `{${token.name}}`;\n case 'wildcard':\n return `{${token.name}}`;\n case 'group':\n // Handle group tokens by mapping them within the same function context\n return `(${parsePathWithVariables(token.tokens.map((t) => t satisfies pathToRegexp.Token).join(''))})`;\n default:\n throw new Error(`Unknown token type: ${(token as any).type}`);\n }\n })\n .join('');\n};\n\n/**\n * @description Builds the required object for a path parameter\n *\n * @param {string} routePath - The route's path property\n *\n * @returns {object } Swagger path params object\n */\nconst getPathParams = (routePath: string): OpenAPIV3.ParameterObject[] => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens.reduce((acc, param) => {\n // Skip non-parameter tokens\n if (param.type !== 'param') {\n return acc;\n }\n\n acc.push({\n name: `${param.name}`,\n in: 'path',\n description: '',\n deprecated: false,\n required: true,\n schema: { type: param.name === 'id' ? 'string' : 'number' },\n });\n\n return acc;\n }, [] as OpenAPIV3.ParameterObject[]);\n};\n\nconst getPathWithPrefix = (prefix: string | undefined, route: Core.Route) => {\n // When the prefix is set on the routes and\n // the current route is not trying to remove it\n if (prefix && !_.has(route.config, 'prefix')) {\n // Add the prefix to the path\n return prefix.concat(route.path);\n }\n\n // Otherwise just return path\n return route.path;\n};\n\n/**\n * @description Gets all paths based on routes\n *\n * @param {object} apiInfo\n * @property {object} apiInfo.routeInfo - The api routes object\n * @property {string} apiInfo.uniqueName - Content type name | Api name + Content type name\n * @property {object} apiInfo.contentTypeInfo - The info object found on content type schemas\n *\n * @returns {object}\n */\nconst getPaths = ({ routeInfo, uniqueName, contentTypeInfo, kind }: ApiInfo) => {\n // Get the routes for the current content type\n const contentTypeRoutes = routeInfo.routes.filter((route) => {\n return (\n route.path.includes(contentTypeInfo.pluralName) ||\n route.path.includes(contentTypeInfo.singularName)\n );\n });\n\n const paths = contentTypeRoutes.reduce((acc: any, route: Core.Route) => {\n // TODO: Find a more reliable way to determine list of entities vs a single entity\n const isListOfEntities = hasFindMethod(route.handler);\n const methodVerb = route.method.toLowerCase();\n const hasPathParams = route.path.includes('/:');\n const pathWithPrefix = getPathWithPrefix(routeInfo.prefix, route);\n const routePath = hasPathParams ? parsePathWithVariables(pathWithPrefix) : pathWithPrefix;\n\n const responses = getApiResponses({\n uniqueName,\n route,\n isListOfEntities: kind !== 'singleType' && isListOfEntities,\n });\n\n const swaggerConfig: OpenAPIV3.OperationObject = {\n responses,\n tags: [_.upperFirst(uniqueName)],\n parameters: [],\n operationId: `${methodVerb}${routePath}`,\n };\n\n if (isListOfEntities) {\n swaggerConfig.parameters?.push(...queryParams);\n }\n\n if (hasPathParams) {\n const pathParams = getPathParams(route.path);\n swaggerConfig.parameters?.push(...pathParams);\n }\n\n if (['post', 'put'].includes(methodVerb)) {\n const refName = 'Request';\n const requestBody = {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: `#/components/schemas/${pascalCase(uniqueName)}${refName}`,\n },\n },\n },\n };\n\n swaggerConfig.requestBody = requestBody;\n }\n\n _.set(acc, `${routePath}.${methodVerb}`, swaggerConfig);\n\n return acc;\n }, {});\n\n return paths;\n};\n\n/**\n * @description - Builds the Swagger paths object for each api\n */\nconst buildApiEndpointPath = (api: Api) => {\n // A reusable loop for building paths and component schemas\n // Uses the api param to build a new set of params for each content type\n // Passes these new params to the function provided\n return loopContentTypeNames(api, getPaths);\n};\n\nexport default buildApiEndpointPath;\n"],"names":["parsePathWithVariables","routePath","tokens","pathToRegexp","parse","map","token","type","value","name","t","join","Error","getPathParams","reduce","acc","param","push","in","description","deprecated","required","schema","getPathWithPrefix","prefix","route","_","has","config","concat","path","getPaths","routeInfo","uniqueName","contentTypeInfo","kind","contentTypeRoutes","routes","filter","includes","pluralName","singularName","paths","isListOfEntities","hasFindMethod","handler","methodVerb","method","toLowerCase","hasPathParams","pathWithPrefix","responses","getApiResponses","swaggerConfig","tags","upperFirst","parameters","operationId","queryParams","pathParams","refName","requestBody","content","$ref","pascalCase","set","buildApiEndpointPath","api","loopContentTypeNames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;;;;IAMA,MAAMA,yBAAyB,CAACC,SAAAA,GAAAA;AAC9B,IAAA,MAAM,EAAEC,MAAM,EAAE,GAAGC,uBAAAA,CAAaC,KAAK,CAACH,SAAAA,CAAAA;IAEtC,OAAOC,MAAAA,CACJG,GAAG,CAAC,CAACC,KAAAA,GAAAA;AACJ,QAAA,OAAQA,MAAMC,IAAI;YAChB,KAAK,MAAA;AACH,gBAAA,OAAOD,MAAME,KAAK;YACpB,KAAK,OAAA;AACH,gBAAA,OAAO,CAAC,CAAC,EAAEF,MAAMG,IAAI,CAAC,CAAC,CAAC;YAC1B,KAAK,UAAA;AACH,gBAAA,OAAO,CAAC,CAAC,EAAEH,MAAMG,IAAI,CAAC,CAAC,CAAC;YAC1B,KAAK,OAAA;;AAEH,gBAAA,OAAO,CAAC,CAAC,EAAET,sBAAAA,CAAuBM,KAAAA,CAAMJ,MAAM,CAACG,GAAG,CAAC,CAACK,IAAMA,CAAAA,CAAAA,CAAgCC,IAAI,CAAC,EAAA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ers/build-api-endpoint-path.ts"],"sourcesContent":["import _ from 'lodash';\nimport * as pathToRegexp from 'path-to-regexp';\n\nimport type { Core } from '@strapi/types';\nimport type { OpenAPIV3 } from 'openapi-types';\n\nimport pascalCase from './utils/pascal-case';\nimport queryParams from './utils/query-params';\nimport loopContentTypeNames from './utils/loop-content-type-names';\nimport getApiResponses from './utils/get-api-responses';\nimport { hasFindMethod } from './utils/routes';\n\nimport type { Api, ApiInfo } from '../../types';\n\n/**\n * @description Parses a route with ':variable'\n *\n * @param {string} routePath - The route's path property\n * @returns {string}\n */\nconst parsePathWithVariables = (routePath: string): string => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens\n .map((token) => {\n switch (token.type) {\n case 'text':\n return token.value;\n case 'param':\n return `{${token.name}}`;\n case 'wildcard':\n return `{${token.name}}`;\n case 'group':\n // Handle group tokens by mapping them within the same function context\n return `(${parsePathWithVariables(token.tokens.map((t) => t satisfies pathToRegexp.Token).join(''))})`;\n default:\n throw new Error(`Unknown token type: ${(token as any).type}`);\n }\n })\n .join('');\n};\n\n/**\n * @description Builds the required object for a path parameter\n *\n * @param {string} routePath - The route's path property\n *\n * @returns {object } Swagger path params object\n */\nconst getPathParams = (routePath: string): OpenAPIV3.ParameterObject[] => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens.reduce((acc, param) => {\n // Skip non-parameter tokens\n if (param.type !== 'param') {\n return acc;\n }\n\n acc.push({\n name: `${param.name}`,\n in: 'path',\n description: '',\n deprecated: false,\n required: true,\n schema: { type: 'number' },\n });\n\n return acc;\n }, [] as OpenAPIV3.ParameterObject[]);\n};\n\nconst getPathWithPrefix = (prefix: string | undefined, route: Core.Route) => {\n // When the prefix is set on the routes and\n // the current route is not trying to remove it\n if (prefix && !_.has(route.config, 'prefix')) {\n // Add the prefix to the path\n return prefix.concat(route.path);\n }\n\n // Otherwise just return path\n return route.path;\n};\n\n/**\n * @description Gets all paths based on routes\n *\n * @param {object} apiInfo\n * @property {object} apiInfo.routeInfo - The api routes object\n * @property {string} apiInfo.uniqueName - Content type name | Api name + Content type name\n * @property {object} apiInfo.contentTypeInfo - The info object found on content type schemas\n *\n * @returns {object}\n */\nconst getPaths = ({ routeInfo, uniqueName, contentTypeInfo, kind }: ApiInfo) => {\n // Get the routes for the current content type\n const contentTypeRoutes = routeInfo.routes.filter((route) => {\n return (\n route.path.includes(contentTypeInfo.pluralName) ||\n route.path.includes(contentTypeInfo.singularName)\n );\n });\n\n const paths = contentTypeRoutes.reduce((acc: any, route: Core.Route) => {\n // TODO: Find a more reliable way to determine list of entities vs a single entity\n const isListOfEntities = hasFindMethod(route.handler);\n const methodVerb = route.method.toLowerCase();\n const hasPathParams = route.path.includes('/:');\n const pathWithPrefix = getPathWithPrefix(routeInfo.prefix, route);\n const routePath = hasPathParams ? parsePathWithVariables(pathWithPrefix) : pathWithPrefix;\n\n const responses = getApiResponses({\n uniqueName,\n route,\n isListOfEntities: kind !== 'singleType' && isListOfEntities,\n });\n\n const swaggerConfig: OpenAPIV3.OperationObject = {\n responses,\n tags: [_.upperFirst(uniqueName)],\n parameters: [],\n operationId: `${methodVerb}${routePath}`,\n };\n\n if (isListOfEntities) {\n swaggerConfig.parameters?.push(...queryParams);\n }\n\n if (hasPathParams) {\n const pathParams = getPathParams(route.path);\n swaggerConfig.parameters?.push(...pathParams);\n }\n\n if (['post', 'put'].includes(methodVerb)) {\n const refName = 'Request';\n const requestBody = {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: `#/components/schemas/${pascalCase(uniqueName)}${refName}`,\n },\n },\n },\n };\n\n swaggerConfig.requestBody = requestBody;\n }\n\n _.set(acc, `${routePath}.${methodVerb}`, swaggerConfig);\n\n return acc;\n }, {});\n\n return paths;\n};\n\n/**\n * @description - Builds the Swagger paths object for each api\n */\nconst buildApiEndpointPath = (api: Api) => {\n // A reusable loop for building paths and component schemas\n // Uses the api param to build a new set of params for each content type\n // Passes these new params to the function provided\n return loopContentTypeNames(api, getPaths);\n};\n\nexport default buildApiEndpointPath;\n"],"names":["parsePathWithVariables","routePath","tokens","pathToRegexp","parse","map","token","type","value","name","t","join","Error","getPathParams","reduce","acc","param","push","in","description","deprecated","required","schema","getPathWithPrefix","prefix","route","_","has","config","concat","path","getPaths","routeInfo","uniqueName","contentTypeInfo","kind","contentTypeRoutes","routes","filter","includes","pluralName","singularName","paths","isListOfEntities","hasFindMethod","handler","methodVerb","method","toLowerCase","hasPathParams","pathWithPrefix","responses","getApiResponses","swaggerConfig","tags","upperFirst","parameters","operationId","queryParams","pathParams","refName","requestBody","content","$ref","pascalCase","set","buildApiEndpointPath","api","loopContentTypeNames"],"mappings":";;;;;;;;AAcA;;;;;IAMA,MAAMA,yBAAyB,CAACC,SAAAA,GAAAA;AAC9B,IAAA,MAAM,EAAEC,MAAM,EAAE,GAAGC,YAAAA,CAAaC,KAAK,CAACH,SAAAA,CAAAA;IAEtC,OAAOC,MAAAA,CACJG,GAAG,CAAC,CAACC,KAAAA,GAAAA;AACJ,QAAA,OAAQA,MAAMC,IAAI;YAChB,KAAK,MAAA;AACH,gBAAA,OAAOD,MAAME,KAAK;YACpB,KAAK,OAAA;AACH,gBAAA,OAAO,CAAC,CAAC,EAAEF,MAAMG,IAAI,CAAC,CAAC,CAAC;YAC1B,KAAK,UAAA;AACH,gBAAA,OAAO,CAAC,CAAC,EAAEH,MAAMG,IAAI,CAAC,CAAC,CAAC;YAC1B,KAAK,OAAA;;AAEH,gBAAA,OAAO,CAAC,CAAC,EAAET,sBAAAA,CAAuBM,KAAAA,CAAMJ,MAAM,CAACG,GAAG,CAAC,CAACK,IAAMA,CAAAA,CAAAA,CAAgCC,IAAI,CAAC,EAAA,CAAA,CAAA,CAAK,CAAC,CAAC;AACxG,YAAA;gBACE,MAAM,IAAIC,MAAM,CAAC,oBAAoB,EAAE,KAACN,CAAcC,IAAI,CAAA,CAAE,CAAA;AAChE;AACF,IAAA,CAAA,CAAA,CACCI,IAAI,CAAC,EAAA,CAAA;AACV,CAAA;AAEA;;;;;;IAOA,MAAME,gBAAgB,CAACZ,SAAAA,GAAAA;AACrB,IAAA,MAAM,EAAEC,MAAM,EAAE,GAAGC,YAAAA,CAAaC,KAAK,CAACH,SAAAA,CAAAA;AAEtC,IAAA,OAAOC,MAAAA,CAAOY,MAAM,CAAC,CAACC,GAAAA,EAAKC,KAAAA,GAAAA;;QAEzB,IAAIA,KAAAA,CAAMT,IAAI,KAAK,OAAA,EAAS;YAC1B,OAAOQ,GAAAA;AACT,QAAA;AAEAA,QAAAA,GAAAA,CAAIE,IAAI,CAAC;YACPR,IAAAA,EAAM,CAAA,EAAGO,KAAAA,CAAMP,IAAI,CAAA,CAAE;YACrBS,EAAAA,EAAI,MAAA;YACJC,WAAAA,EAAa,EAAA;YACbC,UAAAA,EAAY,KAAA;YACZC,QAAAA,EAAU,IAAA;YACVC,MAAAA,EAAQ;
|
|
1
|
+
{"version":3,"file":"build-api-endpoint-path.mjs","sources":["../../../../server/src/services/helpers/build-api-endpoint-path.ts"],"sourcesContent":["import _ from 'lodash';\nimport * as pathToRegexp from 'path-to-regexp';\n\nimport type { Core } from '@strapi/types';\nimport type { OpenAPIV3 } from 'openapi-types';\n\nimport pascalCase from './utils/pascal-case';\nimport queryParams from './utils/query-params';\nimport loopContentTypeNames from './utils/loop-content-type-names';\nimport getApiResponses from './utils/get-api-responses';\nimport { hasFindMethod } from './utils/routes';\n\nimport type { Api, ApiInfo } from '../../types';\n\n/**\n * @description Parses a route with ':variable'\n *\n * @param {string} routePath - The route's path property\n * @returns {string}\n */\nconst parsePathWithVariables = (routePath: string): string => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens\n .map((token) => {\n switch (token.type) {\n case 'text':\n return token.value;\n case 'param':\n return `{${token.name}}`;\n case 'wildcard':\n return `{${token.name}}`;\n case 'group':\n // Handle group tokens by mapping them within the same function context\n return `(${parsePathWithVariables(token.tokens.map((t) => t satisfies pathToRegexp.Token).join(''))})`;\n default:\n throw new Error(`Unknown token type: ${(token as any).type}`);\n }\n })\n .join('');\n};\n\n/**\n * @description Builds the required object for a path parameter\n *\n * @param {string} routePath - The route's path property\n *\n * @returns {object } Swagger path params object\n */\nconst getPathParams = (routePath: string): OpenAPIV3.ParameterObject[] => {\n const { tokens } = pathToRegexp.parse(routePath);\n\n return tokens.reduce((acc, param) => {\n // Skip non-parameter tokens\n if (param.type !== 'param') {\n return acc;\n }\n\n acc.push({\n name: `${param.name}`,\n in: 'path',\n description: '',\n deprecated: false,\n required: true,\n schema: { type: param.name === 'id' ? 'string' : 'number' },\n });\n\n return acc;\n }, [] as OpenAPIV3.ParameterObject[]);\n};\n\nconst getPathWithPrefix = (prefix: string | undefined, route: Core.Route) => {\n // When the prefix is set on the routes and\n // the current route is not trying to remove it\n if (prefix && !_.has(route.config, 'prefix')) {\n // Add the prefix to the path\n return prefix.concat(route.path);\n }\n\n // Otherwise just return path\n return route.path;\n};\n\n/**\n * @description Gets all paths based on routes\n *\n * @param {object} apiInfo\n * @property {object} apiInfo.routeInfo - The api routes object\n * @property {string} apiInfo.uniqueName - Content type name | Api name + Content type name\n * @property {object} apiInfo.contentTypeInfo - The info object found on content type schemas\n *\n * @returns {object}\n */\nconst getPaths = ({ routeInfo, uniqueName, contentTypeInfo, kind }: ApiInfo) => {\n // Get the routes for the current content type\n const contentTypeRoutes = routeInfo.routes.filter((route) => {\n return (\n route.path.includes(contentTypeInfo.pluralName) ||\n route.path.includes(contentTypeInfo.singularName)\n );\n });\n\n const paths = contentTypeRoutes.reduce((acc: any, route: Core.Route) => {\n // TODO: Find a more reliable way to determine list of entities vs a single entity\n const isListOfEntities = hasFindMethod(route.handler);\n const methodVerb = route.method.toLowerCase();\n const hasPathParams = route.path.includes('/:');\n const pathWithPrefix = getPathWithPrefix(routeInfo.prefix, route);\n const routePath = hasPathParams ? parsePathWithVariables(pathWithPrefix) : pathWithPrefix;\n\n const responses = getApiResponses({\n uniqueName,\n route,\n isListOfEntities: kind !== 'singleType' && isListOfEntities,\n });\n\n const swaggerConfig: OpenAPIV3.OperationObject = {\n responses,\n tags: [_.upperFirst(uniqueName)],\n parameters: [],\n operationId: `${methodVerb}${routePath}`,\n };\n\n if (isListOfEntities) {\n swaggerConfig.parameters?.push(...queryParams);\n }\n\n if (hasPathParams) {\n const pathParams = getPathParams(route.path);\n swaggerConfig.parameters?.push(...pathParams);\n }\n\n if (['post', 'put'].includes(methodVerb)) {\n const refName = 'Request';\n const requestBody = {\n required: true,\n content: {\n 'application/json': {\n schema: {\n $ref: `#/components/schemas/${pascalCase(uniqueName)}${refName}`,\n },\n },\n },\n };\n\n swaggerConfig.requestBody = requestBody;\n }\n\n _.set(acc, `${routePath}.${methodVerb}`, swaggerConfig);\n\n return acc;\n }, {});\n\n return paths;\n};\n\n/**\n * @description - Builds the Swagger paths object for each api\n */\nconst buildApiEndpointPath = (api: Api) => {\n // A reusable loop for building paths and component schemas\n // Uses the api param to build a new set of params for each content type\n // Passes these new params to the function provided\n return loopContentTypeNames(api, getPaths);\n};\n\nexport default buildApiEndpointPath;\n"],"names":["parsePathWithVariables","routePath","tokens","pathToRegexp","parse","map","token","type","value","name","t","join","Error","getPathParams","reduce","acc","param","push","in","description","deprecated","required","schema","getPathWithPrefix","prefix","route","_","has","config","concat","path","getPaths","routeInfo","uniqueName","contentTypeInfo","kind","contentTypeRoutes","routes","filter","includes","pluralName","singularName","paths","isListOfEntities","hasFindMethod","handler","methodVerb","method","toLowerCase","hasPathParams","pathWithPrefix","responses","getApiResponses","swaggerConfig","tags","upperFirst","parameters","operationId","queryParams","pathParams","refName","requestBody","content","$ref","pascalCase","set","buildApiEndpointPath","api","loopContentTypeNames"],"mappings":";;;;;;;;AAcA;;;;;IAMA,MAAMA,yBAAyB,CAACC,SAAAA,GAAAA;AAC9B,IAAA,MAAM,EAAEC,MAAM,EAAE,GAAGC,YAAAA,CAAaC,KAAK,CAACH,SAAAA,CAAAA;IAEtC,OAAOC,MAAAA,CACJG,GAAG,CAAC,CAACC,KAAAA,GAAAA;AACJ,QA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AEAnC,CAAAA,CAAEuC,GAAG,CAAClD,GAAAA,EAAK,CAAA,EAAGd,UAAU,CAAC,EAAE6C,YAAY,EAAEO,aAAAA,CAAAA;QAEzC,OAAOtC,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC,CAAA;IAEJ,OAAO2B,KAAAA;AACT,CAAA;AAEA;;IAGA,MAAMwB,uBAAuB,CAACC,GAAAA,GAAAA;;;;AAI5B,IAAA,OAAOC,qBAAqBD,GAAAA,EAAKpC,QAAAA,CAAAA;AACnC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-documentation",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.44.0",
|
|
4
4
|
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
|
|
5
5
|
"homepage": "https://strapi.io",
|
|
6
6
|
"bugs": {
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@reduxjs/toolkit": "1.9.7",
|
|
66
|
-
"@strapi/admin": "5.
|
|
66
|
+
"@strapi/admin": "5.44.0",
|
|
67
67
|
"@strapi/design-system": "2.2.0",
|
|
68
68
|
"@strapi/icons": "2.2.0",
|
|
69
|
-
"@strapi/utils": "5.
|
|
69
|
+
"@strapi/utils": "5.44.0",
|
|
70
70
|
"bcryptjs": "2.4.3",
|
|
71
71
|
"cheerio": "^1.0.0",
|
|
72
72
|
"formik": "2.4.5",
|
|
73
|
-
"fs-extra": "11.
|
|
73
|
+
"fs-extra": "11.3.4",
|
|
74
74
|
"immer": "9.0.21",
|
|
75
75
|
"koa-static": "^5.0.0",
|
|
76
76
|
"lodash": "4.18.1",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@apidevtools/swagger-parser": "^10.1.0",
|
|
85
|
-
"@strapi/admin-test-utils": "5.
|
|
86
|
-
"@strapi/strapi": "5.
|
|
87
|
-
"@strapi/types": "5.
|
|
85
|
+
"@strapi/admin-test-utils": "5.44.0",
|
|
86
|
+
"@strapi/strapi": "5.44.0",
|
|
87
|
+
"@strapi/types": "5.44.0",
|
|
88
88
|
"@testing-library/react": "16.3.0",
|
|
89
89
|
"@testing-library/user-event": "14.6.1",
|
|
90
90
|
"@types/fs-extra": "11.0.4",
|