MCPcopy Create free account
hub / github.com/github/gh-aw / knownFieldHintForPath

Function knownFieldHintForPath

pkg/parser/schema_errors.go:372–381  ·  view source on GitHub ↗
(jsonPath string)

Source from the content-addressed store, hash-verified

370}
371
372func knownFieldHintForPath(jsonPath string) (string, []string, string, bool) {
373 if hint, ok := knownFieldValidValues[jsonPath]; ok {
374 return hint, knownFieldScopes[jsonPath], knownFieldDocs[jsonPath], true
375 }
376 bestPath := findBestKnownFieldParentPath(jsonPath)
377 if bestPath == "" {
378 return "", nil, "", false
379 }
380 return knownFieldValidValues[bestPath], knownFieldScopes[bestPath], knownFieldDocs[bestPath], true
381}
382
383func findBestKnownFieldParentPath(jsonPath string) string {
384 bestPath := ""

Callers 1

Calls 1

Tested by

no test coverage detected