normalizeAdditionalPropertyList strips quotes, trims whitespace, and sorts the comma-separated property names so that diagnostics are deterministic regardless of the order in which the schema validator emits them.
(raw string)
| 469 | // comma-separated property names so that diagnostics are deterministic regardless |
| 470 | // of the order in which the schema validator emits them. |
| 471 | func normalizeAdditionalPropertyList(raw string) string { |
| 472 | raw = strings.ReplaceAll(raw, "'", "") |
| 473 | parts := strings.Split(raw, ",") |
| 474 | cleaned := make([]string, 0, len(parts)) |
| 475 | for _, part := range parts { |
| 476 | trimmed := strings.TrimSpace(part) |
| 477 | if trimmed != "" { |
| 478 | cleaned = append(cleaned, trimmed) |
| 479 | } |
| 480 | } |
| 481 | sort.Strings(cleaned) |
| 482 | return strings.Join(cleaned, ", ") |
| 483 | } |
no outgoing calls
no test coverage detected