Expressions: Create json schema for query types (#84032)

This commit is contained in:
Ryan McKinley
2024-03-26 06:58:56 +02:00
committed by GitHub
parent 2e06677240
commit 4cda34ff7d
40 changed files with 4649 additions and 654 deletions
+8
View File
@@ -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 == "" {