Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions nodejs/test/shared-codegen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
ReasoningSummary: {
type: "string",
enum: ["concise", "detailed"],
description: "Reasoning summary mode used for model calls.",
},
SharedPayload: {
type: "object",
Expand Down Expand Up @@ -74,6 +75,7 @@
ReasoningSummary: {
type: "string",
enum: ["concise", "detailed"],
description: "Reasoning summary mode to request for supported model clients.",
},
SharedPayload: {
type: "object",
Expand Down Expand Up @@ -242,7 +244,7 @@
"SessionStartData",
"SessionStartEvent",
]);
const inlinedDefinitions = inlined.definitions as Record<string, any>;

Check warning on line 247 in nodejs/test/shared-codegen.test.ts

View workflow job for this annotation

GitHub Actions / Node.js SDK Tests (macos-latest)

Unexpected any. Specify a different type

Check warning on line 247 in nodejs/test/shared-codegen.test.ts

View workflow job for this annotation

GitHub Actions / Node.js SDK Tests (windows-latest)

Unexpected any. Specify a different type

Check warning on line 247 in nodejs/test/shared-codegen.test.ts

View workflow job for this annotation

GitHub Actions / Node.js SDK Tests (ubuntu-latest)

Unexpected any. Specify a different type
expect(inlinedDefinitions.EventsReadResult.properties.events.items.$ref).toBe(
"#/definitions/SessionEvent"
);
Expand Down
4 changes: 3 additions & 1 deletion scripts/codegen/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,9 @@ function normalizeDefinitionForComparison(definition: JSONSchema7Definition): un

const result: Record<string, unknown> = {};
for (const [key, value] of Object.entries(definition as Record<string, unknown>)) {
if (key === "$ref" && typeof value === "string") {
if (key === "description" || key === "markdownDescription") {
continue;
} else if (key === "$ref" && typeof value === "string") {
const localRef = parseLocalDefinitionRef(value);
result[key] = localRef ? `#/definitions/${localRef}` : value;
} else if (Array.isArray(value)) {
Expand Down
Loading