Skip to content

Add @JvmOverloads to schema declarations #6355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ internal constructor(
public companion object {
/** Returns a schema for a boolean */
@JvmStatic
@JvmOverloads
public fun boolean(description: String? = null, nullable: Boolean = false): Schema =
Schema(
description = description,
Expand All @@ -51,6 +52,7 @@ internal constructor(
*/
@JvmStatic
@JvmName("numInt")
@JvmOverloads
public fun integer(description: String? = null, nullable: Boolean = false): Schema =
Schema(
description = description,
Expand All @@ -67,6 +69,7 @@ internal constructor(
*/
@JvmStatic
@JvmName("numLong")
@JvmOverloads
public fun long(description: String? = null, nullable: Boolean = false): Schema =
Schema(
description = description,
Expand All @@ -82,6 +85,7 @@ internal constructor(
*/
@JvmStatic
@JvmName("numDouble")
@JvmOverloads
public fun double(description: String? = null, nullable: Boolean = false): Schema =
Schema(description = description, nullable = nullable, type = "NUMBER", format = "double")

Expand All @@ -93,6 +97,7 @@ internal constructor(
*/
@JvmStatic
@JvmName("numFloat")
@JvmOverloads
public fun float(description: String? = null, nullable: Boolean = false): Schema =
Schema(description = description, nullable = nullable, type = "NUMBER", format = "float")

Expand All @@ -105,6 +110,7 @@ internal constructor(
*/
@JvmStatic
@JvmName("str")
@JvmOverloads
public fun string(
description: String? = null,
nullable: Boolean = false,
Expand All @@ -125,6 +131,7 @@ internal constructor(
* @param nullable: Whether null is a valid value for this schema
*/
@JvmStatic
@JvmOverloads
public fun obj(
properties: Map<String, Schema>,
optionalProperties: List<String> = emptyList(),
Expand Down Expand Up @@ -153,6 +160,7 @@ internal constructor(
* @param nullable: Whether null is a valid value for this schema
*/
@JvmStatic
@JvmOverloads
public fun array(
items: Schema,
description: String? = null,
Expand All @@ -173,6 +181,7 @@ internal constructor(
* @param nullable: Whether null is a valid value for this schema
*/
@JvmStatic
@JvmOverloads
public fun enumeration(
values: List<String>,
description: String? = null,
Expand Down
Loading