refactor(McpSchema): convert StopReason enum values to camelCase

Change format from snake_case to camelCase:
- end_turn → endTurn
- stop_sequence → stopSequence
- max_tokens → maxTokens

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov 2025-03-20 18:58:38 +01:00 • committed by Christian Tzolov
commit 3e2139fa27
2 changed files with 4 additions and 4 deletions

View file

@ -810,9 +810,9 @@ public final class McpSchema {
@JsonProperty("stopReason") StopReason stopReason) {
public enum StopReason {
@JsonProperty("end_turn") END_TURN,
@JsonProperty("stop_sequence") STOP_SEQUENCE,
@JsonProperty("max_tokens") MAX_TOKENS
@JsonProperty("endTurn") END_TURN,
@JsonProperty("stopSequence") STOP_SEQUENCE,
@JsonProperty("maxTokens") MAX_TOKENS
}
public static Builder builder() {

View file

@ -553,7 +553,7 @@ public class McpSchemaTests {
.isObject()
.isEqualTo(
json("""
{"role":"assistant","content":{"type":"text","text":"Assistant response"},"model":"gpt-4","stopReason":"end_turn"}"""));
{"role":"assistant","content":{"type":"text","text":"Assistant response"},"model":"gpt-4","stopReason":"endTurn"}"""));
}
// Roots Tests