wso2 / wso2/api-platform

Refactor and enhance API publishing flow

Open
#139 4 comments 0 reactions 1 assignee View on GitHub

@DakshithaS is already working on this.

Since Nov 11, 2025.

Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Overview

This issue tracks the refactoring and enhancement of the entire API publishing flow to improve structure, maintainability, and functionality.

Background

During review of PR #136, several opportunities for improvement in the API publishing flow were identified. Rather than addressing these piecemeal, this issue consolidates the effort to re-implement and refactor the publishing flow comprehensively.

Scope

1. Gateway UUID Validation
  • Current validation in APIPublication.Validate() requires SandboxGatewayUUID and ProductionGatewayUUID for all statuses
  • Should only require gateway UUIDs when publication status is Published
  • This blocks creation of records in unpublished, publishing, or failed states without gateway mappings
2. Publishing Flow Architecture
  • Review and refactor the end-to-end publishing workflow
  • Improve state management and transitions
  • Enhance error handling and recovery mechanisms
  • Optimize validation logic throughout the flow
3. Code Structure and Maintainability
  • Improve separation of concerns
  • Enhance testability
  • Add comprehensive validation at appropriate layers
  • Document the publishing lifecycle clearly

References

Acceptance Criteria

  • Gateway UUID validation is conditional based on publication status
  • Publishing flow is well-structured and maintainable
  • Comprehensive tests cover the refactored flow
  • Documentation describes the publishing lifecycle and validation rules
  • Error handling provides clear, actionable feedback

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.