Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support sourceType: string[] in relationship metadata #490

Open
aiwilliams opened this issue Jun 22, 2021 · 1 comment
Open

Support sourceType: string[] in relationship metadata #490

aiwilliams opened this issue Jun 22, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@aiwilliams
Copy link
Contributor

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,
}
@aiwilliams aiwilliams added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 22, 2021
@ndowmon
Copy link
Contributor

ndowmon commented Jun 22, 2021

Good suggestion @aiwilliams. Could this be valid for both sourceType and targetType?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants