diegohaz / diegohaz/rest

"How to" question about custom methods in schema

Open
#210 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
304
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.