Add more schema descriptions#1176
Conversation
| export const AddActionRequestWithoutId = Type.Composite([ | ||
| AddActionRequest, | ||
| Type.Object({ | ||
| action: Type.Omit(UpdateActionRequest, ['id']), | ||
| }), | ||
| ]); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.', |
There was a problem hiding this comment.
@alexandrudanpop do we need this? step_{autoincrement} ? it can absolutely be {{step_stepId}}. Can also be {{my_step}}
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
fixed, the tool will do it.
|



Part of OPS-2337, OPS-2442