This didn’t work the way I expected - is there a w...
# singer-tap-development
m
This didn’t work the way I expected - is there a way to validate an ArrayType property such that it can be any combination of the “allowed values”?
Copy code
th.Property(
            "operation_types",
            th.ArrayType(th.StringType),
            required=False,
            description=(
                "List of MongoDB change stream operation types to include in tap output. The default behavior is to "
                "limit to document-level operation types. See full list of operation types at"
                "<https://www.mongodb.com/docs/manual/reference/change-events/#operation-types>. Note that the list "
                "of allowed_values for this property includes some values not available to all MongoDB versions."
            ),
            default=[
                "create",
                "delete",
                "insert",
                "replace",
                "update",
            ],
            allowed_values=[
                "create",
                "createIndexes",
                "delete",
                "drop",
                "dropDatabase",
                "dropIndexes",
                "insert",
                "invalidate",
                "modify",
                "rename",
                "replace",
                "shardCollection",
                "update",
            ],
        ),