adonis-autoswagger
adonis-autoswagger copied to clipboard
Load models from a different folder
Hello, it would be nice to load models from a different folder. 😄
Keep these by default:
- Creates schemas automatically based on app/Models/*
- Creates schemas automatically based on app/Interfaces/*
- Creates schemas automatically based on app/Validators/* (only for adonisJS v6)
And add something like:
- Creates schemas automatically based on a given path and checks subfolders
In adonisv6 you can set custom folders for models, controllers, etc... in package.json which AutoSwagger respects.
If you mean adding additional folders (outside of the default ones), then may I ask why you'd want to do that? Since "convention over configuration" is usually the proper way to go with.
I understand what you said, but I have a clean architecture in AdonisV6 and I want to use this package to expose my API with Swagger. So I want to expose for multiple bounded context in Swagger with these exemples:
- authentication/infrastructure/primary/**/Rest*.ts
- marketplace/infrastructure/primary/**/Rest*.ts
Hi,
First, thank you for this amazing package.
I have the same situation as you @hugojeanmaire1. Did you find a solution ?
Thank you in advance, for your help.
Hello @himito
No, I didn't find any solution for this problem. I just stopped using this package. But it would be nice to re-open this issue and find a solution?