Skip to content

Add more schema descriptions#1176

Merged
alexandrudanpop merged 5 commits into
mainfrom
feat/descriptions
Aug 22, 2025
Merged

Add more schema descriptions#1176
alexandrudanpop merged 5 commits into
mainfrom
feat/descriptions

Conversation

@alexandrudanpop

@alexandrudanpop alexandrudanpop commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

Part of OPS-2337, OPS-2442

@linear

linear Bot commented Aug 21, 2025

Copy link
Copy Markdown

Comment on lines +133 to +138
export const AddActionRequestWithoutId = Type.Composite([
AddActionRequest,
Type.Object({
action: Type.Omit(UpdateActionRequest, ['id']),
}),
]);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

needed for OPS-2442

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be in a different file and not sure if in this repo. It will only be used on the new routes right?

@alexandrudanpop
alexandrudanpop marked this pull request as ready for review August 21, 2025 08:26
Copilot AI review requested due to automatic review settings August 21, 2025 08:26
@linear

linear Bot commented Aug 21, 2025

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds descriptive schema documentation to improve clarity and usability of flow-related types and schemas. The changes focus on providing detailed descriptions for trigger properties, sample data handling, and action configurations to help developers better understand the expected structure and usage patterns.

  • Enhanced trigger schema descriptions with clear usage guidelines and examples
  • Added comprehensive documentation for input objects and sample data properties
  • Improved action naming conventions and input property documentation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/shared/src/lib/flows/triggers/trigger.ts Added descriptions for trigger properties including naming conventions and input structure examples
packages/shared/src/lib/flows/sample-data.ts Enhanced sample data schema with usage guidelines and added missing default property
packages/shared/src/lib/flows/flow-operations.ts Improved parent step description with concrete examples and added new composite type
packages/shared/src/lib/flows/actions/action.ts Updated action naming conventions and input object documentation with step reference syntax

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/shared/src/lib/flows/triggers/trigger.ts Outdated
Comment thread packages/shared/src/lib/flows/sample-data.ts
Comment thread packages/shared/src/lib/flows/actions/action.ts Outdated
alexandrudanpop and others added 2 commits August 21, 2025 11:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
name: Type.String({
description:
'Name of the step (action), used for reference in code or configurations. Usually the name is in the format step_index',
'Name of the step (action), used for reference in other step configurations. The name should always be in the format: "step_{autoincrement}", example: "step_1", "step_2", etc.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@alexandrudanpop do we need this? step_{autoincrement} ? it can absolutely be {{step_stepId}}. Can also be {{my_step}}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was how they were added from the UI. Shouldn't we keep it consistent for the user (because they will see it when it's referenced)?
We could add this logic in the tool instead of relying on the LLM.

const getStepName = (block: StepMetadata, flowVersion: FlowVersion) => {
if (block.type === TriggerType.BLOCK) {
return 'trigger';
}
const baseName = 'step_';
let number = 1;
const steps = flowHelper.getAllSteps(flowVersion.trigger);
while (steps.some((step) => step.name === `${baseName}${number}`)) {
number++;
}
return `${baseName}${number}`;
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed, the tool will do it.

@sonarqubecloud

Copy link
Copy Markdown

@alexandrudanpop
alexandrudanpop merged commit 2b09cf2 into main Aug 22, 2025
19 checks passed
@alexandrudanpop
alexandrudanpop deleted the feat/descriptions branch August 22, 2025 07:45
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.

4 participants