Skip to content

Commit 21acbeb

Browse files
committed
Rename enumString to enumeration and update array param ordering
1 parent df384ad commit 21acbeb

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

FirebaseVertexAI/Sources/Schema.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,12 @@ public class Schema {
114114
)
115115
}
116116

117-
public static func enumString(description: String? = nil, nullable: Bool = false,
118-
enumValues: String...) -> Schema {
119-
return Schema.enumString(description: description, nullable: nullable, enumValues: enumValues)
120-
}
121-
122-
static func enumString(description: String?, nullable: Bool, enumValues: [String]) -> Schema {
117+
public static func enumeration(values: [String], description: String?, nullable: Bool) -> Schema {
123118
return self.init(
124119
type: .string,
125120
format: "enum", description: description,
126121
nullable: nullable,
127-
enumValues: enumValues
122+
enumValues: values
128123
)
129124
}
130125

@@ -160,8 +155,7 @@ public class Schema {
160155
return self.init(type: .boolean, description: description, nullable: nullable)
161156
}
162157

163-
public static func array(description: String? = nil, nullable: Bool = false,
164-
items: Schema) -> Schema {
158+
public static func array(items: Schema, description: String? = nil, nullable: Bool = false) -> Schema {
165159
return self.init(type: .array, description: description, nullable: nullable, items: items)
166160
}
167161

0 commit comments

Comments
 (0)