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

Add support for diagram upstream expansion #85

Open
SlavaVedernikov opened this issue May 30, 2024 · 0 comments
Open

Add support for diagram upstream expansion #85

SlavaVedernikov opened this issue May 30, 2024 · 0 comments
Labels

Comments

@SlavaVedernikov
Copy link
Owner

SlavaVedernikov commented May 30, 2024

Context

At the moment draw-diagrams CLI command has --interfaces option which accepts a list of Interfaces, that is then used in Scope(s) definition.
For each relevant Scope draw-diagrams command uses only relevant Interface(s) - Scoped Interfaces as a starting point for inferring relationships for a diagram going downstream from Scoped Interfaces all the way down to the last Interface that does not use any other Interfaces.

Sometimes it is useful to see which other Interfaces use the Scoped Interfaces i.e. going upstream from Scoped Interfaces.

Requirements

Extend draw-diagrams to support a new option --expand-upstream, which would be used with an integer value indicating the number of upstream expansions e.g.

  • if --expand-upstream 1 is used, then the draw-diagrams command would try to find 1 other interface that uses each of the Scoped Interfaces, and add them to the Scope.
  • if --expand-upstream 2 is used, then the draw-diagrams command would try to find 1 other interface that uses each of the Scoped Interfaces, and then repeat the same for each of the interfaces it found in the first iteration, and add them to the Scope.
  • if --expand-upstream 0 is used, then the draw-diagrams command would try to find all other interface that uses each of the Scoped Interfaces recursively, and add them to the Scope.

Use C4InterFlow.Cli.Commands.QueryUseFlowsCommand.Execute method to find interface that use Scoped Interfaces .

NOTE: C4InterFlow.Cli.Commands.QueryUseFlowsCommand.Execute will have to be used with isRecursive parameter set to false unless --expand-upstream 0 is used when calling draw-diagrams command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant