Open SparkYuan opened 3 months ago
Is your feature request related to a problem? Please describe:
No Describe the feature you'd like:
Add an API to return a specific schema inheritance chain, such as func inheritanceChain(t string) []string
func inheritanceChain(t string) []string
Schema A inherited schema B and B inherited C. The return of inheritanceChain(A) should be [C,B,A]
A
B
C
inheritanceChain(A)
Hello @SparkYuan
You can use the API https://github.com/kcl-lang/kpm/blob/c3823c26f4860a50239b9c09bd714f79eaaa0587/pkg/api/kpm_pkg.go#L135 with the KclPackage at the stack.
Feature Request
Is your feature request related to a problem? Please describe:
No Describe the feature you'd like:
Add an API to return a specific schema inheritance chain, such as
func inheritanceChain(t string) []string
Schema
A
inherited schemaB
andB
inheritedC
. The return ofinheritanceChain(A)
should be [C,B,A]