History

**refactor(antigravity): handle `anyOf` property, remove `exclusiveMinimum`, and comment unused prod URL**

Luis Pater committed 11 months ago

Commit d4d52981 parent 361443d1 file · +14 −1Browse files

Unified · Split

internal/runtime/executor/antigravity_executor.go+14−1
@@ -525,6 +525,19 @@ func (e *AntigravityExecutor) buildRequest(ctx context.Context, auth *cliproxyau · 524 unmodified lines
525 strJSON = util.DeleteKey(strJSON, "minItems")525 strJSON = util.DeleteKey(strJSON, "minItems")
526 strJSON = util.DeleteKey(strJSON, "minLength")526 strJSON = util.DeleteKey(strJSON, "minLength")
527 strJSON = util.DeleteKey(strJSON, "maxLength")527 strJSON = util.DeleteKey(strJSON, "maxLength")
528 strJSON = util.DeleteKey(strJSON, "exclusiveMinimum")
529
530 paths = make([]string, 0)
531 util.Walk(gjson.Parse(strJSON), "", "anyOf", &paths)
532 for _, p := range paths {
533 anyOf := gjson.Get(strJSON, p)
534 if anyOf.IsArray() {
535 anyOfItems := anyOf.Array()
536 if len(anyOfItems) > 0 {
537 strJSON, _ = sjson.SetRaw(strJSON, p[:len(p)-len(".anyOf")], anyOfItems[0].Raw)
538 }
539 }
540 }
528 541
529 payload = []byte(strJSON)542 payload = []byte(strJSON)
530 }543 }
@@ -665,7 +678,7 @@ func antigravityBaseURLFallbackOrder(auth *cliproxyauth.Auth) []string { · 134 unmodified lines
665 return []string{678 return []string{
666 antigravityBaseURLDaily,679 antigravityBaseURLDaily,
667 antigravityBaseURLAutopush,680 antigravityBaseURLAutopush,
668 antigravityBaseURLProd,681 // antigravityBaseURLProd,
669 }682 }
670}683}
671 684