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

Function generateObjectExample

pkg/parser/schema_suggestions.go:411–423  ·  view source on GitHub ↗
(schema map[string]any)

Source from the content-addressed store, hash-verified

409}
410
411func generateObjectExample(schema map[string]any) any {
412 result := make(map[string]any)
413 properties, ok := schema["properties"].(map[string]any)
414 if !ok {
415 return result
416 }
417
418 requiredFields := collectRequiredFields(schema)
419 count := 0
420 count = addObjectExamples(result, properties, requiredFields, true, count)
421 addObjectExamples(result, properties, requiredFields, false, count)
422 return result
423}
424
425func collectRequiredFields(schema map[string]any) map[string]struct {
426} {

Callers 1

Calls 2

collectRequiredFieldsFunction · 0.85
addObjectExamplesFunction · 0.85

Tested by

no test coverage detected