[SERVER-65865] Support multi-level chained structs Created: 21/Apr/22  Updated: 28/Sep/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-63202 IDL-ize RenameCollectionOptions Blocked
is depended on by SERVER-81447 Rewrite create collection path with m... Blocked
Assigned Teams:
Service Arch
Participants:

 Description   

Currently, it is not supported to have more than one level of chained structs. There does not seem to be a particular reason for such limitation other than avoiding to have to check for circular dependencies.

This arbitrary limitation is providing developers from using IDLs for some trivial use cases as the one from the example below:

struct:
    Base:
        description: "..."
        fields:
            a:
                description: "a"
                type: int
    
    Specialization:
        description: "..."
        chained_structs:
            Base: Base
        fields:
            b:
                description: "b"
                type: int
 
     SpecializationOfSpecialization:
        description: "..."
        chained_structs:
            Specialization: Specialization

With the above code, the IDL generator returns the following error: Struct 'SpecializationOfSpecialization' is not allowed to nest struct 'Specialization' since it has chained structs and/or types.


Generated at Thu Feb 08 06:03:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.