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

Show resource path params as custom properties in the flow diagram #531

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

LakshanWeerasinghe
Copy link
Contributor

@LakshanWeerasinghe LakshanWeerasinghe commented Jan 6, 2025

Purpose

$subject

Fixes: issue

Screen.Recording.2025-01-06.at.14.34.50.mov

@nipunayf nipunayf requested a review from Copilot January 6, 2025 17:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 21 out of 36 changed files in this pull request and generated 1 comment.

Files not reviewed (15)
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/diagram_generator/config/resource_action_call_github.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/diagram_generator/source/github_resource_call.bal: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_connectors/covid.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_connectors/default.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_connectors/http.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_connectors/sql.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_functions/config/custom_sum.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/get_functions/config/log.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/node_template/config/new_connection-covid.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/node_template/config/new_connection-docusign.dsadmin.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/node_template/config/new_connection-http.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/node_template/config/new_connection-redis.json: Language not supported
  • flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/db/model/Parameter.java: Evaluated as low risk
  • flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/db/model/ParameterResult.java: Evaluated as low risk
  • flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/utils/CommonUtils.java: Evaluated as low risk
Comments suppressed due to low confidence (3)

flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/utils/ParamUtils.java:79

  • [nitpick] The variable name 'type' is ambiguous. It should be renamed to 'typeSignature' for clarity.
String type = TypeUtils.getTypeSignature(pathParameterSymbol.typeDescriptor(), errorTypeSymbol, true);

flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/utils/ParamUtils.java:78

  • [nitpick] The variable name 'defaultValue' is ambiguous. It should be renamed to 'defaultValueForType' for clarity.
String defaultValue = DefaultValueGeneratorUtil.getDefaultValueForType(pathParameterSymbol.typeDescriptor());

flow-model-generator/modules/flow-model-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/utils/ParamUtils.java:100

  • The new behavior introduced in the 'buildResourcePathTemplate' method should be covered by tests to ensure it works correctly in all scenarios.
public record ResourcePathTemplate(String resourcePathTemplate, List<ParameterResult> pathParams) {

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

Successfully merging this pull request may close these issues.

3 participants