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

Function generateNumberExample

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

Source from the content-addressed store, hash-verified

387}
388
389func generateNumberExample(schema map[string]any) any {
390 if examples, ok := schema["examples"].([]any); ok && len(examples) > 0 {
391 return examples[0]
392 }
393 if defaultVal, ok := schema["default"]; ok {
394 return defaultVal
395 }
396 return 42
397}
398
399func generateArrayExample(schema map[string]any) any {
400 items, ok := schema["items"].(map[string]any)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected