From 5fa85b7e8bbf2e50a68d43341f64fadf12ae8b49 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:49:46 -0500 Subject: [PATCH] tests: add missing type params to expected schema --- .../Unit/Utils/JsonSchemaGeneratorTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/AnthropicClient.Tests/Unit/Utils/JsonSchemaGeneratorTests.cs b/tests/AnthropicClient.Tests/Unit/Utils/JsonSchemaGeneratorTests.cs index c28fe9b..e4d839d 100644 --- a/tests/AnthropicClient.Tests/Unit/Utils/JsonSchemaGeneratorTests.cs +++ b/tests/AnthropicClient.Tests/Unit/Utils/JsonSchemaGeneratorTests.cs @@ -29,13 +29,14 @@ public class JsonSchemaGeneratorTests { ["age"] = new JsonObject() { + ["type"] = "integer", ["description"] = string.Empty } }, ["required"] = new JsonArray(), }; - var testMethod = (int age) => age; + var testMethod = (int age = 0) => age; var function = new AnthropicFunction(testMethod.Method); var schema = JsonSchemaGenerator.GenerateInputSchema(function); @@ -53,6 +54,7 @@ public class JsonSchemaGeneratorTests { ["name"] = new JsonObject() { + ["type"] = "string", ["description"] = string.Empty } }, @@ -80,6 +82,7 @@ public class JsonSchemaGeneratorTests { ["Person's Age"] = new JsonObject() { + ["type"] = "integer", ["description"] = "The age of the person." } },