diff --git a/samples/WebApplication/OrdersController.cs b/samples/WebApplication/OrdersController.cs index fa01318bcd8..043a5809532 100644 --- a/samples/WebApplication/OrdersController.cs +++ b/samples/WebApplication/OrdersController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using WebApplication.Shared; [ApiController] [Route("api/[controller]")] @@ -6,8 +7,8 @@ public class OrdersController : ControllerBase { private static readonly Order[] _orders = [ - new() { OrderId = OrderId.From(1), CustomerName = CustomerName.From("Fred")}, - new() { OrderId = OrderId.From(2), CustomerName = CustomerName.From("Barney")} + new() { OrderId = OrderId.From(1), CustomerName = CustomerName.From("Fred"), SharedStruct = SharedStruct.From(1), CustomerCategory = Category.From(1),CustomerCode = Code.From(111), CustomerSecretCode = SecretCode.From('A')}, + new() { OrderId = OrderId.From(2), CustomerName = CustomerName.From("Barney"),SharedStruct = SharedStruct.From(2), CustomerCategory = Category.From(2), CustomerCode = Code.From(222), CustomerSecretCode = SecretCode.From('Z')} ]; [HttpGet] diff --git a/samples/WebApplication/Program.cs b/samples/WebApplication/Program.cs index 53ce3e1e4a9..ba37f1f78a9 100644 --- a/samples/WebApplication/Program.cs +++ b/samples/WebApplication/Program.cs @@ -148,4 +148,9 @@ [OpenApiMarker] [OpenApiMarker] [OpenApiMarker] +[OpenApiMarker] +[OpenApiMarker] +[OpenApiMarker] +[OpenApiMarker] +[OpenApiMarker] public partial class OpenApiMarkers; diff --git a/samples/WebApplication/Types.cs b/samples/WebApplication/Types.cs index 44a45b3c63c..bc2a8739277 100644 --- a/samples/WebApplication/Types.cs +++ b/samples/WebApplication/Types.cs @@ -28,7 +28,16 @@ public partial struct OrderId { } -[ValueObject] +[ValueObject] +public partial struct Category; + +[ValueObject] +public partial struct Code; + +[ValueObject] +public partial struct SecretCode; + +[ValueObject] public readonly partial struct HistoricForecastId; public class Order @@ -39,5 +48,8 @@ public class Order public SharedStruct SharedStruct { get; init; } public SharedStruct? SharedStructOrNull { get; init; } + public Category CustomerCategory { get; set; } + public Code CustomerCode { get; set; } + public SecretCode CustomerSecretCode { get; set; } } diff --git a/samples/WebApplication/WebApplication.csproj b/samples/WebApplication/WebApplication.csproj index 6717a8e0edb..2a89a94da8b 100644 --- a/samples/WebApplication/WebApplication.csproj +++ b/samples/WebApplication/WebApplication.csproj @@ -4,7 +4,7 @@ enable enable true - MicrosoftAndScalar + Swashbuckle-net8 diff --git a/src/Vogen/GenerateCodeForOpenApiSchemaCustomization.cs b/src/Vogen/GenerateCodeForOpenApiSchemaCustomization.cs index fa7060103d7..ed5ba294746 100644 --- a/src/Vogen/GenerateCodeForOpenApiSchemaCustomization.cs +++ b/src/Vogen/GenerateCodeForOpenApiSchemaCustomization.cs @@ -269,7 +269,7 @@ internal static TypeAndFormat MapUnderlyingTypeToJsonSchema(Item workItem) { "System.Int32" => new("integer", "Number", "int32"), "System.Int64" => new("integer", "Number", "int64"), - "System.Int16" => new("number", "Number", ""), + "System.Int16" => new("integer", "Integer", ""), "System.Single" => new("number", "Number", ""), "System.Decimal" => new("number", "Number", "double"), "System.Double" => new("number", "Number", "double"), @@ -279,7 +279,7 @@ internal static TypeAndFormat MapUnderlyingTypeToJsonSchema(Item workItem) "System.DateTime" => new("string", "String", "date-time"), "System.DateTimeOffset" => new("string", "String", "date-time"), "System.Guid" => new("string", "String", "uuid"), - "System.Byte" => new("string", "String", "byte"), + "System.Byte" => new("integer", "Integer", ""), _ => TryMapComplexPrimitive(workItem.IParsableIsAvailable) }; diff --git a/tests/SnapshotTests/BugFixes/Bug896_ByteMappingInOpenApi.cs b/tests/SnapshotTests/BugFixes/Bug896_ByteMappingInOpenApi.cs new file mode 100644 index 00000000000..9d704190862 --- /dev/null +++ b/tests/SnapshotTests/BugFixes/Bug896_ByteMappingInOpenApi.cs @@ -0,0 +1,36 @@ +using System.Threading.Tasks; +using Shared; +using Vogen; + +namespace SnapshotTests.BugFixes; + +// See https://github.com/SteveDunn/Vogen/issues/575 +public class Bug896_ByteMappingInOpenApi +{ + [Fact] + public async Task ByteMapping() + { + var source = + $$""" + using System; + using Vogen; + + [assembly: VogenDefaults(openApiSchemaCustomizations: OpenApiSchemaCustomizations.GenerateOpenApiMappingExtensionMethod)] + + namespace N; + + [ValueObject] + public partial class MyVoByte { } + + [ValueObject] + public partial class MyVoChar { } + + [ValueObject] + public partial class MyVoShort { } + """; + + await new SnapshotRunner() + .WithSource(source) + .RunOn(TargetFramework.Net9_0); + } +} \ No newline at end of file diff --git a/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Generates_from_a_marker.verified.txt b/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Generates_from_a_marker.verified.txt deleted file mode 100644 index 5f282702bb0..00000000000 --- a/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Generates_from_a_marker.verified.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Handles_partial_markers_for_bson.verified.txt b/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Handles_partial_markers_for_bson.verified.txt deleted file mode 100644 index 5f282702bb0..00000000000 --- a/tests/SnapshotTests/BugFixes/snapshots/snap-v8.0/Bug999_Duplicate_partial_markers.Handles_partial_markers_for_bson.verified.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/tests/SnapshotTests/BugFixes/snapshots/snap-v9.0/Bug896_ByteMappingInOpenApi.ByteMapping.verified.txt b/tests/SnapshotTests/BugFixes/snapshots/snap-v9.0/Bug896_ByteMappingInOpenApi.ByteMapping.verified.txt new file mode 100644 index 00000000000..58955b13807 --- /dev/null +++ b/tests/SnapshotTests/BugFixes/snapshots/snap-v9.0/Bug896_ByteMappingInOpenApi.ByteMapping.verified.txt @@ -0,0 +1,2025 @@ +[ +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669, CS8632 + +#pragma warning disable CS8604 // Possible null reference argument. + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +// Suppress warnings about CS8767 : Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). +#pragma warning disable CS8767 + +public static partial class VogenOpenApiExtensions +{ + public static global::Microsoft.AspNetCore.OpenApi.OpenApiOptions MapVogenTypesIngenerator(this global::Microsoft.AspNetCore.OpenApi.OpenApiOptions options) + { + options.AddSchemaTransformer((schema, context, cancellationToken) => + { + if (context.JsonTypeInfo.Type == typeof(global::N.MyVoByte)) + { + schema.Type = "integer"; + } + + if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::N.MyVoByte)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; + } + + if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::N.MyVoByte)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; + } + + if (context.JsonTypeInfo.Type == typeof(global::N.MyVoChar)) + { + schema.Type = "string"; + } + + if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::N.MyVoChar)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string" }; + } + + if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::N.MyVoChar)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string" }; + } + + if (context.JsonTypeInfo.Type == typeof(global::N.MyVoShort)) + { + schema.Type = "string"; + } + + if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::N.MyVoShort)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string" }; + } + + if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::N.MyVoShort)) + { + schema.Type = "array"; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string" }; + } + + return global::System.Threading.Tasks.Task.CompletedTask; + }); + + return options; + } +} + + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669, CS8632 +#pragma warning disable CS8604 // Possible null reference argument. + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 +// Suppress warnings about CS8767 : Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). +#pragma warning disable CS8767 +namespace generator +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConverterFactory + { + public VogenTypesFactory() + { + } + + private static readonly global::System.Collections.Generic.Dictionary> _lookup = new global::System.Collections.Generic.Dictionary> + { + { + typeof(global::N.MyVoByte), + new global::System.Lazy(() => new global::N.MyVoByte.MyVoByteSystemTextJsonConverter()) + }, + { + typeof(global::N.MyVoChar), + new global::System.Lazy(() => new global::N.MyVoChar.MyVoCharSystemTextJsonConverter()) + }, + { + typeof(global::N.MyVoShort), + new global::System.Lazy(() => new global::N.MyVoShort.MyVoShortSystemTextJsonConverter()) + } + }; + public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert); + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) => _lookup[typeToConvert].Value; + } +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669, CS8632 +#pragma warning disable CS8604 // Possible null reference argument. + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 +// Suppress warnings about CS8767 : Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). +#pragma warning disable CS8767 +namespace N +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoByteSystemTextJsonConverter))] + [global::System.ComponentModel.TypeConverter(typeof(MyVoByteTypeConverter))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoByteDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: global::System.Byte, Value = { _value }")] + public partial class MyVoByte : global::System.IEquatable, global::System.IEquatable, global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable, global::System.IFormattable, global::System.ISpanFormattable, global::System.IUtf8SpanFormattable, global::System.IConvertible + { +#if DEBUG +private readonly global::System.Diagnostics.StackTrace _stackTrace = null!; +#endif +#if !VOGEN_NO_VALIDATION + private readonly global::System.Boolean _isInitialized; +#endif + private readonly global::System.Byte _value; + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public global::System.Byte Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get + { + EnsureInitialized(); + return _value; + } + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVoByte() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif +#if !VOGEN_NO_VALIDATION + _isInitialized = false; +#endif + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVoByte(global::System.Byte value) + { + _value = value; +#if !VOGEN_NO_VALIDATION + _isInitialized = true; +#endif + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public static MyVoByte From(global::System.Byte value) + { + return new MyVoByte(value); + } + + /// + /// Tries to build an instance from the provided underlying type. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, false will be returned. + /// + /// The underlying type. + /// An instance of the value object. + /// True if the value object can be built, otherwise false. + public static bool TryFrom( +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + global::System.Byte value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.MaybeNullWhen(false)] +#endif + out MyVoByte vo) + { + vo = new MyVoByte(value); + return true; + } + + /// + /// Tries to build an instance from the provided underlying value. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, an error will be returned. + /// + /// The primitive value. + /// A containing either the value object, or an error. + public static global::Vogen.ValueObjectOrError TryFrom(global::System.Byte value) + { + return new global::Vogen.ValueObjectOrError(new MyVoByte(value)); + } + + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] +#if VOGEN_NO_VALIDATION +#pragma warning disable CS8775 + public bool IsInitialized() => true; +#pragma warning restore CS8775 +#else + public bool IsInitialized() => _isInitialized; +#endif + // only called internally when something has been deserialized into + // its primitive type. + private static MyVoByte __Deserialize(global::System.Byte value) + { + return new MyVoByte(value); + } + + public global::System.Boolean Equals(MyVoByte other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if (!IsInitialized() || !other.IsInitialized()) + return false; + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + + public global::System.Boolean Equals(MyVoByte other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + public global::System.Boolean Equals(global::System.Byte primitive) + { + return Value.Equals(primitive); + } + + public override global::System.Boolean Equals(global::System.Object obj) + { + return Equals(obj as MyVoByte); + } + + public static global::System.Boolean operator ==(MyVoByte left, MyVoByte right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVoByte left, MyVoByte right) => !Equals(left, right); + public static global::System.Boolean operator ==(MyVoByte left, global::System.Byte right) => left.Value.Equals(right); + public static global::System.Boolean operator ==(global::System.Byte left, MyVoByte right) => right.Value.Equals(left); + public static global::System.Boolean operator !=(global::System.Byte left, MyVoByte right) => !(left == right); + public static global::System.Boolean operator !=(MyVoByte left, global::System.Byte right) => !(left == right); + public static explicit operator MyVoByte(global::System.Byte value) => From(value); + public static explicit operator global::System.Byte(MyVoByte value) => value.Value; + public int CompareTo(MyVoByte other) + { + if (other is null) + return 1; + return Value.CompareTo(other.Value); + } + + public int CompareTo(object other) + { + if (other is null) + return 1; + if (other is MyVoByte x) + return CompareTo(x); + ThrowHelper.ThrowArgumentException("Cannot compare to object as it is not of type MyVoByte", nameof(other)); + return 0; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(utf8Text, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(utf8Text, style, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(utf8Text, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, style, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, style, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoByte result) + { + if (global::System.Byte.TryParse(s, provider, out var __v)) + { + result = new MyVoByte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(string s) + { + var r = global::System.Byte.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(string s, global::System.Globalization.NumberStyles style) + { + var r = global::System.Byte.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoByte Parse(string s, global::System.IFormatProvider provider) + { + var r = global::System.Byte.Parse(s, provider); + return From(r); + } + +#nullable disable + /// + public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string format, global::System.IFormatProvider provider) + { + return IsInitialized() ? Value.ToString(format, provider) : "[UNINITIALIZED]"; + } + + /// + public bool TryFormat(global::System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + charsWritten = default; + return IsInitialized() ? Value.TryFormat(destination, out charsWritten, format, provider) : true; + } + + /// + public bool TryFormat(global::System.Span utf8Destination, out int bytesWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + bytesWritten = default; + return IsInitialized() ? Value.TryFormat(utf8Destination, out bytesWritten, format, provider) : true; + } + +#nullable restore +#nullable disable + /// + public System.TypeCode GetTypeCode() + { + return IsInitialized() ? Value.GetTypeCode() : default; + } + + /// + bool System.IConvertible.ToBoolean(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToBoolean(provider) : default; + } + + /// + byte System.IConvertible.ToByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToByte(provider) : default; + } + + /// + char System.IConvertible.ToChar(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToChar(provider) : default; + } + + /// + System.DateTime System.IConvertible.ToDateTime(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDateTime(provider) : default; + } + + /// + decimal System.IConvertible.ToDecimal(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDecimal(provider) : default; + } + + /// + double System.IConvertible.ToDouble(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDouble(provider) : default; + } + + /// + short System.IConvertible.ToInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt16(provider) : default; + } + + /// + int System.IConvertible.ToInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt32(provider) : default; + } + + /// + long System.IConvertible.ToInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt64(provider) : default; + } + + /// + sbyte System.IConvertible.ToSByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSByte(provider) : default; + } + + /// + float System.IConvertible.ToSingle(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSingle(provider) : default; + } + + /// + object System.IConvertible.ToType(global::System.Type @type, global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToType(@type, provider) : default; + } + + /// + ushort System.IConvertible.ToUInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt16(provider) : default; + } + + /// + uint System.IConvertible.ToUInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt32(provider) : default; + } + + /// + ulong System.IConvertible.ToUInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt64(provider) : default; + } + +#nullable restore + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32)2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + /// + public override global::System.String ToString() => IsInitialized() ? Value.ToString() ?? "" : "[UNINITIALIZED]"; + /// + public global::System.String ToString(global::System.IFormatProvider provider) => IsInitialized() ? Value.ToString(provider) ?? "" : "[UNINITIALIZED]"; + /// + public global::System.String ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string format) => IsInitialized() ? Value.ToString(format) ?? "" : "[UNINITIALIZED]"; + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private void EnsureInitialized() + { + if (!IsInitialized()) + { +#if DEBUG + ThrowHelper.ThrowWhenNotInitialized(_stackTrace); +#else + ThrowHelper.ThrowWhenNotInitialized(); +#endif + } + } + +#nullable disable + /// + /// Converts a MyVoByte to or from JSON. + /// + public partial class MyVoByteSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVoByte Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return DeserializeJson(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Byte)))); +#else + return DeserializeJson(reader.GetByte()); +#endif + } + + public override void Write(global::System.Text.Json.Utf8JsonWriter writer, MyVoByte value, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); +#else + writer.WriteNumberValue(value.Value); +#endif + } + +#if NET6_0_OR_GREATER + public override MyVoByte ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return DeserializeJson(global::System.Byte.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, MyVoByte value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + private static void ThrowJsonExceptionWhenValidationFails(global::Vogen.Validation validation) + { + var e = ThrowHelper.CreateValidationException(validation); + throw new global::System.Text.Json.JsonException(null, e); + } + + private static MyVoByte DeserializeJson(global::System.Byte value) + { + return new MyVoByte(value); + } + } + +#nullable restore +#nullable disable + class MyVoByteTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Byte byteValue => MyVoByte.__Deserialize(byteValue), + global::System.Int16 shortValue => MyVoByte.__Deserialize((global::System.Byte)shortValue), + global::System.Int32 intValue => MyVoByte.__Deserialize((global::System.Byte)intValue), + global::System.Int64 longValue => MyVoByte.__Deserialize((global::System.Byte)longValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Byte.TryParse(stringValue, out var result) => MyVoByte.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVoByte idValue) + { + if (destinationType == typeof(global::System.Byte)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + +#nullable restore + internal sealed class MyVoByteDebugView + { + private readonly MyVoByte _t; + MyVoByteDebugView(MyVoByte t) + { + _t = t; + } + + public global::System.String UnderlyingType => "global::System.Byte"; + public global::System.Byte Value => _t.Value; + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoByteSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVoByteTypeConverter))] +"; + } + + static class ThrowHelper + { +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowInvalidOperationException(string message) => throw new global::System.InvalidOperationException(message); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowArgumentException(string message, string arg) => throw new global::System.ArgumentException(message, arg); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenCreatedWithNull() => throw CreateCannotBeNullException(); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized() => throw CreateValidationException("Use of uninitialized Value Object."); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized(global::System.Diagnostics.StackTrace stackTrace) => throw CreateValidationException("Use of uninitialized Value Object at: " + stackTrace ?? ""); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenValidationFails(global::Vogen.Validation validation) + { + throw CreateValidationException(validation); + } + + internal static global::System.Exception CreateValidationException(string message) => new global::Vogen.ValueObjectValidationException(message); + internal static global::System.Exception CreateCannotBeNullException() => new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + internal static global::System.Exception CreateValidationException(global::Vogen.Validation validation) + { + var ex = CreateValidationException(validation.ErrorMessage); + if (validation.Data != null) + { + foreach (var kvp in validation.Data) + { + ex.Data[kvp.Key] = kvp.Value; + } + } + + return ex; + } + } + } +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669, CS8632 +#pragma warning disable CS8604 // Possible null reference argument. + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 +// Suppress warnings about CS8767 : Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). +#pragma warning disable CS8767 +namespace N +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoCharSystemTextJsonConverter))] + [global::System.ComponentModel.TypeConverter(typeof(MyVoCharTypeConverter))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoCharDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: global::System.Char, Value = { _value }")] + public partial class MyVoChar : global::System.IEquatable, global::System.IEquatable, global::System.IComparable, global::System.IComparable, global::System.IFormattable, global::System.ISpanFormattable, global::System.IUtf8SpanFormattable, global::System.IConvertible + { +#if DEBUG +private readonly global::System.Diagnostics.StackTrace _stackTrace = null!; +#endif +#if !VOGEN_NO_VALIDATION + private readonly global::System.Boolean _isInitialized; +#endif + private readonly global::System.Char _value; + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public global::System.Char Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get + { + EnsureInitialized(); + return _value; + } + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVoChar() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif +#if !VOGEN_NO_VALIDATION + _isInitialized = false; +#endif + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVoChar(global::System.Char value) + { + _value = value; +#if !VOGEN_NO_VALIDATION + _isInitialized = true; +#endif + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public static MyVoChar From(global::System.Char value) + { + return new MyVoChar(value); + } + + /// + /// Tries to build an instance from the provided underlying type. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, false will be returned. + /// + /// The underlying type. + /// An instance of the value object. + /// True if the value object can be built, otherwise false. + public static bool TryFrom( +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + global::System.Char value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.MaybeNullWhen(false)] +#endif + out MyVoChar vo) + { + vo = new MyVoChar(value); + return true; + } + + /// + /// Tries to build an instance from the provided underlying value. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, an error will be returned. + /// + /// The primitive value. + /// A containing either the value object, or an error. + public static global::Vogen.ValueObjectOrError TryFrom(global::System.Char value) + { + return new global::Vogen.ValueObjectOrError(new MyVoChar(value)); + } + + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] +#if VOGEN_NO_VALIDATION +#pragma warning disable CS8775 + public bool IsInitialized() => true; +#pragma warning restore CS8775 +#else + public bool IsInitialized() => _isInitialized; +#endif + // only called internally when something has been deserialized into + // its primitive type. + private static MyVoChar __Deserialize(global::System.Char value) + { + return new MyVoChar(value); + } + + public global::System.Boolean Equals(MyVoChar other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if (!IsInitialized() || !other.IsInitialized()) + return false; + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + + public global::System.Boolean Equals(MyVoChar other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + public global::System.Boolean Equals(global::System.Char primitive) + { + return Value.Equals(primitive); + } + + public override global::System.Boolean Equals(global::System.Object obj) + { + return Equals(obj as MyVoChar); + } + + public static global::System.Boolean operator ==(MyVoChar left, MyVoChar right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVoChar left, MyVoChar right) => !Equals(left, right); + public static global::System.Boolean operator ==(MyVoChar left, global::System.Char right) => left.Value.Equals(right); + public static global::System.Boolean operator ==(global::System.Char left, MyVoChar right) => right.Value.Equals(left); + public static global::System.Boolean operator !=(global::System.Char left, MyVoChar right) => !(left == right); + public static global::System.Boolean operator !=(MyVoChar left, global::System.Char right) => !(left == right); + public static explicit operator MyVoChar(global::System.Char value) => From(value); + public static explicit operator global::System.Char(MyVoChar value) => value.Value; + public int CompareTo(MyVoChar other) + { + if (other is null) + return 1; + return Value.CompareTo(other.Value); + } + + public int CompareTo(object other) + { + if (other is null) + return 1; + if (other is MyVoChar x) + return CompareTo(x); + ThrowHelper.ThrowArgumentException("Cannot compare to object as it is not of type MyVoChar", nameof(other)); + return 0; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoChar result) + { + if (global::System.Char.TryParse(s, out var __v)) + { + result = new MyVoChar(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoChar Parse(string s) + { + var r = global::System.Char.Parse(s); + return From(r); + } + +#nullable disable + /// + string System.IFormattable.ToString(string format, global::System.IFormatProvider formatProvider) + { + return IsInitialized() ? (Value as System.IFormattable).ToString(format, formatProvider) : "[UNINITIALIZED]"; + } + + /// + bool System.ISpanFormattable.TryFormat(global::System.Span destination, out int charsWritten, global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + charsWritten = default; + return IsInitialized() ? (Value as System.ISpanFormattable).TryFormat(destination, out charsWritten, format, provider) : true; + } + + /// + bool System.IUtf8SpanFormattable.TryFormat(global::System.Span utf8Destination, out int bytesWritten, global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + bytesWritten = default; + return IsInitialized() ? (Value as System.IUtf8SpanFormattable).TryFormat(utf8Destination, out bytesWritten, format, provider) : true; + } + +#nullable restore +#nullable disable + /// + public System.TypeCode GetTypeCode() + { + return IsInitialized() ? Value.GetTypeCode() : default; + } + + /// + bool System.IConvertible.ToBoolean(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToBoolean(provider) : default; + } + + /// + byte System.IConvertible.ToByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToByte(provider) : default; + } + + /// + char System.IConvertible.ToChar(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToChar(provider) : default; + } + + /// + System.DateTime System.IConvertible.ToDateTime(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDateTime(provider) : default; + } + + /// + decimal System.IConvertible.ToDecimal(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDecimal(provider) : default; + } + + /// + double System.IConvertible.ToDouble(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDouble(provider) : default; + } + + /// + short System.IConvertible.ToInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt16(provider) : default; + } + + /// + int System.IConvertible.ToInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt32(provider) : default; + } + + /// + long System.IConvertible.ToInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt64(provider) : default; + } + + /// + sbyte System.IConvertible.ToSByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSByte(provider) : default; + } + + /// + float System.IConvertible.ToSingle(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSingle(provider) : default; + } + + /// + object System.IConvertible.ToType(global::System.Type @type, global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToType(@type, provider) : default; + } + + /// + ushort System.IConvertible.ToUInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt16(provider) : default; + } + + /// + uint System.IConvertible.ToUInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt32(provider) : default; + } + + /// + ulong System.IConvertible.ToUInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt64(provider) : default; + } + +#nullable restore + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32)2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + /// + public override global::System.String ToString() => IsInitialized() ? Value.ToString() ?? "" : "[UNINITIALIZED]"; + /// + public global::System.String ToString(global::System.IFormatProvider provider) => IsInitialized() ? Value.ToString(provider) ?? "" : "[UNINITIALIZED]"; + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private void EnsureInitialized() + { + if (!IsInitialized()) + { +#if DEBUG + ThrowHelper.ThrowWhenNotInitialized(_stackTrace); +#else + ThrowHelper.ThrowWhenNotInitialized(); +#endif + } + } + +#nullable disable + /// + /// Converts a MyVoChar to or from JSON. + /// + public partial class MyVoCharSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVoChar Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + var s = reader.GetString(); + return DeserializeJson(s[0]); + } + + public override void Write(global::System.Text.Json.Utf8JsonWriter writer, MyVoChar value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.Value.ToString()); + } + +#if NET6_0_OR_GREATER + public override MyVoChar ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + var s = reader.GetString(); + + return DeserializeJson(s[0]); + } + + public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, MyVoChar value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString()); + } +#endif +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + private static void ThrowJsonExceptionWhenValidationFails(global::Vogen.Validation validation) + { + var e = ThrowHelper.CreateValidationException(validation); + throw new global::System.Text.Json.JsonException(null, e); + } + + private static MyVoChar DeserializeJson(global::System.Char value) + { + return new MyVoChar(value); + } + } + +#nullable restore +#nullable disable + class MyVoCharTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Char) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Char charValue => MyVoChar.__Deserialize(charValue), + global::System.Int16 shortValue => MyVoChar.__Deserialize((global::System.Char)shortValue), + global::System.Int32 intValue => MyVoChar.__Deserialize((global::System.Char)intValue), + global::System.Int64 longValue => MyVoChar.__Deserialize((global::System.Char)longValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Char.TryParse(stringValue, out var result) => MyVoChar.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Char) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVoChar idValue) + { + if (destinationType == typeof(global::System.Char)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + +#nullable restore + internal sealed class MyVoCharDebugView + { + private readonly MyVoChar _t; + MyVoCharDebugView(MyVoChar t) + { + _t = t; + } + + public global::System.String UnderlyingType => "global::System.Char"; + public global::System.Char Value => _t.Value; + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoCharSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVoCharTypeConverter))] +"; + } + + static class ThrowHelper + { +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowInvalidOperationException(string message) => throw new global::System.InvalidOperationException(message); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowArgumentException(string message, string arg) => throw new global::System.ArgumentException(message, arg); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenCreatedWithNull() => throw CreateCannotBeNullException(); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized() => throw CreateValidationException("Use of uninitialized Value Object."); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized(global::System.Diagnostics.StackTrace stackTrace) => throw CreateValidationException("Use of uninitialized Value Object at: " + stackTrace ?? ""); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenValidationFails(global::Vogen.Validation validation) + { + throw CreateValidationException(validation); + } + + internal static global::System.Exception CreateValidationException(string message) => new global::Vogen.ValueObjectValidationException(message); + internal static global::System.Exception CreateCannotBeNullException() => new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + internal static global::System.Exception CreateValidationException(global::Vogen.Validation validation) + { + var ex = CreateValidationException(validation.ErrorMessage); + if (validation.Data != null) + { + foreach (var kvp in validation.Data) + { + ex.Data[kvp.Key] = kvp.Value; + } + } + + return ex; + } + } + } +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669, CS8632 +#pragma warning disable CS8604 // Possible null reference argument. + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 +// Suppress warnings about CS8767 : Nullability of reference types in type of parameter doesn't match implicitly implemented member (possibly because of nullability attributes). +#pragma warning disable CS8767 +namespace N +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoShortSystemTextJsonConverter))] + [global::System.ComponentModel.TypeConverter(typeof(MyVoShortTypeConverter))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoShortDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: global::System.Char, Value = { _value }")] + public partial class MyVoShort : global::System.IEquatable, global::System.IEquatable, global::System.IComparable, global::System.IComparable, global::System.IFormattable, global::System.ISpanFormattable, global::System.IUtf8SpanFormattable, global::System.IConvertible + { +#if DEBUG +private readonly global::System.Diagnostics.StackTrace _stackTrace = null!; +#endif +#if !VOGEN_NO_VALIDATION + private readonly global::System.Boolean _isInitialized; +#endif + private readonly global::System.Char _value; + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public global::System.Char Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + get + { + EnsureInitialized(); + return _value; + } + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVoShort() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif +#if !VOGEN_NO_VALIDATION + _isInitialized = false; +#endif + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVoShort(global::System.Char value) + { + _value = value; +#if !VOGEN_NO_VALIDATION + _isInitialized = true; +#endif + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + public static MyVoShort From(global::System.Char value) + { + return new MyVoShort(value); + } + + /// + /// Tries to build an instance from the provided underlying type. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, false will be returned. + /// + /// The underlying type. + /// An instance of the value object. + /// True if the value object can be built, otherwise false. + public static bool TryFrom( +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + global::System.Char value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.MaybeNullWhen(false)] +#endif + out MyVoShort vo) + { + vo = new MyVoShort(value); + return true; + } + + /// + /// Tries to build an instance from the provided underlying value. + /// If a normalization method is provided, it will be called. + /// If validation is provided, and it fails, an error will be returned. + /// + /// The primitive value. + /// A containing either the value object, or an error. + public static global::Vogen.ValueObjectOrError TryFrom(global::System.Char value) + { + return new global::Vogen.ValueObjectOrError(new MyVoShort(value)); + } + + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] +#if VOGEN_NO_VALIDATION +#pragma warning disable CS8775 + public bool IsInitialized() => true; +#pragma warning restore CS8775 +#else + public bool IsInitialized() => _isInitialized; +#endif + // only called internally when something has been deserialized into + // its primitive type. + private static MyVoShort __Deserialize(global::System.Char value) + { + return new MyVoShort(value); + } + + public global::System.Boolean Equals(MyVoShort other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if (!IsInitialized() || !other.IsInitialized()) + return false; + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + + public global::System.Boolean Equals(MyVoShort other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + public global::System.Boolean Equals(global::System.Char primitive) + { + return Value.Equals(primitive); + } + + public override global::System.Boolean Equals(global::System.Object obj) + { + return Equals(obj as MyVoShort); + } + + public static global::System.Boolean operator ==(MyVoShort left, MyVoShort right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVoShort left, MyVoShort right) => !Equals(left, right); + public static global::System.Boolean operator ==(MyVoShort left, global::System.Char right) => left.Value.Equals(right); + public static global::System.Boolean operator ==(global::System.Char left, MyVoShort right) => right.Value.Equals(left); + public static global::System.Boolean operator !=(global::System.Char left, MyVoShort right) => !(left == right); + public static global::System.Boolean operator !=(MyVoShort left, global::System.Char right) => !(left == right); + public static explicit operator MyVoShort(global::System.Char value) => From(value); + public static explicit operator global::System.Char(MyVoShort value) => value.Value; + public int CompareTo(MyVoShort other) + { + if (other is null) + return 1; + return Value.CompareTo(other.Value); + } + + public int CompareTo(object other) + { + if (other is null) + return 1; + if (other is MyVoShort x) + return CompareTo(x); + ThrowHelper.ThrowArgumentException("Cannot compare to object as it is not of type MyVoShort", nameof(other)); + return 0; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVoShort result) + { + if (global::System.Char.TryParse(s, out var __v)) + { + result = new MyVoShort(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created by calling the Parse method on the primitive. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVoShort Parse(string s) + { + var r = global::System.Char.Parse(s); + return From(r); + } + +#nullable disable + /// + string System.IFormattable.ToString(string format, global::System.IFormatProvider formatProvider) + { + return IsInitialized() ? (Value as System.IFormattable).ToString(format, formatProvider) : "[UNINITIALIZED]"; + } + + /// + bool System.ISpanFormattable.TryFormat(global::System.Span destination, out int charsWritten, global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + charsWritten = default; + return IsInitialized() ? (Value as System.ISpanFormattable).TryFormat(destination, out charsWritten, format, provider) : true; + } + + /// + bool System.IUtf8SpanFormattable.TryFormat(global::System.Span utf8Destination, out int bytesWritten, global::System.ReadOnlySpan format, global::System.IFormatProvider provider) + { + bytesWritten = default; + return IsInitialized() ? (Value as System.IUtf8SpanFormattable).TryFormat(utf8Destination, out bytesWritten, format, provider) : true; + } + +#nullable restore +#nullable disable + /// + public System.TypeCode GetTypeCode() + { + return IsInitialized() ? Value.GetTypeCode() : default; + } + + /// + bool System.IConvertible.ToBoolean(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToBoolean(provider) : default; + } + + /// + byte System.IConvertible.ToByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToByte(provider) : default; + } + + /// + char System.IConvertible.ToChar(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToChar(provider) : default; + } + + /// + System.DateTime System.IConvertible.ToDateTime(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDateTime(provider) : default; + } + + /// + decimal System.IConvertible.ToDecimal(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDecimal(provider) : default; + } + + /// + double System.IConvertible.ToDouble(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToDouble(provider) : default; + } + + /// + short System.IConvertible.ToInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt16(provider) : default; + } + + /// + int System.IConvertible.ToInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt32(provider) : default; + } + + /// + long System.IConvertible.ToInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToInt64(provider) : default; + } + + /// + sbyte System.IConvertible.ToSByte(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSByte(provider) : default; + } + + /// + float System.IConvertible.ToSingle(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToSingle(provider) : default; + } + + /// + object System.IConvertible.ToType(global::System.Type @type, global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToType(@type, provider) : default; + } + + /// + ushort System.IConvertible.ToUInt16(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt16(provider) : default; + } + + /// + uint System.IConvertible.ToUInt32(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt32(provider) : default; + } + + /// + ulong System.IConvertible.ToUInt64(global::System.IFormatProvider provider) + { + return IsInitialized() ? (Value as System.IConvertible).ToUInt64(provider) : default; + } + +#nullable restore + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32)2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + /// + public override global::System.String ToString() => IsInitialized() ? Value.ToString() ?? "" : "[UNINITIALIZED]"; + /// + public global::System.String ToString(global::System.IFormatProvider provider) => IsInitialized() ? Value.ToString(provider) ?? "" : "[UNINITIALIZED]"; + [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private void EnsureInitialized() + { + if (!IsInitialized()) + { +#if DEBUG + ThrowHelper.ThrowWhenNotInitialized(_stackTrace); +#else + ThrowHelper.ThrowWhenNotInitialized(); +#endif + } + } + +#nullable disable + /// + /// Converts a MyVoShort to or from JSON. + /// + public partial class MyVoShortSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVoShort Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + var s = reader.GetString(); + return DeserializeJson(s[0]); + } + + public override void Write(global::System.Text.Json.Utf8JsonWriter writer, MyVoShort value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.Value.ToString()); + } + +#if NET6_0_OR_GREATER + public override MyVoShort ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + var s = reader.GetString(); + + return DeserializeJson(s[0]); + } + + public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, MyVoShort value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString()); + } +#endif +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + private static void ThrowJsonExceptionWhenValidationFails(global::Vogen.Validation validation) + { + var e = ThrowHelper.CreateValidationException(validation); + throw new global::System.Text.Json.JsonException(null, e); + } + + private static MyVoShort DeserializeJson(global::System.Char value) + { + return new MyVoShort(value); + } + } + +#nullable restore +#nullable disable + class MyVoShortTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Char) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Char charValue => MyVoShort.__Deserialize(charValue), + global::System.Int16 shortValue => MyVoShort.__Deserialize((global::System.Char)shortValue), + global::System.Int32 intValue => MyVoShort.__Deserialize((global::System.Char)intValue), + global::System.Int64 longValue => MyVoShort.__Deserialize((global::System.Char)longValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Char.TryParse(stringValue, out var result) => MyVoShort.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Char) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVoShort idValue) + { + if (destinationType == typeof(global::System.Char)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + +#nullable restore + internal sealed class MyVoShortDebugView + { + private readonly MyVoShort _t; + MyVoShortDebugView(MyVoShort t) + { + _t = t; + } + + public global::System.String UnderlyingType => "global::System.Char"; + public global::System.Char Value => _t.Value; + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVoShortSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVoShortTypeConverter))] +"; + } + + static class ThrowHelper + { +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowInvalidOperationException(string message) => throw new global::System.InvalidOperationException(message); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowArgumentException(string message, string arg) => throw new global::System.ArgumentException(message, arg); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenCreatedWithNull() => throw CreateCannotBeNullException(); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized() => throw CreateValidationException("Use of uninitialized Value Object."); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenNotInitialized(global::System.Diagnostics.StackTrace stackTrace) => throw CreateValidationException("Use of uninitialized Value Object at: " + stackTrace ?? ""); +#if NETCOREAPP3_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute] +#endif + internal static void ThrowWhenValidationFails(global::Vogen.Validation validation) + { + throw CreateValidationException(validation); + } + + internal static global::System.Exception CreateValidationException(string message) => new global::Vogen.ValueObjectValidationException(message); + internal static global::System.Exception CreateCannotBeNullException() => new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + internal static global::System.Exception CreateValidationException(global::Vogen.Validation validation) + { + var ex = CreateValidationException(validation.ErrorMessage); + if (validation.Data != null) + { + foreach (var kvp in validation.Data) + { + ex.Data[kvp.Key] = kvp.Value; + } + } + + return ex; + } + } + } +} +] \ No newline at end of file diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_01401de07f3182bc.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_01401de07f3182bc.verified.txt index c6b4cb9ad1b..9d896afd5a1 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_01401de07f3182bc.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_01401de07f3182bc.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_02a550ee02020578.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_02a550ee02020578.verified.txt index f96b5454702..676b30b4d57 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_02a550ee02020578.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_02a550ee02020578.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03359f6288338ab7.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03359f6288338ab7.verified.txt index 449335dae6b..e3d6136327a 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03359f6288338ab7.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03359f6288338ab7.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03fc21edf421ede7.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03fc21edf421ede7.verified.txt index 04cb99379c4..fd430c7239f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03fc21edf421ede7.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_03fc21edf421ede7.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_042a5ffde11af2ec.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_042a5ffde11af2ec.verified.txt index bab2f9fb651..30c20b3e6f2 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_042a5ffde11af2ec.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_042a5ffde11af2ec.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_04b7c83e89b12fd3.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_04b7c83e89b12fd3.verified.txt index 7c1ec6dae8a..83f6a2c4489 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_04b7c83e89b12fd3.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_04b7c83e89b12fd3.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_050c26fae61c53ab.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_050c26fae61c53ab.verified.txt index 2823a0359a4..83cd3143bf9 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_050c26fae61c53ab.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_050c26fae61c53ab.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_05ec053f3ab84d9f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_05ec053f3ab84d9f.verified.txt index b96aaea4ec7..a1bea2063c3 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_05ec053f3ab84d9f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_05ec053f3ab84d9f.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0679898d7724c514.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0679898d7724c514.verified.txt index 38177a64088..f6ce29fdccf 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0679898d7724c514.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0679898d7724c514.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_08b8c765370bf76f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_08b8c765370bf76f.verified.txt index 602a1dc2803..2d59b2757ed 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_08b8c765370bf76f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_08b8c765370bf76f.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_09a9f0db4d759d83.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_09a9f0db4d759d83.verified.txt index dee81c3e955..ca2701845a0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_09a9f0db4d759d83.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_09a9f0db4d759d83.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0a77c43e358be007.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0a77c43e358be007.verified.txt index 060b110097e..2caa374e493 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0a77c43e358be007.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0a77c43e358be007.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0bf9f05aeeca580b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0bf9f05aeeca580b.verified.txt index 321b4a85bce..3a2ef11dd29 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0bf9f05aeeca580b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0bf9f05aeeca580b.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0cc8450968f9655d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0cc8450968f9655d.verified.txt index 34a64a7c214..12e4bc2c613 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0cc8450968f9655d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0cc8450968f9655d.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0eaa64f365d9f429.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0eaa64f365d9f429.verified.txt index 39b3776d6f4..9259bc564c5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0eaa64f365d9f429.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0eaa64f365d9f429.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0f69a961dd7177e4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0f69a961dd7177e4.verified.txt index 28f897a1460..06427e22124 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0f69a961dd7177e4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0f69a961dd7177e4.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0ff0c1b0efdd99c4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0ff0c1b0efdd99c4.verified.txt index 6237b45a673..170091d7386 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0ff0c1b0efdd99c4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_0ff0c1b0efdd99c4.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_128a02ef0549fe75.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_128a02ef0549fe75.verified.txt index adfdec164e7..2c344ce6e46 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_128a02ef0549fe75.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_128a02ef0549fe75.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_13fe4c05ea4ca97c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_13fe4c05ea4ca97c.verified.txt index d775950f6c6..cd3209306de 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_13fe4c05ea4ca97c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_13fe4c05ea4ca97c.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_15165ee14034943c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_15165ee14034943c.verified.txt index 9b5af12e116..3dd3874bfe0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_15165ee14034943c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_15165ee14034943c.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_171b2fff6e43628b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_171b2fff6e43628b.verified.txt index bfe9aecd544..bb91d4dc932 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_171b2fff6e43628b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_171b2fff6e43628b.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_18f2eca141bb267a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_18f2eca141bb267a.verified.txt index aa67b3217d9..ad330a3c236 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_18f2eca141bb267a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_18f2eca141bb267a.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_193c2e2ffa8f0890.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_193c2e2ffa8f0890.verified.txt index 2f5cfa6c811..d2049040ebf 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_193c2e2ffa8f0890.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_193c2e2ffa8f0890.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1b81bad1e978483e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1b81bad1e978483e.verified.txt index af5212646ef..1fda28d0aab 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1b81bad1e978483e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1b81bad1e978483e.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1f8a564b588cd2a3.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1f8a564b588cd2a3.verified.txt index f6839f36470..bce0a6972af 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1f8a564b588cd2a3.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1f8a564b588cd2a3.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1fee4120bb9d2612.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1fee4120bb9d2612.verified.txt index b47f73d902a..d9c62210e5b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1fee4120bb9d2612.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_1fee4120bb9d2612.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_208ce209b700183f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_208ce209b700183f.verified.txt index a574cc3fac1..9a28f42b9ee 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_208ce209b700183f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_208ce209b700183f.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21942cf39e1218a1.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21942cf39e1218a1.verified.txt index 1058fb65212..9bc7c4085d0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21942cf39e1218a1.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21942cf39e1218a1.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21be4882bdc170f6.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21be4882bdc170f6.verified.txt index 96d7cc326d0..79fc276f6b0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21be4882bdc170f6.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21be4882bdc170f6.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21c26092f827f96f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21c26092f827f96f.verified.txt index 5b8d233c125..9e3f09546f6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21c26092f827f96f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21c26092f827f96f.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21d03f7364f0bc0c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21d03f7364f0bc0c.verified.txt index 3778acaf727..b0baff93827 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21d03f7364f0bc0c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_21d03f7364f0bc0c.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_22f2fddf8bd7e38c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_22f2fddf8bd7e38c.verified.txt index c267b0a669b..1a53266f654 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_22f2fddf8bd7e38c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_22f2fddf8bd7e38c.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2529c0cafdc91179.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2529c0cafdc91179.verified.txt index 90df5b30bef..c1e1c86d0b6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2529c0cafdc91179.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2529c0cafdc91179.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_260922a3e0d8581d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_260922a3e0d8581d.verified.txt index 148b13469bf..5bffe82296b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_260922a3e0d8581d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_260922a3e0d8581d.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2645194458be46c0.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2645194458be46c0.verified.txt index 3ed503c0d02..1524e33e469 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2645194458be46c0.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2645194458be46c0.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_26b5d436d596c154.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_26b5d436d596c154.verified.txt index 445fe769586..12f47811409 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_26b5d436d596c154.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_26b5d436d596c154.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2744efb4c154b799.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2744efb4c154b799.verified.txt index 382c4bbe7aa..568dbb26756 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2744efb4c154b799.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2744efb4c154b799.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_281014695868ced4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_281014695868ced4.verified.txt index cf456734402..6e47ad1f4fa 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_281014695868ced4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_281014695868ced4.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2a4b5767b0858093.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2a4b5767b0858093.verified.txt index 887e0bb61df..67599655416 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2a4b5767b0858093.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2a4b5767b0858093.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2e1c6b84847c5442.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2e1c6b84847c5442.verified.txt index 01485ac5231..97048157dbd 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2e1c6b84847c5442.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2e1c6b84847c5442.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2f531460d2852c3a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2f531460d2852c3a.verified.txt index e51936e62ec..c96491b63af 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2f531460d2852c3a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_2f531460d2852c3a.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_32cac00b30f4b51b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_32cac00b30f4b51b.verified.txt index 9a4ffc2b668..4bd8931f51b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_32cac00b30f4b51b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_32cac00b30f4b51b.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_332a163a340f14ce.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_332a163a340f14ce.verified.txt index 4f57f36079c..4e66f332792 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_332a163a340f14ce.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_332a163a340f14ce.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_34c2683459b46d85.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_34c2683459b46d85.verified.txt index c00c4f52306..d94c203ee19 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_34c2683459b46d85.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_34c2683459b46d85.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3694dc209915e706.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3694dc209915e706.verified.txt index ba15810a593..dffc29109c4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3694dc209915e706.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3694dc209915e706.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_37ad59bf5cfb8004.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_37ad59bf5cfb8004.verified.txt index 27b2d00662e..61e35d966b5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_37ad59bf5cfb8004.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_37ad59bf5cfb8004.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3c8ed8eae8c3a191.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3c8ed8eae8c3a191.verified.txt index 5d9cc4fc6d8..85724cccea0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3c8ed8eae8c3a191.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3c8ed8eae8c3a191.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ca4ec974a98ce93.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ca4ec974a98ce93.verified.txt index ddbaae377bb..c0bea6e6913 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ca4ec974a98ce93.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ca4ec974a98ce93.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ccb897cd1349293.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ccb897cd1349293.verified.txt index a9f3f1806b5..c4dcb30c2e5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ccb897cd1349293.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3ccb897cd1349293.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3f8bf9e57603dc9d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3f8bf9e57603dc9d.verified.txt index 7083fa1e02f..9e047e9da73 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3f8bf9e57603dc9d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3f8bf9e57603dc9d.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3faf072af12bd3d4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3faf072af12bd3d4.verified.txt index b952de193a2..4d3c6bddd5b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3faf072af12bd3d4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_3faf072af12bd3d4.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_417fbece372c9259.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_417fbece372c9259.verified.txt index c1a3581de09..d22ea12ba55 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_417fbece372c9259.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_417fbece372c9259.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_41a73b9b171b6060.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_41a73b9b171b6060.verified.txt index 74652ee3ac0..f7d14867796 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_41a73b9b171b6060.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_41a73b9b171b6060.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43ca86b4c90eb9a5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43ca86b4c90eb9a5.verified.txt index 00bcf3628e7..48c722cb650 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43ca86b4c90eb9a5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43ca86b4c90eb9a5.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43eda71639fbdeb5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43eda71639fbdeb5.verified.txt index 662800803bd..a0f49728ceb 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43eda71639fbdeb5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_43eda71639fbdeb5.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_49ed4aa2c7b73924.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_49ed4aa2c7b73924.verified.txt index 7c410ccb8bd..f3cfaf5060f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_49ed4aa2c7b73924.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_49ed4aa2c7b73924.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4f32ea6a14dd642d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4f32ea6a14dd642d.verified.txt index 38c089dea5c..fd7b1129b2a 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4f32ea6a14dd642d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4f32ea6a14dd642d.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4fad923958715aea.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4fad923958715aea.verified.txt index e221ee4b637..1feb40e9dc6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4fad923958715aea.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4fad923958715aea.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4ffc820bd9f027ac.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4ffc820bd9f027ac.verified.txt index de09e8e5bd1..b6780d53ff0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4ffc820bd9f027ac.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_4ffc820bd9f027ac.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5213a5db03dbeef5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5213a5db03dbeef5.verified.txt index 567795e1eec..de87bcb9f63 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5213a5db03dbeef5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5213a5db03dbeef5.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_53fed3db3b4c1704.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_53fed3db3b4c1704.verified.txt index 1895f73d4ef..feec69bc0fa 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_53fed3db3b4c1704.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_53fed3db3b4c1704.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_57fcd364458c5825.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_57fcd364458c5825.verified.txt index 2a577b0861c..b8bdfe0981b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_57fcd364458c5825.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_57fcd364458c5825.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_58f311890e243a66.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_58f311890e243a66.verified.txt index 882b2f0bbaf..627af8ec68d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_58f311890e243a66.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_58f311890e243a66.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5901fa774c05386e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5901fa774c05386e.verified.txt index c6160b67d54..45c60e5c8bf 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5901fa774c05386e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5901fa774c05386e.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5a774fede1a8b693.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5a774fede1a8b693.verified.txt index ffcd75462cf..cdb06dc1d7b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5a774fede1a8b693.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5a774fede1a8b693.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5af19078558bef22.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5af19078558bef22.verified.txt index a8a68511dd5..090996f0990 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5af19078558bef22.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5af19078558bef22.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5bf05d24d75004eb.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5bf05d24d75004eb.verified.txt index ed04d5ad821..6387900c56f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5bf05d24d75004eb.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_5bf05d24d75004eb.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6049a1c6ea8c574f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6049a1c6ea8c574f.verified.txt index 8d97942c6aa..7af0590fdf4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6049a1c6ea8c574f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6049a1c6ea8c574f.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6077a76c7b442f6e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6077a76c7b442f6e.verified.txt index 32d904e7f01..a305e8b535b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6077a76c7b442f6e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6077a76c7b442f6e.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_64a62c4ab79a9392.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_64a62c4ab79a9392.verified.txt index 176afb27d53..0dd9e650c1b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_64a62c4ab79a9392.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_64a62c4ab79a9392.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_670bc0a52047edef.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_670bc0a52047edef.verified.txt index eb4d47b99b1..8f28bcbbeff 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_670bc0a52047edef.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_670bc0a52047edef.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_67ebb6544fe6c27f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_67ebb6544fe6c27f.verified.txt index e80a62ce01d..78a47b1536d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_67ebb6544fe6c27f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_67ebb6544fe6c27f.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_68361028fcc5b28d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_68361028fcc5b28d.verified.txt index 83f506894c1..480c097b345 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_68361028fcc5b28d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_68361028fcc5b28d.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6c198b9ba248881a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6c198b9ba248881a.verified.txt index d6e30f2cbd8..53fcf1cb927 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6c198b9ba248881a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_6c198b9ba248881a.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_70ac68ef35e988a5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_70ac68ef35e988a5.verified.txt index ffc40d8ef79..936e68a3bf6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_70ac68ef35e988a5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_70ac68ef35e988a5.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71145c65a5055538.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71145c65a5055538.verified.txt index 044f94f9c2d..b1118d6f8cc 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71145c65a5055538.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71145c65a5055538.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71e47d4e15567da6.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71e47d4e15567da6.verified.txt index fa620f7d790..96c6fd11bad 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71e47d4e15567da6.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_71e47d4e15567da6.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_72d2b1e76f447645.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_72d2b1e76f447645.verified.txt index e327efd6e59..4a35b6f2775 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_72d2b1e76f447645.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_72d2b1e76f447645.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_748901131c830f2a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_748901131c830f2a.verified.txt index 3902560ab99..0d52d63884f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_748901131c830f2a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_748901131c830f2a.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74a812b979852e89.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74a812b979852e89.verified.txt index 78cd65b465d..975ae8c19d4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74a812b979852e89.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74a812b979852e89.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74f28d1e19ca5b74.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74f28d1e19ca5b74.verified.txt index acccff0a0f7..31327a2e619 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74f28d1e19ca5b74.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_74f28d1e19ca5b74.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_76ccb3657e3f1344.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_76ccb3657e3f1344.verified.txt index 6a032a63ac6..cc735dcf503 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_76ccb3657e3f1344.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_76ccb3657e3f1344.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_77e34035d0f5dada.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_77e34035d0f5dada.verified.txt index 93814b57906..1ef632c6a67 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_77e34035d0f5dada.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_77e34035d0f5dada.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_780d0bcf92b7fd1b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_780d0bcf92b7fd1b.verified.txt index acf3714d2a4..59c00f4db26 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_780d0bcf92b7fd1b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_780d0bcf92b7fd1b.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7841cd14d87aa180.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7841cd14d87aa180.verified.txt index 55f81b7d62f..d9904f45fd2 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7841cd14d87aa180.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7841cd14d87aa180.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7e3816db922bc9a4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7e3816db922bc9a4.verified.txt index ba0dc23692a..8db6024ba16 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7e3816db922bc9a4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7e3816db922bc9a4.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eb7720a6b8de284.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eb7720a6b8de284.verified.txt index 502ae0239a7..1642efb4412 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eb7720a6b8de284.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eb7720a6b8de284.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eceeee16efad14e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eceeee16efad14e.verified.txt index 907111adbcf..cf44c96de78 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eceeee16efad14e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7eceeee16efad14e.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7fa89b333b44720c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7fa89b333b44720c.verified.txt index f32cfb2e4d4..7811092805c 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7fa89b333b44720c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_7fa89b333b44720c.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_802ab878f0a204c4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_802ab878f0a204c4.verified.txt index 378b13b626d..17cb1e7e8ea 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_802ab878f0a204c4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_802ab878f0a204c4.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8043c15316a12438.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8043c15316a12438.verified.txt index d6f8338d9b4..1b2b3c2440b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8043c15316a12438.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8043c15316a12438.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_834310c7fc35f23c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_834310c7fc35f23c.verified.txt index 7bb4431bfc8..8579da97789 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_834310c7fc35f23c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_834310c7fc35f23c.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_84cae70ff1e36dc6.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_84cae70ff1e36dc6.verified.txt index 58440ec02e4..144822f944e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_84cae70ff1e36dc6.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_84cae70ff1e36dc6.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_857a000b885935fa.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_857a000b885935fa.verified.txt index 401fb104223..948864cf8a3 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_857a000b885935fa.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_857a000b885935fa.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_864f2e0953315b38.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_864f2e0953315b38.verified.txt index de91cf32f11..35c92368602 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_864f2e0953315b38.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_864f2e0953315b38.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_86fc6d2ce139945a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_86fc6d2ce139945a.verified.txt index 488fa3591eb..3fb7da761e5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_86fc6d2ce139945a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_86fc6d2ce139945a.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8cba5794f0652371.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8cba5794f0652371.verified.txt index 67b017630df..5f5cd876608 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8cba5794f0652371.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8cba5794f0652371.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8e93f50ead8fda3d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8e93f50ead8fda3d.verified.txt index a5225670668..9aeb0fb7304 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8e93f50ead8fda3d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8e93f50ead8fda3d.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8eb66257e6eb852e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8eb66257e6eb852e.verified.txt index 3059a6d2da9..b45e0337fb3 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8eb66257e6eb852e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_8eb66257e6eb852e.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90e1be6de9347b30.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90e1be6de9347b30.verified.txt index 58c7c835be3..4d570c8233d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90e1be6de9347b30.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90e1be6de9347b30.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90efdf9b0482da54.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90efdf9b0482da54.verified.txt index 4f9e70b34d3..6c9bd69583f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90efdf9b0482da54.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_90efdf9b0482da54.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_92edc4c62e75ebc2.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_92edc4c62e75ebc2.verified.txt index cb4131387d7..3edf6fdb33b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_92edc4c62e75ebc2.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_92edc4c62e75ebc2.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9373fe3eec50413f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9373fe3eec50413f.verified.txt index 625c2efa3a9..33b04f274c4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9373fe3eec50413f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9373fe3eec50413f.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_94f79482c4eee122.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_94f79482c4eee122.verified.txt index 5a8f7a2bdc0..9f5e4bd67cd 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_94f79482c4eee122.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_94f79482c4eee122.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9557425ce6c2b7e1.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9557425ce6c2b7e1.verified.txt index c3251f381e0..4a138026c5a 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9557425ce6c2b7e1.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9557425ce6c2b7e1.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_96bbfe158b17097f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_96bbfe158b17097f.verified.txt index c3d650f598c..2e614b34fef 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_96bbfe158b17097f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_96bbfe158b17097f.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9803af96862ec001.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9803af96862ec001.verified.txt index 59f40d40555..fca20a68408 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9803af96862ec001.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9803af96862ec001.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9b5890bfa5b4d99f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9b5890bfa5b4d99f.verified.txt index 9d9b5a7117c..2836a1eb68e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9b5890bfa5b4d99f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9b5890bfa5b4d99f.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9c4be19559533f56.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9c4be19559533f56.verified.txt index da101481ecb..5404412465b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9c4be19559533f56.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9c4be19559533f56.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9cb55c92bb21f55e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9cb55c92bb21f55e.verified.txt index c2702886c05..26386589fd7 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9cb55c92bb21f55e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9cb55c92bb21f55e.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9d48fd5d58fbfea2.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9d48fd5d58fbfea2.verified.txt index 3b995375a0d..19dd835ba13 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9d48fd5d58fbfea2.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9d48fd5d58fbfea2.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9de9214bc3816f44.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9de9214bc3816f44.verified.txt index f26b394f869..2c3d9b0234c 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9de9214bc3816f44.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9de9214bc3816f44.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9ebef09ef84725e6.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9ebef09ef84725e6.verified.txt index 6dd131cc82a..2005853abad 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9ebef09ef84725e6.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9ebef09ef84725e6.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f92a05dc45c7f93.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f92a05dc45c7f93.verified.txt index eea59fd16f8..f3c0407d101 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f92a05dc45c7f93.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f92a05dc45c7f93.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f96079551cd472e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f96079551cd472e.verified.txt index 38d1cc74c92..be1877b92cc 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f96079551cd472e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_9f96079551cd472e.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a054f29bc225e27f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a054f29bc225e27f.verified.txt index 0f231367065..fa1b8d0cc78 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a054f29bc225e27f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a054f29bc225e27f.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a090f55e49d78b85.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a090f55e49d78b85.verified.txt index 6f4cffb6aba..d2194799308 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a090f55e49d78b85.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a090f55e49d78b85.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a18ee6a99eb155fb.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a18ee6a99eb155fb.verified.txt index b0c07fb7743..075d164bcdb 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a18ee6a99eb155fb.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a18ee6a99eb155fb.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1d47755ff750dbc.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1d47755ff750dbc.verified.txt index b84e142362b..298173f34ac 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1d47755ff750dbc.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1d47755ff750dbc.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1db8ad08b9c6f0b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1db8ad08b9c6f0b.verified.txt index abf1564f93a..71c0f943db2 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1db8ad08b9c6f0b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a1db8ad08b9c6f0b.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a2a185228d8c2e8c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a2a185228d8c2e8c.verified.txt index 42f90a0f87f..8d8661cde4d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a2a185228d8c2e8c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a2a185228d8c2e8c.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a487ce53f8fe8e27.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a487ce53f8fe8e27.verified.txt index 7e6d0545d9f..19ea92be39c 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a487ce53f8fe8e27.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a487ce53f8fe8e27.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a6d206a79c0b11bc.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a6d206a79c0b11bc.verified.txt index c1742cde1e5..a995d6ec8cd 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a6d206a79c0b11bc.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a6d206a79c0b11bc.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a82f26de8832eccf.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a82f26de8832eccf.verified.txt index ffae9985fae..17c6f9e218c 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a82f26de8832eccf.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_a82f26de8832eccf.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab37f66cfadaa3e7.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab37f66cfadaa3e7.verified.txt index 8c12bbcb606..88ebc0f32b5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab37f66cfadaa3e7.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab37f66cfadaa3e7.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab6c3870d7b072f5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab6c3870d7b072f5.verified.txt index 7ed46a2c90e..ba3b7ff778e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab6c3870d7b072f5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ab6c3870d7b072f5.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_abbb1a9c3ca6dda8.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_abbb1a9c3ca6dda8.verified.txt index a1bd9bc63fa..ccba20f268d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_abbb1a9c3ca6dda8.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_abbb1a9c3ca6dda8.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_accf8049754215f3.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_accf8049754215f3.verified.txt index a321112fd28..7a4a4f2a287 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_accf8049754215f3.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_accf8049754215f3.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ad103b557df72a81.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ad103b557df72a81.verified.txt index d9ae17b6ba2..1d60aa28332 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ad103b557df72a81.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ad103b557df72a81.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ae6c52842acb98e2.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ae6c52842acb98e2.verified.txt index 67366652935..8ef91b7427e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ae6c52842acb98e2.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ae6c52842acb98e2.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b3a682de0c41d5e9.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b3a682de0c41d5e9.verified.txt index faaee1c7cb7..80b655f2017 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b3a682de0c41d5e9.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b3a682de0c41d5e9.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b9cbca8c3d93931d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b9cbca8c3d93931d.verified.txt index 329e9fb9b11..bb1e2e634de 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b9cbca8c3d93931d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_b9cbca8c3d93931d.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bb317c7fca3ef64d.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bb317c7fca3ef64d.verified.txt index c2400c25a60..d6f460b6ba4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bb317c7fca3ef64d.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bb317c7fca3ef64d.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bd43f6d21bfce307.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bd43f6d21bfce307.verified.txt index 7d809fb62f6..740ab12f5aa 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bd43f6d21bfce307.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_bd43f6d21bfce307.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c05e9dcf2f3c52b2.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c05e9dcf2f3c52b2.verified.txt index 92a0da1e254..a1be794d8e9 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c05e9dcf2f3c52b2.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c05e9dcf2f3c52b2.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06a091774709463.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06a091774709463.verified.txt index 2e546ae7048..3c4f46ae65b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06a091774709463.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06a091774709463.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06c38d61292585c.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06c38d61292585c.verified.txt index 48167fbe1eb..d2a7fb4d5c1 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06c38d61292585c.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c06c38d61292585c.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c0787b8410370563.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c0787b8410370563.verified.txt index 7c435863d68..0247667739e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c0787b8410370563.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c0787b8410370563.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c4232bde52281574.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c4232bde52281574.verified.txt index eeeec655c70..82834f40aea 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c4232bde52281574.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c4232bde52281574.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classImplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classImplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c50fe9b0ce9d8735.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c50fe9b0ce9d8735.verified.txt index a6ebe56d37e..257d995e73e 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c50fe9b0ce9d8735.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c50fe9b0ce9d8735.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_classNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c5dba07fa2fa4277.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c5dba07fa2fa4277.verified.txt index 2d08b154451..64f2be228a5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c5dba07fa2fa4277.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c5dba07fa2fa4277.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c73a726a6e16643f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c73a726a6e16643f.verified.txt index 9d39edf1183..3d6a1254b4b 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c73a726a6e16643f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c73a726a6e16643f.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c9954182de948eca.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c9954182de948eca.verified.txt index 82aa4ed6f40..eaa7c98ec37 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c9954182de948eca.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c9954182de948eca.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c99cb0de17c1cfa5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c99cb0de17c1cfa5.verified.txt index 23de31b8e91..e332b0c9f90 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c99cb0de17c1cfa5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_c99cb0de17c1cfa5.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca0ee81f642af861.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca0ee81f642af861.verified.txt index 20364603031..ae7b7a0e172 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca0ee81f642af861.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca0ee81f642af861.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca2cf956d0628a4e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca2cf956d0628a4e.verified.txt index 00096f88f60..c83442493a8 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca2cf956d0628a4e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ca2cf956d0628a4e.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cf1fd0660620a6af.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cf1fd0660620a6af.verified.txt index 2cc11228cea..7a3fd31e5a6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cf1fd0660620a6af.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cf1fd0660620a6af.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cfa9c25e4e066413.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cfa9c25e4e066413.verified.txt index b106625fffa..32445a93e9a 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cfa9c25e4e066413.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_cfa9c25e4e066413.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d121f938867a4aff.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d121f938867a4aff.verified.txt index 0b025b31a9b..ab0a2805ec4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d121f938867a4aff.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d121f938867a4aff.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d21dbb3a099da395.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d21dbb3a099da395.verified.txt index aaa5708f1a3..34e33276386 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d21dbb3a099da395.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d21dbb3a099da395.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d3f9fcab39089b82.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d3f9fcab39089b82.verified.txt index 01af60b9e56..0b89af29554 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d3f9fcab39089b82.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d3f9fcab39089b82.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d4627929e7d82733.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d4627929e7d82733.verified.txt index fb1efe70071..30a9872edd0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d4627929e7d82733.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d4627929e7d82733.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d63cf40f531399a1.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d63cf40f531399a1.verified.txt index 69889b87e2b..39d7d7fcae2 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d63cf40f531399a1.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d63cf40f531399a1.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d91efac105621c68.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d91efac105621c68.verified.txt index 023403cf9c2..6c583914591 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d91efac105621c68.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_d91efac105621c68.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dc0886a61829b0fd.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dc0886a61829b0fd.verified.txt index 44bdf56d871..bd93d60010c 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dc0886a61829b0fd.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dc0886a61829b0fd.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dd0ee5b0c8cd3a94.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dd0ee5b0c8cd3a94.verified.txt index 93ae22be1c9..bef09c234f4 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dd0ee5b0c8cd3a94.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_dd0ee5b0c8cd3a94.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_de7b1899726e8402.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_de7b1899726e8402.verified.txt index aca04a3a920..bf164605480 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_de7b1899726e8402.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_de7b1899726e8402.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e0b1500cada1c6b4.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e0b1500cada1c6b4.verified.txt index 3b884486481..ef5479fe3c0 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e0b1500cada1c6b4.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e0b1500cada1c6b4.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cf4fcd9442043e.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cf4fcd9442043e.verified.txt index 6e4b5542096..443c5845e09 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cf4fcd9442043e.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cf4fcd9442043e.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cfa61ca18d8d38.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cfa61ca18d8d38.verified.txt index 10fc5bcd244..b3d313df503 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cfa61ca18d8d38.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e3cfa61ca18d8d38.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNoneshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structImplicitNoneshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e419c934080154d3.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e419c934080154d3.verified.txt index d8dace7c68a..2c7b245d8a5 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e419c934080154d3.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e419c934080154d3.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_record_classNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e56f31bd449409bf.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e56f31bd449409bf.verified.txt index 4e26548d591..5c2ec362f88 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e56f31bd449409bf.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e56f31bd449409bf.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_record_structExplicitImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e5f56ba207491782.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e5f56ba207491782.verified.txt index e30924d9df3..a28d27eff90 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e5f56ba207491782.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e5f56ba207491782.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_recordExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e793f2f212e89480.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e793f2f212e89480.verified.txt index 38b2e700f4f..5c5ee818a27 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e793f2f212e89480.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e793f2f212e89480.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e837757415cf9a87.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e837757415cf9a87.verified.txt index 1f6d0de6680..da3082df3ce 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e837757415cf9a87.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e837757415cf9a87.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classExplicitExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e9618be5f9ed361a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e9618be5f9ed361a.verified.txt index 2ea72dbf745..3f852de51f1 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e9618be5f9ed361a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_e9618be5f9ed361a.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ea0b947d150a50df.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ea0b947d150a50df.verified.txt index c7adc75dced..9c083ee5805 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ea0b947d150a50df.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ea0b947d150a50df.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structImplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structImplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ec30ed4bf879e7c8.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ec30ed4bf879e7c8.verified.txt index abed9b31266..a2cc37df5db 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ec30ed4bf879e7c8.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ec30ed4bf879e7c8.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ed42bf4f42cdccdb.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ed42bf4f42cdccdb.verified.txt index 11ecc746b07..150a1a5150f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ed42bf4f42cdccdb.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_ed42bf4f42cdccdb.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structImplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f1e0ff765a22a5a0.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f1e0ff765a22a5a0.verified.txt index 8267dc77aec..77b680a838a 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f1e0ff765a22a5a0.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f1e0ff765a22a5a0.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f23391beb1a84fe3.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f23391beb1a84fe3.verified.txt index 210c7737303..8d839ad3379 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f23391beb1a84fe3.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f23391beb1a84fe3.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_classImplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f35ca87e848fe958.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f35ca87e848fe958.verified.txt index a7cc98293a1..e1fdd6c64bb 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f35ca87e848fe958.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f35ca87e848fe958.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structNoneImplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f397f2a2b36d12c5.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f397f2a2b36d12c5.verified.txt index 7e50d6fd99a..2cde7bbcc29 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f397f2a2b36d12c5.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f397f2a2b36d12c5.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_classExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_classExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f4d81be4e42d003b.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f4d81be4e42d003b.verified.txt index c243f5a26e3..0de1aefc4b6 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f4d81be4e42d003b.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f4d81be4e42d003b.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6ec22721fee54fb.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6ec22721fee54fb.verified.txt index 6c5c400e8e5..63f808dd07f 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6ec22721fee54fb.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6ec22721fee54fb.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6f5b66c115cfe4f.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6f5b66c115cfe4f.verified.txt index b929fef3a8e..8f8fec1c30d 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6f5b66c115cfe4f.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_f6f5b66c115cfe4f.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitbyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordNoneExplicitbyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fc587ef5e7021a3a.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fc587ef5e7021a3a.verified.txt index 639fa1fb7a2..3109c773ecd 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fc587ef5e7021a3a.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fc587ef5e7021a3a.verified.txt @@ -37,39 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_record_structExplicitNonebyte)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_record_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_record_structExplicitNonebyte)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "string"; + schema.Type = "integer"; schema.Nullable = true; - schema.Format = "byte"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fcf161275df488ea.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fcf161275df488ea.verified.txt index 53e91902440..2a94650b1e1 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fcf161275df488ea.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fcf161275df488ea.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_readonly_partial_structNoneExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fe40f87af1f241a2.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fe40f87af1f241a2.verified.txt index 6813e968314..9ac084e8f93 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fe40f87af1f241a2.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fe40f87af1f241a2.verified.txt @@ -37,19 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_sealed_partial_recordExplicitImplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fea89883ed414cbb.verified.txt b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fea89883ed414cbb.verified.txt index 05fe9fa5e72..ab9958c3daf 100644 --- a/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fea89883ed414cbb.verified.txt +++ b/tests/SnapshotTests/Casting/snapshots/snap-v9.0/CastingGenerationTests.Can_specify_casting_at_the_global_config_level_fea89883ed414cbb.verified.txt @@ -37,37 +37,37 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::Whatever._casting_public_partial_structExplicitExplicitshort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::Whatever._casting_public_partial_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::Whatever._casting_public_partial_structExplicitExplicitshort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type == typeof(global::System.Nullable)) { - schema.Type = "number"; + schema.Type = "integer"; schema.Nullable = true; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::System.Nullable)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_32176bb7ed8221dd.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_32176bb7ed8221dd.verified.txt index e5a0818f5b2..cd2dad1df9b 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_32176bb7ed8221dd.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_32176bb7ed8221dd.verified.txt @@ -159,19 +159,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::@double.MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::@double.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::@double.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_999bbcbfced9b3f8.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_999bbcbfced9b3f8.verified.txt index 842db3e7f4d..5018c8c9f58 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_999bbcbfced9b3f8.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_999bbcbfced9b3f8.verified.txt @@ -159,19 +159,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::MyNamespace.MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::MyNamespace.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::MyNamespace.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_c61bd4ba08e7d371.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_c61bd4ba08e7d371.verified.txt index dc68ad9d44a..d8d5a156441 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_c61bd4ba08e7d371.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Generates_OpenApiMappingExtensionMethod_c61bd4ba08e7d371.verified.txt @@ -159,19 +159,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_72da95b4a0a661aa.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_72da95b4a0a661aa.verified.txt index a276f81b41e..814e56bd691 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_72da95b4a0a661aa.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_72da95b4a0a661aa.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::MyNamespace.MyVo)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::MyNamespace.MyVo)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::MyNamespace.MyVo)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_a208bec0efab2582.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_a208bec0efab2582.verified.txt index a276f81b41e..814e56bd691 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_a208bec0efab2582.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-v9.0/OpenApiTests.Treats_IParsable_primitives_as_strings_a208bec0efab2582.verified.txt @@ -37,20 +37,19 @@ public static partial class VogenOpenApiExtensions { if (context.JsonTypeInfo.Type == typeof(global::MyNamespace.MyVo)) { - schema.Type = "string"; - schema.Format = "byte"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::MyNamespace.MyVo)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::MyNamespace.MyVo)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "string", Format = "byte" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt index dab64fd685a..06b94009431 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::@double.MyVoShort)) { - schema.Type = Microsoft.OpenApi.JsonSchemaType.Number; + schema.Type = Microsoft.OpenApi.JsonSchemaType.Integer; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::@double.MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::@double.MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt index 0aed041465d..7b591cebed7 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::MyNamespace.MyVoShort)) { - schema.Type = Microsoft.OpenApi.JsonSchemaType.Number; + schema.Type = Microsoft.OpenApi.JsonSchemaType.Integer; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::MyNamespace.MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::MyNamespace.MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt index 81da7e3bbb5..56e0d759dd7 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore10.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType<@bool[]>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Boolean } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Number } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Array, Items = new global::Microsoft.OpenApi.OpenApiSchema { Type = global::Microsoft.OpenApi.JsonSchemaType.Integer } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(MyVoShort)) { - schema.Type = Microsoft.OpenApi.JsonSchemaType.Number; + schema.Type = Microsoft.OpenApi.JsonSchemaType.Integer; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(MyVoShort)) { schema.Type = Microsoft.OpenApi.JsonSchemaType.Array; - schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Number }; + schema.Items = new Microsoft.OpenApi.OpenApiSchema { Type = Microsoft.OpenApi.JsonSchemaType.Integer }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_32176bb7ed8221dd.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_32176bb7ed8221dd.verified.txt index f73e9bb619c..f9979cb5c66 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_32176bb7ed8221dd.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_32176bb7ed8221dd.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_999bbcbfced9b3f8.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_999bbcbfced9b3f8.verified.txt index 7e1011f1d15..5290aba2330 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_999bbcbfced9b3f8.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_999bbcbfced9b3f8.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_c61bd4ba08e7d371.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_c61bd4ba08e7d371.verified.txt index 5b14827a21f..f3a7dcc3dab 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_c61bd4ba08e7d371.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore8.0/SwashbuckleTests.Generates_extension_method_for_mapping_types_c61bd4ba08e7d371.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType<@bool[]>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt index 41276c93428..3bbc95a26a6 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_32176bb7ed8221dd.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::@double.MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::@double.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::@double.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt index c57c69290eb..74fa1ad1cbb 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_999bbcbfced9b3f8.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(global::MyNamespace.MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(global::MyNamespace.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(global::MyNamespace.MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask; diff --git a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt index 6fbc85f4a51..feb87502ea7 100644 --- a/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt +++ b/tests/SnapshotTests/OpenApi/snapshots/snap-vAspNetCore9.0/OpenApiTests.Generates_both_OpenApiMappingExtensionMethod_SwaggerMappingExtensionMethod_c61bd4ba08e7d371.verified.txt @@ -61,10 +61,10 @@ global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.Map global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType<@bool[]>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "boolean", Nullable = false } }); - global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); -global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "number", Nullable = false } }); + global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); +global::Microsoft.Extensions.DependencyInjection.SwaggerGenOptionsExtensions.MapType>(o, () => new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "array", Items = new global::Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer", Nullable = false } }); return o; @@ -231,19 +231,19 @@ public static partial class VogenOpenApiExtensions if (context.JsonTypeInfo.Type == typeof(MyVoShort)) { - schema.Type = "number"; + schema.Type = "integer"; } if (context.JsonTypeInfo.Type.IsArray && context.JsonTypeInfo.Type.GetElementType() == typeof(MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } if (context.JsonTypeInfo.Type.IsGenericType && context.JsonTypeInfo.Type.GetGenericArguments().Length == 1 && context.JsonTypeInfo.Type.GetGenericArguments()[0] == typeof(MyVoShort)) { schema.Type = "array"; - schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "number" }; + schema.Items = new Microsoft.OpenApi.Models.OpenApiSchema { Type = "integer" }; } return global::System.Threading.Tasks.Task.CompletedTask;