Skip to content

Commit 9de17a2

Browse files
feat: [STG-1053] [server] Use fastify-zod-openapi + zod v4 for openapi generation
1 parent 54eba34 commit 9de17a2

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-4fb17cafc413ae3d575e3268602b01d2d0e9ebeb734a41b6086b3353ff0d2523.yml
3-
openapi_spec_hash: 8d48d8564849246f6f14d900c6c5f60c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-ed52466945f2f8dfd3814a29e948d7bf30af7b76a7a7689079c03b8baf64e26f.yml
3+
openapi_spec_hash: 5d57aaf2362b0d882372dbf76477ba23
44
config_hash: 5c69fb596588b8ace08203858518c149

stagehand-java-core/src/main/kotlin/com/browserbase/api/models/sessions/SessionStartParams.kt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7061,7 +7061,7 @@ private constructor(
70617061
}
70627062

70637063
/** Logging verbosity level (0=quiet, 1=normal, 2=debug) */
7064-
class Verbose @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
7064+
class Verbose @JsonCreator private constructor(private val value: JsonField<Double>) : Enum {
70657065

70667066
/**
70677067
* Returns this class instance's raw value.
@@ -7071,17 +7071,17 @@ private constructor(
70717071
* older version than the API, then the API may respond with new members that the SDK is
70727072
* unaware of.
70737073
*/
7074-
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value
7074+
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<Double> = value
70757075

70767076
companion object {
70777077

7078-
@JvmField val _0 = of("0")
7078+
@JvmField val _0 = of(0.0)
70797079

7080-
@JvmField val _1 = of("1")
7080+
@JvmField val _1 = of(1.0)
70817081

7082-
@JvmField val _2 = of("2")
7082+
@JvmField val _2 = of(2.0)
70837083

7084-
@JvmStatic fun of(value: String) = Verbose(JsonField.of(value))
7084+
@JvmStatic fun of(value: Double) = Verbose(JsonField.of(value))
70857085
}
70867086

70877087
/** An enum containing [Verbose]'s known values. */
@@ -7143,16 +7143,12 @@ private constructor(
71437143
/**
71447144
* Returns this class instance's primitive wire representation.
71457145
*
7146-
* This differs from the [toString] method because that method is primarily for debugging
7147-
* and generally doesn't throw.
7148-
*
71497146
* @throws StagehandInvalidDataException if this class instance's value does not have the
71507147
* expected primitive type.
71517148
*/
7152-
fun asString(): String =
7153-
_value().asString().orElseThrow {
7154-
StagehandInvalidDataException("Value is not a String")
7155-
}
7149+
fun asDouble(): Double =
7150+
_value().asNumber().getOrNull()?.toDouble()
7151+
?: throw StagehandInvalidDataException("Value is not a Double")
71567152

71577153
private var validated: Boolean = false
71587154

0 commit comments

Comments
 (0)