Implement upstream reference validation in API configuration
@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
- Pull Request: https://github.com/wso2/api-platform/pull/403
- Review Comment: https://github.com/wso2/api-platform/pull/403#discussion_r2612848203
- Requested by: @nimsara66
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.