-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support for mongoose model definitions #46
Comments
Hey there, thanks for the request(s)! I'm afraid that I and the owner don't have much time available right now to implement this:/ If you (or anyone else) would like to try to implement this & create a PR - we'd gladly accept! |
@sarpik Thanks for your reply. Sure, will give it a try! 😄 |
@maxiejbe Any chance you decided to take that on? I was looking for the same thing :) |
Not yet, but planning to start soon! |
Hi everyone! |
Hey @maxiejbe thanks for PR! I reviewed it. |
* Including mongoose-to-swagger dependency * Including mongoose as peer dependency * Mongoose and bson as dev dependencies * Helper to generate mongoose models spec * Adjusting test description for existing mongoose model * Generic test for mongoose model spec * Setting mongoose model specs as oas definitions * Single test for oas definitions from mongoose models * Updating readme to include mongooseModels init param * Including mongooseModels arg on handleResponses * Updating existing examples with mongoose models * Updating definitions spec function signature * Refactor on spec.definitions assignment * Removing exception wrapper from generateMongooseModelsSpec * Adjusting generateMongooseModelsSpec test to use expect.toThrowError() * Returning void on updateDefinitionsSpec * Making bson, mongoose and mongoose-to-swagger peer dependencies * Adjusting peer dependencies comments
PR is merged, new version is on the way |
In order to have mongoose model definitions, it could be pretty useful to integrate a library such as:
Matching route requests/responses with model definitions must be hard to implement.
Just a read-only implementation would be great!
An interface like this could work:
Thanks in advance!
The text was updated successfully, but these errors were encountered: