Skip to content

Fix sample, seeding scripts, and tests in devportal#2206

Merged
Piumal1999 merged 5 commits into
wso2:mainfrom
lasanthaS:main
Jun 16, 2026
Merged

Fix sample, seeding scripts, and tests in devportal#2206
Piumal1999 merged 5 commits into
wso2:mainfrom
lasanthaS:main

Conversation

@lasanthaS

@lasanthaS lasanthaS commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Purpose

$subject

Related to #2379, #2382

Security checks

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b2c0302c-e50f-488f-bf4c-b7fde78c137f

📥 Commits

Reviewing files that changed from the base of the PR and between 06b58c9 and ab9831a.

📒 Files selected for processing (2)
  • portals/developer-portal/README.md
  • portals/developer-portal/docs/introduction/quick-start.md
✅ Files skipped from review due to trivial changes (1)
  • portals/developer-portal/README.md

📝 Walkthrough

Summary

This pull request updates the developer portal component with API endpoint changes, test updates, configuration enhancements, and documentation improvements across seeding scripts, samples, and tests.

Major Changes

API Endpoint and Route Updates

  • Updated API seeding script (seed-apis.sh) to use new devportal API paths scoped under /o/$ORG_ID/devportal/v1/... instead of the previous /devportal/organizations/$ORG_ID/... endpoints
  • Enhanced API seeding to support multiple API definition file types by searching for the first definition.* match (e.g., definition.yaml, definition.graphql) instead of assuming a single openapi.yaml file
  • Updated file upload logic to use different multipart field names based on file extension: schemaDefinition for GraphQL, otherwise apiDefinition
  • Modified Quick Start documentation to use HTTPS endpoints and new default organization/view structure (/default/views/default)
  • Updated Cypress tests and support files to reference the new organizations and API endpoints

Data Model Changes

  • Removed UNIQUE constraint from ORG_ID column in DP_APPLICATION table (both in database schema and application model), allowing multiple applications per organization

Configuration and Service Updates

  • Added controlPlane section to configuration defaults with fields for enabled, url, graphqlURL, and disableCertValidation
  • Updated admin DAO to dynamically select SQL aggregation function based on database dialect (json_group_object for SQLite, JSON_OBJECT_AGG for others)
  • Enhanced API metadata service to:
    • Validate and support .xml and .wsdl API definition files in addition to JSON and YAML
    • Handle GraphQL uploads more flexibly by accepting schema definitions without requiring API definition files
    • Enforce consistent naming for GraphQL schema files

API Handler Changes

  • Updated exported handler function names in API content handler for consistency (casing changes: createAPIContentcreateApiContent, updateAPIContentreplaceApiContent)
  • Updated API flows handler exports with casing standardization (e.g., createAPIFlowcreateApiFlow, getAllAPIFlowsgetAllApiFlows)

SOAP API Support

  • Added specialized handling for SOAP API content in the API content controller to distinguish from OpenAPI/Swagger specifications

Documentation

  • Added "Makefile Targets" section to README documenting common make commands for building, testing, and database operations
  • Updated Quick Start guide to reflect new default organization conventions and HTTPS protocol usage for local development

Testing and Quality

  • Cypress smoke tests updated to verify new API endpoint routes
  • All changes follow secure coding standards with FindSecurityBugs verification completed

Walkthrough

This PR restructures the developer portal to support multiple applications per organization and modernizes the API endpoint design. The DP_APPLICATION table's ORG_ID column removes its UNIQUE constraint in both the Postgres schema and Sequelize model, enabling multiple apps per organization. Devportal REST API paths are restructured from /devportal/organizations/... to /organizations (for org lookup) and /o/:orgId/devportal/v1/... (for API, content, and view operations), with updates applied throughout the seeder script and Cypress tests. The API content controller gains dedicated SOAP handling, separating it from OpenAPI/Swagger parsing flows to populate serverDetails from endpoint metadata instead. The apiMetadataService is extended to accept GraphQL-only uploads via schemaDefinition files and to support .xml and .wsdl definition file types with empty-content validation. Handler exports in apiContent.js and apiFlows.js are renamed to consistent camelCase. CONFIG_DEFAULTS gains a controlPlane section with endpoint and certificate validation settings. The admin DAO is updated for SQLite dialect compatibility in JSON aggregation. Documentation is updated to reflect the new default organization structure and HTTPS-based setup.

Suggested Reviewers

  • RakhithaRR
  • Tharsanan1
  • VirajSalaka
  • renuka-fernando
  • tharindu1st
  • malinthaprasan
  • chamilaadhi
  • dushaniw
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is substantially incomplete. While security checks are addressed, critical template sections are missing: Purpose lacks issue links and detailed problem explanation, and Goals, Approach, User stories, Documentation, Automation tests, Samples, Related PRs, and Test environment sections are entirely absent. Complete the description by adding: specific issues being resolved, goals/solutions, implementation approach, affected user stories, documentation links, test coverage details (unit and integration), sample high-level details, related PRs, and test environment specifications.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix sample, seeding scripts, and tests in devportal' directly matches the changeset, which includes updates to seed scripts (seed-apis.sh), tests (Cypress files), configuration/samples (configLoader.js, quick-start.md), and related code. The title is specific and clearly summarizes the scope.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Piumal1999 Piumal1999 merged commit 1897274 into wso2:main Jun 16, 2026
1 of 2 checks passed
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.

2 participants