Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI docs are rotten #196

Open
raimohanska opened this issue Mar 6, 2022 · 0 comments
Open

OpenAPI docs are rotten #196

raimohanska opened this issue Mar 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@raimohanska
Copy link
Owner

For quite a while the API docs haven't been updated at all.

  • When you run yarn apidocs nothing happens. The file backend/src/api/api-routes.openapi.ts remains unchanged.
  • The operation has probably been a no-op since api-routes.ts was moved.
  • It's probably a bug in typera-openapi that this fails silently
  • When I point the apidocs task in backend/package.json to point to the right file, I get a really nasty error:
$ cd backend && yarn apidocs
$ typera-openapi --prettify src/api/api-routes.ts
/Users/juha/code/ourboard/node_modules/typera-openapi/node_modules/typescript/lib/typescript.js:27102
        return node.kind === 249 /* VariableDeclaration */;
                    ^

TypeError: Cannot read property 'kind' of undefined
    at Object.isVariableDeclaration (/Users/juha/code/ourboard/node_modules/typera-openapi/node_modules/typescript/lib/typescript.js:27102:21)
    at getRouteInput (/Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:130:13)
    at getRouteDeclaration (/Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:72:24)
    at /Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:37:38
    at Array.forEach (<anonymous>)
    at visit (/Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:35:20)
    at /Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:19:27
    at visitNodes (/Users/juha/code/ourboard/node_modules/typera-openapi/node_modules/typescript/lib/typescript.js:28217:30)
    at Object.forEachChild (/Users/juha/code/ourboard/node_modules/typera-openapi/node_modules/typescript/lib/typescript.js:28456:24)
    at Object.generate (/Users/juha/code/ourboard/node_modules/typera-openapi/dist/generate.js:18:12)

@raimohanska raimohanska added the bug Something isn't working label Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant