File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,16 @@ func runValidation() error {
76
76
77
77
// Extract server portion if this is a PublishRequest format
78
78
serverData := data
79
+ publishRequestValid := true
79
80
if dataMap , ok := data .(map [string ]any ); ok {
80
81
if server , exists := dataMap ["server" ]; exists {
82
+ // This is a PublishRequest format - validate only expected properties exist
83
+ for key := range dataMap {
84
+ if key != "server" && key != "x-publisher" {
85
+ log .Printf (" Invalid PublishRequest property: ❌ %s (only 'server' and optional 'x-publisher' are allowed)" , key )
86
+ publishRequestValid = false
87
+ }
88
+ }
81
89
serverData = server
82
90
}
83
91
}
@@ -101,8 +109,8 @@ func runValidation() error {
101
109
registryValid = true
102
110
}
103
111
104
- // Only count as validated if both schemas passed
105
- if baseValid && registryValid {
112
+ // Only count as validated if all validations passed
113
+ if publishRequestValid && baseValid && registryValid {
106
114
validatedCount ++
107
115
}
108
116
You can’t perform that action at this time.
0 commit comments