Skip to content

Support sourceType: string[] in relationship metadata #490

@aiwilliams

Description

@aiwilliams

Background

Relationships of a single _type value can represent edges between two different source entity _types. For example, in the Okta integration, there are okta_user_group and okta_app_user_group entities that may both be related to an okta_application, with the relationship _type always being okta_group_assigned_application. In this case, the metadata for the relationship has to be:

GROUP_ASSIGNED_APPLICATION: {
    _type: 'okta_group_assigned_application',
    _class: RelationshipClass.ASSIGNED,
    sourceType: 'okta_user_group, okta_app_user_group',
    targetType: Entities.APPLICATION._type,
}

We're unable to reference the constants for those entity types, and the documentation generate produces a single row.

Proposal

Add support to the metadata for sourceType: string[], and generate two rows in the documentation, one for each sourceType.

GROUP_ASSIGNED_APPLICATION: {
    _type: 'okta_group_assigned_application',
    _class: RelationshipClass.ASSIGNED,
    sourceType: [Entities.USER_GROUP, Entities.APP_USER_GROUP],
    targetType: Entities.APPLICATION._type,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions