fix(api-portal): make API workflow description optional - #3106
fix(api-portal): make API workflow description optional#3106sanjulaonline wants to merge 2 commits into
Conversation
Remove Description from both blocking wizard validations and drop its required indicator. The client continues sending an empty string, which is accepted by the existing API contract and database schema. Add Cypress coverage that creates an API Workflow without a description. Fixes wso2#3082
📝 WalkthroughWalkthroughAPI workflow descriptions are now optional in the form and validation logic. A Cypress test creates a workflow without a description, verifies it, and removes it through the API. ChangesAPI workflow description validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Cypress
participant WorkflowWizard
participant WorkflowAPI
Cypress->>WorkflowWizard: Enter workflow data without a description
WorkflowWizard->>WorkflowAPI: Save API workflow
WorkflowAPI-->>Cypress: Return saved workflow
Cypress->>WorkflowAPI: Delete test workflow
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@portals/api-portal/it/ui/cypress/e2e/settings/003-api-workflows.cy.js`:
- Around line 85-88: Extend the successful-save assertions around the
api-workflow edit flow to reopen the saved workflow using the existing
WORKFLOW_HANDLE selector, then verify that `#apiWorkflowDescription` has an empty
value. Keep the current listing assertions and ensure the check validates the
persisted value after loading the edit form.
In `@portals/api-portal/src/pages/settings/partials/create-api-workflow.hbs`:
- Line 75: Update the preview and readiness messaging associated with the
Description field so they no longer state that a description is required. Keep
the workflow validation behavior unchanged and ensure empty Description values
are presented as valid rather than requiring additional input.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: adc6a540-ea7b-4927-9822-4023dcdd1f21
📒 Files selected for processing (3)
portals/api-portal/it/ui/cypress/e2e/settings/003-api-workflows.cy.jsportals/api-portal/src/pages/settings/partials/create-api-workflow.hbsportals/api-portal/src/scripts/manage-api-workflows.js
💤 Files with no reviewable changes (1)
- portals/api-portal/src/scripts/manage-api-workflows.js
Update the preview guidance and readiness state to depend on the workflow name only. Extend the Cypress test to verify readiness and confirm that an empty description persists when the workflow is reopened. Related to wso2#3082
Purpose
The API Workflow wizard treated Description as mandatory even though workflow
descriptions should be optional. It blocked users in two places:
The field was also displayed with a required indicator.
Fixes #3082
Goals
Allow an API Workflow to be created or updated without a description, consistent
with the existing optional API-description behavior.
Approach
Description field.
unchanged.
description.
omitted optional Description is no longer presented as incomplete.
The client continues sending
description: "". The existing OpenAPI requestschema accepts it because the property has no
minLength, and the existingNOT NULLdatabase column stores an empty string. No API contract, service, orschema change is required.
User stories
As a portal administrator, I can create an API Workflow without providing a
description.
Documentation
N/A — this corrects form validation and does not change a documented API or
configuration surface.
Automation tests
Verification performed:
unchanged baseline.
The REST API suite was not run because this change does not modify the workflow
API contract or service.
Security checks
Samples
N/A
Related PRs
N/A. Commit
cc8d6b584made API descriptions optional; this change applies thesame behavior to API Workflows.
Test environment