Skip to content

Conversation

@janiussyafiq
Copy link

Description

Which issue(s) this PR fixes:

Fixes #6939
This PR implements subordinate (parent–child) relationship validation for stream routes in the Admin API, as proposed in issue #6939. Previously, stream routes could reference a superior_id without any validation, which could lead to invalid configurations, broken dependencies, and runtime routing errors.

This change ensures that:
• Any referenced superior stream route must exist.
• The protocols between subordinate and superior routes must match.
• A superior stream route cannot be deleted if it is still referenced by another route.

Also added some test cases for this update.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Dec 6, 2025
@janiussyafiq janiussyafiq changed the title feat/subordinate protocol validation and deletion check feat:subordinate protocol validation and deletion check Dec 6, 2025
@janiussyafiq janiussyafiq changed the title feat:subordinate protocol validation and deletion check feat: subordinate protocol validation and deletion check Dec 6, 2025
@Baoyuantop
Copy link
Contributor

Duplicate of #12794

@Baoyuantop Baoyuantop marked this as a duplicate of #12794 Dec 8, 2025
@Baoyuantop
Copy link
Contributor

Hi @janiussyafiq, since PR #12794 has already implemented the same changes, this pull request has been closed. Thank you for your contribution.

@Baoyuantop Baoyuantop closed this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: As a user, I want to check the subordinate relationship in the Admin API

2 participants