[v11.0.x] Expressions+Testdata: Create json schema for query types (#86164)
Expressions: Create json schema for query types (#84032)
(cherry picked from commit 4cda34ff7d)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
0a95bcb6bd
commit
9744f081fc
@@ -1,6 +1,7 @@
|
||||
package expr
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -177,6 +178,13 @@ func (h *ExpressionQueryReader) ReadQuery(
|
||||
return eq, err
|
||||
}
|
||||
|
||||
//go:embed query.types.json
|
||||
var f embed.FS
|
||||
|
||||
func (h *ExpressionQueryReader) QueryTypeDefinitionListJSON() ([]byte, error) {
|
||||
return f.ReadFile("query.types.json")
|
||||
}
|
||||
|
||||
func getReferenceVar(exp string, refId string) (string, error) {
|
||||
exp = strings.TrimPrefix(exp, "$")
|
||||
if exp == "" {
|
||||
|
||||
Reference in New Issue
Block a user