[SERVER-34882] Support creating instances with all required fields in IDL Created: 08/May/18 Updated: 29/Oct/23 Resolved: 14/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.4 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Security 2018-09-10, Security 2018-09-24 |
| Participants: |
| Description |
|
IDL enforces required fields to be present when serializing into BSON. However IDL is also used internally without serialization. Developers usually want to enforce all required fields are specified when creating an instance. Currently, we have functions to enforce them manually. OplogEntry is an example. Otherwise, we forgot some fields sometimes. It would be nice if the IDL can provide a way to enforce that. It could be either a constructor or a static factory function. |
| Comments |
| Comment by Githook User [ 14/Sep/18 ] |
|
Author: {'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}Message: |
| Comment by Siyuan Zhou [ 30/Aug/18 ] |
|
FWIW, we will need to build an IDL instance progressively in |