Skip to content

Conversation

@ThaminduDilshan
Copy link
Contributor

@ThaminduDilshan ThaminduDilshan commented Nov 17, 2025

Purpose

This pull request introduces the flow management API swagger definition.

Approach

Screenshot 2025-11-17 at 5 52 02 PM

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Copilot AI review requested due to automatic review settings November 17, 2025 12:22
@ThaminduDilshan ThaminduDilshan marked this pull request as ready for review November 17, 2025 12:22
@ThaminduDilshan ThaminduDilshan linked an issue Nov 17, 2025 that may be closed by this pull request
@ThaminduDilshan ThaminduDilshan added Type/New Feature skip-changelog Skip generating changelog for a particular PR labels Nov 17, 2025
Copilot finished reviewing on behalf of ThaminduDilshan November 17, 2025 12:24
Copy link
Contributor

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.

Pull Request Overview

This PR introduces comprehensive OpenAPI 3.0.3 specifications for flow management and execution APIs that enable app native authentication capabilities. The changes add two new YAML files defining REST APIs for creating, managing, and executing authentication and registration flows.

Key changes:

  • Added Flow Execution API definition (api/flow-execution.yaml) for executing app native authentication flows with support for initial and subsequent flow requests
  • Added Flow Management API definition (api/WIP/flow-management.yaml) for CRUD operations on flow definitions with comprehensive schema definitions for VIEW, EXECUTION, and specialized step types
  • Defined detailed component and action schemas supporting a visual flow composer with UI components, executors, and navigation logic

Reviewed Changes

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

File Description
api/flow-execution.yaml Defines the POST endpoint for executing flow steps with request/response schemas for incomplete, complete, and error flow states, including input validation and authentication assertions
api/WIP/flow-management.yaml Defines full CRUD endpoints for flow management with detailed schemas for step types, UI components, actions, executors, pagination, and comprehensive validation rules for authentication and registration flows

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.81%. Comparing base (084a0fc) to head (6eacd6f).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #793      +/-   ##
==========================================
- Coverage   82.83%   82.81%   -0.02%     
==========================================
  Files         298      298              
  Lines       23314    23313       -1     
  Branches      563      562       -1     
==========================================
- Hits        19311    19307       -4     
- Misses       2843     2845       +2     
- Partials     1160     1161       +1     
Flag Coverage Δ
backend-combined-postgres 56.88% <ø> (-0.01%) ⬇️
backend-combined-sqlite 56.88% <ø> (-0.01%) ⬇️
backend-integration-postgres 56.88% <ø> (-0.01%) ⬇️
backend-integration-sqlite 56.88% <ø> (-0.01%) ⬇️
backend-unit 64.54% <ø> (-0.02%) ⬇️
frontend-apps-develop-unit 64.54% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings November 17, 2025 12:50
Copilot finished reviewing on behalf of ThaminduDilshan November 17, 2025 12:53
Copy link
Contributor

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.

Pull Request Overview

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

Comment on lines +675 to +676
data:
$ref: '#/components/schemas/StepData'
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The data field in the Step schema is not marked as required. However, all examples in the document (lines 399-404, 413-534, etc.) include the data field. If steps always require data configuration, this should be marked as required, or the documentation should clarify when it's optional.

Copilot uses AI. Check for mistakes.
name: Basic Registration Flow
flowType: REGISTRATION
isEnabled: true
steps: &registrationFlowSteps
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

YAML anchor &registrationFlowSteps is defined here but creates a tight coupling between the request example and the response example (line 642). If either example needs to be modified independently in the future, this could cause issues. Consider duplicating the steps definition in both places for better maintainability.

Suggested change
steps: &registrationFlowSteps
steps:

Copilot uses AI. Check for mistakes.
Comment on lines +671 to +674
size:
$ref: '#/components/schemas/Size'
position:
$ref: '#/components/schemas/Position'
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The size and position fields in the Step schema are not marked as required, but based on the examples throughout the document (lines 393-398, 407-412, etc.), these fields are always provided. Consider marking them as required if they are essential for the flow composer UI, or clarify in the description when they are optional.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Skip generating changelog for a particular PR Type/New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define Flow Management API contract

1 participant