wso2 / wso2/api-platform

Implement upstream reference validation in API configuration

Open
#410 0 comments 0 reactions 1 assignee View on GitHub

@nimsara66 is already working on this.

Since Dec 12, 2025.

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

Description

Context

During the review of PR #403, it was identified that the validateUpstreamRef function in gateway/gateway-controller/pkg/config/api_validator.go (line 203) is currently a stub with a TODO comment.

The Ref field is already part of the documented Upstream schema (intended to reference a predefined upstreamDefinition), and the validation function is actively invoked when up.Ref is set. However, it currently returns no validation errors, leaving this feature without proper validation.

What needs to be done

Implement the validation logic for upstream references in the validateUpstreamRef function to ensure that:

  • Referenced upstream definitions exist and are valid
  • The reference format follows expected patterns
  • Appropriate error messages are returned for invalid references

Related

This feature was noted in the PR objectives as "Advanced upstream configuration referencing capability" and is part of the enhanced API configuration support.

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.