(schema map[string]any)
| 409 | } |
| 410 | |
| 411 | func 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 | |
| 425 | func collectRequiredFields(schema map[string]any) map[string]struct { |
| 426 | } { |
no test coverage detected