apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: subordinate protocol validation and deletion check

Open janiussyafiq opened this issue 11 months ago • 1 comments

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

  • [x] I have explained the need for this PR and the problem it solves
  • [x] I have explained the changes or the new features added to this PR
  • [x] 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)

janiussyafiq avatar Dec 06 '25 21:12 janiussyafiq

Duplicate of #12794

Baoyuantop avatar Dec 08 '25 08:12 Baoyuantop

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

Baoyuantop avatar Dec 17 '25 03:12 Baoyuantop