-
Notifications
You must be signed in to change notification settings - Fork 156
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
Issue 305 #314
Issue 305 #314
Conversation
return value | ||
} | ||
|
||
return value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a smart change! Just make this ternary a single line, for consistency.
|
||
class RESTPathGenerator { | ||
constructor (apiPrefix = '', apiVersion = '', modelName) { | ||
assert(typeof modelName === 'string', 'modelName must be a string') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably just throw here rather than use assert as a side effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, _.isString
instead of typeof
That's a heroic PR! The one failing test is here, looks like something might have changed in the error response. Edit: We're getting failures on master as well, I'm guessing something changed yet again in how mongoose handles errors. Feel free to have a look at it, but it can be fixed separately too. Great work, I added a few comments here and there, but looks good overall 👍 |
Thanks! Locally, I'm working on updates to the operations API that so that each op returns a Promise -- it's still failing a couple tests though, but I should be able to sort it out in the morning. By the way, great work on this library! |
I'm keeping an eye out on this, let me know if you have any questions! |
…en arrays of ObjectId's are updated by populated references
Just realized the tests from #317 didn't make it in -- just added them. |
Hey @Zertz, what do you think about moving to ES6 modules? The tooling supports it, but it means modifying the tests (which have nested
The changes are in a separate branch here if you want to see how it looks. That branch passes tests btw. |
1 similar comment
* Adds "Transformation" to represent an API method that *is* allowed to operate on requests * Performs filtering of the request body in separate middleware
So I looked at the test that's failing and in 4.8.0 mongoose added support for selecting fields by array (the way the test attempts). Should I update the test to document that new feature? BTW here's the relevant test Edit: it was actually an |
@b-gran is this still being worked on? |
I love the idea here but it seems like work has stalled and quite a few merge conflicts have risen and the scope of changes is quite large. Closing for now, let me know if there is interest in picking up the work. |
Create independent APIs for
operations.js
)