Errors on generated documentation (Swagger / OpenAPI)

System Information
  • Strapi Version: v3.4.6
  • Operating System: macOS Catalina 10.15.7
  • Database: MongoDB 4.4.3 (Atlas)
  • Node Version: 12.18.4
  • NPM Version: 6.14.6
  • Yarn Version: 1.21.1

Hi Everyone,
I’m having problems with my generated documentation according to
it says "type": "uid" "type": "component" are not valid, also in console and when generating client code

            "name": "=",
            "in": "query",
            "required": false,
            "description": "Get entries that matches exactly your input",
            "schema": {
              "type": "string"
            "deprecated": false

is throwing the following error:

error SyntaxError: Unexpected token '='
    at Function (<anonymous>)
    at /node_modules/lodash/lodash.js:14894:16
    at apply (/node_modules/lodash/lodash.js:473:27)
    at /node_modules/lodash/lodash.js:15278:16
    at apply (/node_modules/lodash/lodash.js:475:27)
    at /node_modules/lodash/lodash.js:6585:16
    at Function.template (/node_modules/lodash/lodash.js:14893:20)
    at Object.index (/node_modules/strapi-plugin-documentation/controllers/Documentation.js:62:32)
    at dispatch (/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
    at next (/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
    at dispatch (/node_modules/koa-compose/index.js:42:32)
    at /node_modules/strapi/lib/middlewares/router/utils/routerChecker.js:79:28
    at dispatch (/node_modules/koa-compose/index.js:42:32)
    at /node_modules/strapi-admin/config/policies/hasPermissions.js:35:16
    at dispatch (/node_modules/koa-compose/index.js:42:32)
    at module.exports (/node_modules/strapi-plugin-documentation/config/policies/index.js:12:18)

have anyone struggle with a similar issue?


I’ve created a PR to fix the uid issue: [plugin-documentation] Fix uid type and format by badsyntax · Pull Request #10667 · strapi/strapi · GitHub