Skip to content

Add checks if a variant is valid for a given type #5642

@margaretjgu

Description

@margaretjgu

An extension from this comment and issue

Let's add a rule that explicitly checks if a variant is valid for a given type, e.g.:

Request > none
Response > none
Interface > Container
Alias > Internal, External, Untagged
...

In this particular case the compiler should also throw an exception and refuse emitting the schema.json since this creates a situation that is not mappable to the metamodel. We do this in other situations when a tag is incorrectly used, so this is probably an oversight.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions