-
Notifications
You must be signed in to change notification settings - Fork 17
KZL-547 - Update validateSpecifications signature to take index and collection #318
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
Conversation
Codecov Report
@@ Coverage Diff @@
## 6-dev #318 +/- ##
=========================================
- Coverage 97.76% 97.5% -0.27%
=========================================
Files 28 28
Lines 1390 1400 +10
=========================================
+ Hits 1359 1365 +6
- Misses 31 35 +4
Continue to review full report at Codecov.
|
src/controllers/collection.js
Outdated
throw new Error('Kuzzle.collection.updateSpecifications: collection is required'); | ||
} | ||
if (!specifications) { | ||
throw new Error('Kuzzle.collection.updateSpecifications: specifications is required'); |
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.
specifications are required
src/controllers/collection.js
Outdated
throw new Error('Kuzzle.collection.validateSpecifications: collection is required'); | ||
} | ||
if (!specifications) { | ||
throw new Error('Kuzzle.collection.updateSpecifications: specifications is required'); |
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.
same here
What does this PR do?
Before the method
validateSpecifications
didn't take an index an a collection in parameters and could be used for any collection.This PR change the signature to match the rest of the collection controller. The method now take an index and a collection in addition to the specifications for this collection.
I also modify the
updateSpecifications
method. The method was taking an index and collection in parameter but it didn't scope the specifications to the collection.Related PR: #318, kuzzleio/sdk-go#211, kuzzleio/sdk-c#13, kuzzleio/sdk-cpp#11, kuzzleio/sdk-java#13, kuzzleio/documentation#51
How should this be manually tested?
my-index
andmy-collection