-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add new /iot/groups
API route
#1648
Conversation
/iot/groups
API route/iot/groups
API route
'/iot/services', | ||
restUtils.checkRequestAttributes('headers', mandatoryHeaders), | ||
restUtils.checkBody(templateGroupService), | ||
handleCreateDeviceGroup | ||
); | ||
|
||
router.post( | ||
'/iot/groups', | ||
restUtils.checkRequestAttributes('headers', mandatoryHeaders), | ||
restUtils.checkBody(templateGroup), | ||
handleCreateDeviceGroup | ||
); |
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.
Note: Needed 2 router.post()
entries in order to allow to use a different template for each query
NTD.
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.
I got that. Maybe CheckBody should take care of it. If it can do comlex checkings.
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.
"revalidator" dependency doesn't allow conditional checking. The point here is that limits on auxiliar libs shouldn't drive to special "code structures" at the top level code. Top Level code is more important than a limited validation library. I think uniformity at this level is more important than check two options of JSON (probably this can be achieved by using async.some module already required)
/iot/groups
API route/iot/groups
API route
The following should be added to CHANGES_NEXT_RELEASED (as in PR #1637):
|
test/unit/ngsiv2/provisioning/device-provisioning-configGroup-api_test.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
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.
LGTM
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.
LGTM
This PR solves #752
This PR overpasses #1637