Skip to content

Commit

Permalink
Merge branch 'main' into davidmotson.count_token_full
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmotson authored Jun 4, 2024
2 parents 5e07ea5 + 28016d1 commit 12550d7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,17 @@ class Schema<T>(
nullable = false,
)

/** Registers a schema for an array */
fun arr(name: String, description: String) =
/**
* Registers a schema for an array.
*
* @param items can be used to specify the type of the array
*/
fun arr(name: String, description: String, items: Schema<out Any>? = null) =
Schema<List<String>>(
name = name,
description = description,
type = FunctionType.ARRAY,
items = items,
nullable = false,
)

Expand Down

0 comments on commit 12550d7

Please sign in to comment.