From 7f03364d2a74e4923f9a7db662f2490a447f2f0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:02:49 +0000 Subject: [PATCH 1/7] Initial plan From 7b44871c5ad0ee92b229822ccf85299e5e64ab05 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:07:43 +0000 Subject: [PATCH 2/7] Add support for missing type keyword with format in OpenAPI schemas Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- src/Kiota.Builder/KiotaBuilder.cs | 9 +- .../Kiota.Builder.Tests/KiotaBuilderTests.cs | 101 ++++++++++++++++++ 2 files changed, 106 insertions(+), 4 deletions(-) diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index aa0851fbaa..13b3a66dff 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1239,10 +1239,6 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten (_, "byte") => new CodeType { Name = "base64", IsExternal = true }, (_, "binary") => new CodeType { Name = "binary", IsExternal = true }, (JsonSchemaType.String, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, - (JsonSchemaType.String, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, - (JsonSchemaType.String, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, - (JsonSchemaType.String, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, - (JsonSchemaType.String, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, (JsonSchemaType.String, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, // covers commonmark and html (JsonSchemaType.Number, "double" or "float" or "decimal") => new CodeType { Name = format.ToLowerInvariant(), IsExternal = true }, @@ -1254,6 +1250,11 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten (JsonSchemaType.Number, _) => new CodeType { Name = "double", IsExternal = true }, (JsonSchemaType.Integer, _) => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Boolean, _) => new CodeType { Name = "boolean", IsExternal = true }, + // Handle formats that can appear without a type (e.g., from ASP.NET OpenAPI generator in .NET 10+) + (_, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, + (_, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, + (_, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, + (_, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, (_, _) when !string.IsNullOrEmpty(childType) => new CodeType { Name = childType, IsExternal = false, }, (_, _) => null, }; diff --git a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs index a332cf63c1..2abdf6c7d9 100644 --- a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs +++ b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs @@ -4329,6 +4329,107 @@ public void MapsQueryParameterTypes(JsonSchemaType type, string format, string e Assert.Equal(expected, property.Type.Name); Assert.True(property.Type.AllTypes.First().IsExternal); } + [InlineData("date-time", "DateTimeOffset")] + [InlineData("duration", "TimeSpan")] + [InlineData("time", "TimeOnly")] + [InlineData("date", "DateOnly")] + [InlineData("byte", "base64")] + [InlineData("binary", "binary")] + [Theory] + public void MapsPrimitiveFormatsWithoutType(string format, string expected) + { + var document = new OpenApiDocument + { + Paths = new OpenApiPaths + { + ["primitive"] = new OpenApiPathItem + { + Operations = new() + { + [NetHttpMethod.Get] = new OpenApiOperation + { + Responses = new OpenApiResponses + { + ["200"] = new OpenApiResponse + { + Content = new Dictionary() + { + ["application/json"] = new OpenApiMediaType + { + Schema = new OpenApiSchema + { + // Type is intentionally not set to simulate .NET 10 ASP.NET OpenAPI generator behavior + Format = format + } + } + } + }, + } + } + } + } + }, + }; + var mockLogger = new Mock>(); + var builder = new KiotaBuilder(mockLogger.Object, new GenerationConfiguration { ClientClassName = "Graph", ApiRootUrl = "https://localhost" }, _httpClient); + var node = builder.CreateUriSpace(document); + var codeModel = builder.CreateSourceModel(node); + var requestBuilder = codeModel.FindChildByName("primitiveRequestBuilder"); + Assert.NotNull(requestBuilder); + var method = requestBuilder.GetChildElements(true).OfType().FirstOrDefault(x => x.IsOfKind(CodeMethodKind.RequestExecutor)); + Assert.NotNull(method); + Assert.Equal(expected, method.ReturnType.Name); + Assert.True(method.ReturnType.AllTypes.First().IsExternal); + } + [InlineData("date-time", "DateTimeOffset")] + [InlineData("duration", "TimeSpan")] + [InlineData("time", "TimeOnly")] + [InlineData("date", "DateOnly")] + [InlineData("byte", "base64")] + [InlineData("binary", "binary")] + [Theory] + public void MapsQueryParameterTypesWithoutType(string format, string expected) + { + var document = new OpenApiDocument + { + Paths = new OpenApiPaths + { + ["primitive"] = new OpenApiPathItem + { + Operations = new() + { + [NetHttpMethod.Get] = new OpenApiOperation + { + Parameters = new List { + new OpenApiParameter() { + Name = "query", + In = ParameterLocation.Query, + Schema = new OpenApiSchema { + // Type is intentionally not set to simulate .NET 10 ASP.NET OpenAPI generator behavior + Format = format + } + } + }, + Responses = new OpenApiResponses + { + ["204"] = new OpenApiResponse() + } + } + } + } + }, + }; + var mockLogger = new Mock>(); + var builder = new KiotaBuilder(mockLogger.Object, new GenerationConfiguration { ClientClassName = "Graph", ApiRootUrl = "https://localhost" }, _httpClient); + var node = builder.CreateUriSpace(document); + var codeModel = builder.CreateSourceModel(node); + var queryParameters = codeModel.FindChildByName("primitiveRequestBuilderGetQueryParameters"); + Assert.NotNull(queryParameters); + var property = queryParameters.Properties.First(static x => x.Name.Equals("query", StringComparison.OrdinalIgnoreCase)); + Assert.NotNull(property); + Assert.Equal(expected, property.Type.Name); + Assert.True(property.Type.AllTypes.First().IsExternal); + } [Fact] public void IncludesQueryParameterInUriTemplate() { From f060950dbd802abed95960049e9aeb23ddfd2fb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:10:53 +0000 Subject: [PATCH 3/7] Fix format-based type matching order to handle String|Null types correctly Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- src/Kiota.Builder/KiotaBuilder.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index 13b3a66dff..635dd43cb7 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1236,8 +1236,15 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten var format = typeSchema?.Format ?? typeSchema?.Items?.Format; return (typeName & ~JsonSchemaType.Null, format?.ToLowerInvariant()) switch { + // byte and binary can apply to any type (_, "byte") => new CodeType { Name = "base64", IsExternal = true }, (_, "binary") => new CodeType { Name = "binary", IsExternal = true }, + // Handle formats that can appear without a type (e.g., from ASP.NET OpenAPI generator in .NET 10+) + // or with String | Null type. Must come before generic String pattern. + (_, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, + (_, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, + (_, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, + (_, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, (JsonSchemaType.String, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, (JsonSchemaType.String, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, // covers commonmark and html @@ -1250,11 +1257,6 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten (JsonSchemaType.Number, _) => new CodeType { Name = "double", IsExternal = true }, (JsonSchemaType.Integer, _) => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Boolean, _) => new CodeType { Name = "boolean", IsExternal = true }, - // Handle formats that can appear without a type (e.g., from ASP.NET OpenAPI generator in .NET 10+) - (_, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, - (_, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, - (_, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, - (_, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, (_, _) when !string.IsNullOrEmpty(childType) => new CodeType { Name = childType, IsExternal = false, }, (_, _) => null, }; From 6ec88892d9e3fdddcc415826a787c7f1c3e93f79 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:50:58 +0000 Subject: [PATCH 4/7] Make all format checks independent of type for comprehensive coverage Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- src/Kiota.Builder/KiotaBuilder.cs | 24 +++++++++---------- .../Kiota.Builder.Tests/KiotaBuilderTests.cs | 20 ++++++++++++++++ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index 635dd43cb7..6be24870e3 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1236,24 +1236,24 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten var format = typeSchema?.Format ?? typeSchema?.Items?.Format; return (typeName & ~JsonSchemaType.Null, format?.ToLowerInvariant()) switch { - // byte and binary can apply to any type + // Format-based matching (independent of type) - takes precedence when format is present + // This handles cases where OpenAPI generators omit the type field but include format (_, "byte") => new CodeType { Name = "base64", IsExternal = true }, (_, "binary") => new CodeType { Name = "binary", IsExternal = true }, - // Handle formats that can appear without a type (e.g., from ASP.NET OpenAPI generator in .NET 10+) - // or with String | Null type. Must come before generic String pattern. + (_, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, + (_, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, (_, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, (_, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, (_, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, (_, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, - (JsonSchemaType.String, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, - (JsonSchemaType.String, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, - (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, // covers commonmark and html - (JsonSchemaType.Number, "double" or "float" or "decimal") => new CodeType { Name = format.ToLowerInvariant(), IsExternal = true }, - (JsonSchemaType.Number or JsonSchemaType.Integer, "int8") => new CodeType { Name = "sbyte", IsExternal = true }, - (JsonSchemaType.Number or JsonSchemaType.Integer, "uint8") => new CodeType { Name = "byte", IsExternal = true }, - (JsonSchemaType.Number or JsonSchemaType.Integer, "int64") => new CodeType { Name = "int64", IsExternal = true }, - (JsonSchemaType.Number, "int16") => new CodeType { Name = "integer", IsExternal = true }, - (JsonSchemaType.Number, "int32") => new CodeType { Name = "integer", IsExternal = true }, + (_, "double" or "float" or "decimal") => new CodeType { Name = format.ToLowerInvariant(), IsExternal = true }, + (_, "int8") => new CodeType { Name = "sbyte", IsExternal = true }, + (_, "uint8") => new CodeType { Name = "byte", IsExternal = true }, + (_, "int64") => new CodeType { Name = "int64", IsExternal = true }, + (_, "int16") => new CodeType { Name = "integer", IsExternal = true }, + (_, "int32") => new CodeType { Name = "integer", IsExternal = true }, + // Type-based fallback (when format is not present or not recognized) + (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, (JsonSchemaType.Number, _) => new CodeType { Name = "double", IsExternal = true }, (JsonSchemaType.Integer, _) => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Boolean, _) => new CodeType { Name = "boolean", IsExternal = true }, diff --git a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs index 2abdf6c7d9..0b4d784c46 100644 --- a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs +++ b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs @@ -4335,6 +4335,16 @@ public void MapsQueryParameterTypes(JsonSchemaType type, string format, string e [InlineData("date", "DateOnly")] [InlineData("byte", "base64")] [InlineData("binary", "binary")] + [InlineData("uuid", "Guid")] + [InlineData("base64url", "base64url")] + [InlineData("double", "double")] + [InlineData("float", "float")] + [InlineData("decimal", "decimal")] + [InlineData("int8", "sbyte")] + [InlineData("uint8", "byte")] + [InlineData("int16", "integer")] + [InlineData("int32", "integer")] + [InlineData("int64", "int64")] [Theory] public void MapsPrimitiveFormatsWithoutType(string format, string expected) { @@ -4387,6 +4397,16 @@ public void MapsPrimitiveFormatsWithoutType(string format, string expected) [InlineData("date", "DateOnly")] [InlineData("byte", "base64")] [InlineData("binary", "binary")] + [InlineData("uuid", "Guid")] + [InlineData("base64url", "base64url")] + [InlineData("double", "double")] + [InlineData("float", "float")] + [InlineData("decimal", "decimal")] + [InlineData("int8", "sbyte")] + [InlineData("uint8", "byte")] + [InlineData("int16", "integer")] + [InlineData("int32", "integer")] + [InlineData("int64", "int64")] [Theory] public void MapsQueryParameterTypesWithoutType(string format, string expected) { From b863256592f0a4539188e496013db832d0e85d1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:54:02 +0000 Subject: [PATCH 5/7] Add documentation for int16/int32 mapping to generic integer type Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- tests/Kiota.Builder.Tests/KiotaBuilderTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs index 0b4d784c46..50ec9e34b0 100644 --- a/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs +++ b/tests/Kiota.Builder.Tests/KiotaBuilderTests.cs @@ -4342,7 +4342,7 @@ public void MapsQueryParameterTypes(JsonSchemaType type, string format, string e [InlineData("decimal", "decimal")] [InlineData("int8", "sbyte")] [InlineData("uint8", "byte")] - [InlineData("int16", "integer")] + [InlineData("int16", "integer")] // int16 and int32 both map to generic "integer" type for backwards compatibility [InlineData("int32", "integer")] [InlineData("int64", "int64")] [Theory] @@ -4404,7 +4404,7 @@ public void MapsPrimitiveFormatsWithoutType(string format, string expected) [InlineData("decimal", "decimal")] [InlineData("int8", "sbyte")] [InlineData("uint8", "byte")] - [InlineData("int16", "integer")] + [InlineData("int16", "integer")] // int16 and int32 both map to generic "integer" type for backwards compatibility [InlineData("int32", "integer")] [InlineData("int64", "int64")] [Theory] From 85646d5cf5e48116bb1a6198813e866a24a8be9e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 01:01:17 +0000 Subject: [PATCH 6/7] Use explicit type matching with null fallback instead of catch-all patterns Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- src/Kiota.Builder/KiotaBuilder.cs | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index 6be24870e3..f2ca8930c6 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1236,24 +1236,24 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten var format = typeSchema?.Format ?? typeSchema?.Items?.Format; return (typeName & ~JsonSchemaType.Null, format?.ToLowerInvariant()) switch { - // Format-based matching (independent of type) - takes precedence when format is present - // This handles cases where OpenAPI generators omit the type field but include format + // byte and binary can apply to any type (_, "byte") => new CodeType { Name = "base64", IsExternal = true }, (_, "binary") => new CodeType { Name = "binary", IsExternal = true }, - (_, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, - (_, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, - (_, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, - (_, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, - (_, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, - (_, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, - (_, "double" or "float" or "decimal") => new CodeType { Name = format.ToLowerInvariant(), IsExternal = true }, - (_, "int8") => new CodeType { Name = "sbyte", IsExternal = true }, - (_, "uint8") => new CodeType { Name = "byte", IsExternal = true }, - (_, "int64") => new CodeType { Name = "int64", IsExternal = true }, - (_, "int16") => new CodeType { Name = "integer", IsExternal = true }, - (_, "int32") => new CodeType { Name = "integer", IsExternal = true }, - // Type-based fallback (when format is not present or not recognized) - (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, + // String-based formats - handle both with explicit String type and without type (null) + (JsonSchemaType.String or null, "base64url") => new CodeType { Name = "base64url", IsExternal = true }, + (JsonSchemaType.String or null, "uuid") => new CodeType { Name = "Guid", IsExternal = true }, + (JsonSchemaType.String or null, "duration") => new CodeType { Name = "TimeSpan", IsExternal = true }, + (JsonSchemaType.String or null, "time") => new CodeType { Name = "TimeOnly", IsExternal = true }, + (JsonSchemaType.String or null, "date") => new CodeType { Name = "DateOnly", IsExternal = true }, + (JsonSchemaType.String or null, "date-time") => new CodeType { Name = "DateTimeOffset", IsExternal = true }, + (JsonSchemaType.String, _) => new CodeType { Name = "string", IsExternal = true }, // covers commonmark and html + // Numeric formats - handle with explicit Number/Integer types and without type (null) + (JsonSchemaType.Number or null, "double" or "float" or "decimal") => new CodeType { Name = format.ToLowerInvariant(), IsExternal = true }, + (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int8") => new CodeType { Name = "sbyte", IsExternal = true }, + (JsonSchemaType.Number or JsonSchemaType.Integer or null, "uint8") => new CodeType { Name = "byte", IsExternal = true }, + (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int64") => new CodeType { Name = "int64", IsExternal = true }, + (JsonSchemaType.Number or null, "int16") => new CodeType { Name = "integer", IsExternal = true }, + (JsonSchemaType.Number or null, "int32") => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Number, _) => new CodeType { Name = "double", IsExternal = true }, (JsonSchemaType.Integer, _) => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Boolean, _) => new CodeType { Name = "boolean", IsExternal = true }, From 4d9685c28ca74c646365ce3e322b18e152aff234 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 29 Jan 2026 20:18:14 +0000 Subject: [PATCH 7/7] Add Integer type support for int16/int32 formats and changelog entry Co-authored-by: gavinbarron <7122716+gavinbarron@users.noreply.github.com> --- CHANGELOG.md | 2 ++ src/Kiota.Builder/KiotaBuilder.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced9083f79..4fcf699514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Fixed a bug where OpenAPI schemas with `format` but without `type` keyword would generate `UntypedNode` instead of proper types. [#7315](https://github.com/microsoft/kiota/issues/7315) + ## [1.30.0] - 2026-01-26 ### Added diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index f2ca8930c6..13ec2cc24a 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1252,8 +1252,8 @@ openApiExtension is OpenApiPrimaryErrorMessageExtension primaryErrorMessageExten (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int8") => new CodeType { Name = "sbyte", IsExternal = true }, (JsonSchemaType.Number or JsonSchemaType.Integer or null, "uint8") => new CodeType { Name = "byte", IsExternal = true }, (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int64") => new CodeType { Name = "int64", IsExternal = true }, - (JsonSchemaType.Number or null, "int16") => new CodeType { Name = "integer", IsExternal = true }, - (JsonSchemaType.Number or null, "int32") => new CodeType { Name = "integer", IsExternal = true }, + (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int16") => new CodeType { Name = "integer", IsExternal = true }, + (JsonSchemaType.Number or JsonSchemaType.Integer or null, "int32") => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Number, _) => new CodeType { Name = "double", IsExternal = true }, (JsonSchemaType.Integer, _) => new CodeType { Name = "integer", IsExternal = true }, (JsonSchemaType.Boolean, _) => new CodeType { Name = "boolean", IsExternal = true },