Skip to content

Commit 93e183e

Browse files
committed
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 <[email protected]>
1 parent dc8e93b commit 93e183e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mcp/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,9 @@ public record CreateMessageResult(// @formatter:off
810810
@JsonProperty("stopReason") StopReason stopReason) {
811811

812812
public enum StopReason {
813-
@JsonProperty("end_turn") END_TURN,
814-
@JsonProperty("stop_sequence") STOP_SEQUENCE,
815-
@JsonProperty("max_tokens") MAX_TOKENS
813+
@JsonProperty("endTurn") END_TURN,
814+
@JsonProperty("stopSequence") STOP_SEQUENCE,
815+
@JsonProperty("maxTokens") MAX_TOKENS
816816
}
817817

818818
public static Builder builder() {

mcp/src/test/java/io/modelcontextprotocol/spec/McpSchemaTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ void testCreateMessageResult() throws Exception {
553553
.isObject()
554554
.isEqualTo(
555555
json("""
556-
{"role":"assistant","content":{"type":"text","text":"Assistant response"},"model":"gpt-4","stopReason":"end_turn"}"""));
556+
{"role":"assistant","content":{"type":"text","text":"Assistant response"},"model":"gpt-4","stopReason":"endTurn"}"""));
557557
}
558558

559559
// Roots Tests

0 commit comments

Comments
 (0)