Allow empty GetConfiguration to retrieve all keys#1927
Allow empty GetConfiguration to retrieve all keys#1927rishabhvaish wants to merge 1 commit intolbbrhzn:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis change enables sending an empty GetConfiguration request to retrieve all configuration keys at once. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The get_configuration service required
ocpp_keyas a mandatory field, but per OCPP 1.6 spec (section 7.22), sending a GetConfiguration request without any keys should return all configuration keys from the charge point. This was already partially supported — the v1.6get_configurationmethod correctly sent an emptyGetConfiguration()call when key was blank — but the service schema rejected requests withoutocpp_key, and the response handler only returned the first key's value instead of all of them.I've made
ocpp_keyoptional in the service schema and updated the v1.6 handler to return a dict of all key-value pairs when no specific key is requested. When a key is provided, behavior is unchanged.Fixes #1907
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes