Skip to content

Commit

Permalink
Remove format from double helper function (#6432)
Browse files Browse the repository at this point in the history
We can omit the format for the double-precision floating point type

See firebase/firebase-ios-sdk#13990 for further
context
  • Loading branch information
rlazo authored Nov 6, 2024
1 parent 80019ca commit 9754546
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions firebase-vertexai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* [fixed] Improved error message when using an invalid location. (#6428)
* [fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409)
* [fixed] Clarified in the documentation that `Schema.integer` and `Schema.float` only provide hints to the model. (#6420)
* [fixed] Fixed issue were `Schema.double` set the format parameter in `Schema`. (#6432)

# 16.0.1
* [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal constructor(
@JvmName("numDouble")
@JvmOverloads
public fun double(description: String? = null, nullable: Boolean = false): Schema =
Schema(description = description, nullable = nullable, type = "NUMBER", format = "double")
Schema(description = description, nullable = nullable, type = "NUMBER")

/**
* Returns a [Schema] for a single-precision floating-point number.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ internal class SchemaTests {
"coordinates": {
"type": "OBJECT",
"properties": {
"latitude": {"type": "NUMBER", "format": "double"},
"longitude": {"type": "NUMBER","format": "double"}
"latitude": {"type": "NUMBER"},
"longitude": {"type": "NUMBER"}
},
"required": ["latitude","longitude"]
},
Expand All @@ -82,7 +82,7 @@ internal class SchemaTests {
},
"required": ["latitudinal","longitudinal"]
},
"elevation": {"type": "NUMBER","format": "double"},
"elevation": {"type": "NUMBER"},
"isCapital": {"type": "BOOLEAN"},
"foundingDate": {"type": "STRING","format": "date","nullable": true}
},
Expand Down Expand Up @@ -177,8 +177,8 @@ internal class SchemaTests {
"description": "coordinates",
"nullable": true,
"properties": {
"latitude": {"type": "NUMBER", "description": "latitude", "format": "double"},
"longitude": {"type": "NUMBER", "description": "longitude", "format": "double"}
"latitude": {"type": "NUMBER", "description": "latitude"},
"longitude": {"type": "NUMBER", "description": "longitude"}
},
"required": ["latitude","longitude"]
},
Expand Down

0 comments on commit 9754546

Please sign in to comment.