Add "variant" type to IDL syntax

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: IDL
    • None
    • Fully Compatible
    • Repl 2021-01-11, Repl 2021-01-25, Repl 2021-02-08
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      This new type represents a union of multiple types. For example:

      structs:
        writeConcern:
          fields:
            w:
              type:
                  # The "w" field accepts a string or an int
                  variant: [string, int]
      

      Add tests for the "variant" type in test_parser.py and test_generator.py, following the examples of the existing types.

            Assignee:
            A. Jesse Jiryu Davis
            Reporter:
            Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: