Skip to content

Commit

Permalink
Merge pull request #661 from tenacioustommy/fix-title-schema
Browse files Browse the repository at this point in the history
fix delete title schema
  • Loading branch information
Calcium-Ion authored Dec 26, 2024
2 parents bb3deb7 + 3409d7a commit 132c713
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relay/channel/gemini/relay-gemini.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ func removeAdditionalPropertiesWithDepth(schema interface{}, depth int) interfac
if !ok || len(v) == 0 {
return schema
}

// 删除所有的title字段
delete(v, "title")
// 如果type不为object和array,则直接返回
if typeVal, exists := v["type"]; !exists || (typeVal != "object" && typeVal != "array") {
return schema
}
delete(v, "title")
switch v["type"] {
case "object":
delete(v, "additionalProperties")
Expand Down

0 comments on commit 132c713

Please sign in to comment.