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

Function generateStringExample

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

Source from the content-addressed store, hash-verified

378}
379
380func generateStringExample(schema map[string]any) any {
381 if enum, ok := schema["enum"].([]any); ok && len(enum) > 0 {
382 if str, ok := enum[0].(string); ok {
383 return str
384 }
385 }
386 return "string"
387}
388
389func generateNumberExample(schema map[string]any) any {
390 if examples, ok := schema["examples"].([]any); ok && len(examples) > 0 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected