Skip to content

Validation - Union Types are not taken into account yet #177

@steiler

Description

@steiler

In the tree we have the Validate function https://github.com/sdcio/data-server/blob/main/pkg/tree/entry.go#L631-L656.
This tries to performs all sorts of validations. Amongst must-stmts and others, also the type based statements.
However, also the union type exists, which basically is a slice of types, that need to be checked one after the other until the checks for that particular type do all pass. Only then the Data is valid.

This leads to the fact, that we need to reorg the checks for type based constraints into built-in type based checks, kind of like https://github.com/iptecharch/data-server/blob/e796c46c52d08713b10e22598938371dae868f0b/pkg/datastore/data_rpc.go#L521.
to also properly support unions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions