Closed Jakob-Espersen closed 5 months ago
How do you import your TestController? Please make sure you're using it this way. This is also the recommended way based on the official adonisjs docs.
const TestController = () => import('#controllers/test_controller')
How do you import your TestController? Please make sure you're using it this way. This is also the recommended way based on the official adonisjs docs.
const TestController = () => import('#controllers/test_controller')
Overlooked the Compatability section, i was importing like
import TestController from '#controllers/test_controller'
It worked changing the import :)
No, you didn't overlook it, I just added it to the readme a few minutes ago 😅
I thought I had it added, but looks like I forgot about it the whole time.
Hello. When i try making a resource controller or use a controller in routes.ts like:
it searches for /app/TestController.ts
when the path is /app/controllers/test_controller.ts. And therefore i get no such file or Directory error.
I have tried setting appPath in swagger.ts but i does not seem to do anything.
I might be overlooking something?
debug AdonisJS AutoSwagger:
My swagger.ts: