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

"How to" question about custom methods in schema #210

Open
mickey58github opened this issue Aug 29, 2019 · 0 comments
Open

"How to" question about custom methods in schema #210

mickey58github opened this issue Aug 29, 2019 · 0 comments

Comments

@mickey58github
Copy link

Hi Diego, this is great work. I'm currently evaluating to use your REST generator package in my Mongoose project. I have a Mongoose schema that defines a tree structure. It's a recursive schema that uses references to the same schema for the children of a parent node in the tree. The schema has, besides usual CRUD methods, some special methods for tree handling, like getChildren(), getImmediateChildren() getParent(), getAncestors() etc. My question: Will your package automatically generate REST APIs for such custom chema methods already defined in my schema, from their method signatures and code? Do you have an example for that? Alternatively, can you give me some hints where and how to add such custom methods to the files generated by your package?

Thanks a lot, Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant