NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #2874 most downloaded on NuGet
Extends JsonSchema.Net to provide schema generation functionality
Last release 16 days ago
26 Sep 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 56 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
127 years old
82 releases · first in 1900
Source generation now describes enumerations according to their serialization.
Source generation now describes enumerations according to their serialization.
An enum type carrying [JsonConverter] is described to match: System.Text.Json’s JsonStringEnumConverter yields an anyOf of the member names or an integer, and Json.More’s EnumStringConverter<T> yields the member names.
A [JsonConverter] on a property applies to that property alone, so its schema is inlined in that format while other uses of the enum keep the shared $ref .
Enums without a converter follow the new JsonSchemaDefaultEnumFormat build property: Names (the default), Values for an integer, or NamesAndValues for either.
Runtime generation is unchanged and continues to describe enumerations by name.
Fixes [Id] being ignored by source generation when the attribute is applied to a type in a referenced assembly.
#1059 - Source generation drops a custom attribute’s constraint when the attribute carries a ConditionGroup , leaving an empty then where runtime generation produces the constraint. Thanks to @xavier-hunt for reporting.
Fixes [Id] being ignored by source generation when the attribute is applied to a type in a referenced assembly.
One column per quarter.
#1056 - Source-generated schema should respect explicit [JsonSchema()] attributes.
#1056 - Source-generated schema should respect explicit [JsonSchema()] attributes.
Source-generated schema registration has been updated to better handle aliased collection shapes by avoiding duplicate schema registrations and duplic
Source-generated schema registration has been updated to better handle aliased collection shapes by avoiding duplicate schema registrations and duplicate converter registrations for equivalent shapes.
Fixes a static field initialization ordering bug in source-generated code where collection-type alias fields could be emitted before the canonical sch
Fixes a static field initialization ordering bug in source-generated code where collection-type alias fields could be emitted before the canonical schema field they reference, causing a null value at runtime.
Fixes an issue with generation of schemas for collection types across multiple assemblies.
Fixes an issue with generation of schemas for collection types across multiple assemblies.
Fixes $id s to be URNs instead of global:: strings.
#1038 - Source generation support improvements for collection types.
#1038 - Source generation support improvements for collection types.
generate explicit schemas for enums (no inlining)
#1024
improves dictionary support
generate explicit schemas for enums (no inlining)
handle schema generation across multiple projects
Runtime type initialization failure in source-generated code
#1018
Fixes
Runtime type initialization failure in source-generated code
Multiple [If] attributes that use the same property
Array types support
Better nullability tracking
Better support for external types
Added project attributes (.csproj) that allow setting generation defaults for
enabling/disabling source generation
property naming (casing)
property order
[Nullable(false)] is not handled properly
#1018
[Nullable(false)] is not handled properly
Multiline XML comments cause compile failure
#1018 - Name nullables separately from the base type. Hang in there.
#1018 - Name nullables separately from the base type. Hang in there.
#1018 - Manage same-name types in different namespaces. We’re gonna get through this.
#1018 - Manage same-name types in different namespaces. We’re gonna get through this.
#1018 - Collapse schemas to a common type.
#1018 - Collapse schemas to a common type.
Support for [JsonRequired] (also in runtime generation)
#1018
Support for [JsonRequired] (also in runtime generation)
Bug fix: support [Id] , [Default] , [Nullable] , and [AdditionalProperties]
Adds $schema as 2020-12 by default
Adds extension mechanism for source generation handlers for third-party types.
Adds SchemaGeneratorConfiguration.Default and SchemaGeneratorConfiguration.DefaultDialect .
Updated source generation to produce a schema per type, not just top-level types.
Updated source generation to produce a schema per type, not just top-level types.
Updated nuget packages & EULA.
Updated nuget packages & EULA.
#1008 - Updates warning suppression to [GlobalSuppressMessage] to support post-compilation publish operations.
#1008 - Updates warning suppression to [GlobalSuppressMessage] to support post-compilation publish operations.
#1008 - Adds a warning suppression pragma to source-generated code since that can’t be edited to suppress it. Thanks to @ThomasNieto for flagging this
#1008 - Adds a warning suppression pragma to source-generated code since that can’t be edited to suppress it. Thanks to @ThomasNieto for flagging this.
#986 - Improves AOT compatibility by adding a source generator to produce schemas at compile time. Thanks to @ThomasNieto for suggesting.
#986 - Improves AOT compatibility by adding a source generator to produce schemas at compile time. Thanks to @ThomasNieto for suggesting.
Nothing published for this version
Nothing published for this version
#986 - Improves AOT compatibility by adding attributes to prevent metadata trimming on types for which schemas are generated.
#986 - Improves AOT compatibility by adding attributes to prevent metadata trimming on types for which schemas are generated.
Enacted Open Source Maintenance Fee.
Enacted Open Source Maintenance Fee.
See the blog post for more information.
Updated per JsonSchema.Net v8 (breaking changes).
Updated per JsonSchema.Net v8 (breaking changes).
Added Dialect static class.
Add .Net 10.0 support.
Update Nuget references.
#890 - Add support for [JsonStringMemberName] attribute. Thanks to @PJBarczyk for suggesting. #891 - Multiple indexers throw exception. Fix here is to
#890 - Add support for [JsonStringMemberName] attribute. Thanks to @PJBarczyk for suggesting.
#891 - Multiple indexers throw exception. Fix here is to just ignore indexers for schema generation. Thanks to @ovidiuiliescu for reporting.
#933 - Address potential duplicate key exception when in a multi-threaded environment.
GenerativeValidatingJsonConverter as a replacement for JsonSchema.Net ’s ValidatingJsonConverter that generates schemas instead of requiring explicit
#915 - Multiple external references incorrectly create references to a $defs definition that doesn’t exist.
Adds:
[GenerateJsonSchema] attribute
GenerativeValidatingJsonConverter as a replacement for JsonSchema.Net ’s ValidatingJsonConverter that generates schemas instead of requiring explicit schemas. Also supports [JsonSchema] attribute.
#906 - Multiple types could produce the same schema. For example IEnumerable and int[] both produce a definition name of arrayOfInt .
#906 - Multiple types could produce the same schema. For example IEnumerable<int> and int[] both produce a definition name of arrayOfInt .
Fixed schema generation for types with property overrides using ‘new’ keyword
Fixed schema generation for types with property overrides using ‘new’ keyword
Rerelease of 5.0.1 with fixed package dependencies. Thanks to @arturcic for reporting.
Rerelease of 5.0.1 with fixed package dependencies. Thanks to @arturcic for reporting.
Fixed missing $defs in the produced JSON schema if SchemaGeneratorConfiguration.RegisterXmlCommentFile() is used on a type which has a xmldoc.
Fixed missing $defs in the produced JSON schema if SchemaGeneratorConfiguration.RegisterXmlCommentFile() is used on a type which has a <summary> xmldoc.
API update which addresses numerous design issues.
API update which addresses numerous design issues.
Revamped nullability so that the code is respected and [Nullable] is merely an override rather than the primary specifier of behavior.
Optimization can no longer be disabled, and has been updated to only collect types instead of common schemas. $ref s are minimized.
Added explicit configuration to assign an attribute to a generic parameter.
Support for C# required keyword.
IContextContainer removed as it only supported optimization, which is now performed differently.
.Replace() removed from AdditionalItemsIntent , AdditionaPropertiesIntent , ItemsIntent , PropertiesIntent , PropertyNamesIntent , and UnevaluatedPropertiesIntent .
Nullability enum removed.
[Nullable] attribute can no longer be applied to types; now only fields and properties.
SchemaGenerationContextBase :
.Type is now abstract.
.Hash removed.
.ReferenceCount moved to TypeGenerationContext .
.GenerateIntents() is now abstract.
MemberGenerationContext.BasedOn is now explicitly a TypeGenerationContext .
SchemaGenerationContextCache.Get() now explicitly returns a TypeGenerationContext .
SchemaGenerationContextOptimizer removed.
.TypeNameGenerator static property moved to ScheamGenerationConfiguration as instance property.
SchemaGeneratorConfiguration :
.Nullability removed.
.Optimize removed.
INestableAttribute interface which allows specifying which generic parameter the attribute applies to.
Most built-in attributes support this interface.
Context property now settable on AdditionalPropertiesIntent , ItemsIntent , and UnevaluatedPropertiesIntent .
MemberGenerationContext.NullableRef which indicates that the member is declared as a nullable reference type.
MemberGenerationContext.Parameter which indicates the type nesting level (“nesting” as in how a generic parameter is nested).
C# required keyword will now add the property to a required JSON Schema keyword.
Add .Net 9.0 support.
Add .Net 9.0 support.
#795 - Added support for [JsonExclude] and [JsonIgnore] ( System.Text.Json ) for enum members. Thanks to @2BitSalute for suggesting and implementing t
#795 - Added support for [JsonExclude] and [JsonIgnore] ( System.Text.Json ) for enum members. Thanks to @2BitSalute for suggesting and implementing the idea.
Added SchemaGeneratorConfiguration.ExternalReferences
#768 - Added two ways to allow external references. Thanks to @luisjones for suggesting the idea.
Added [Id] attribute
Added SchemaGeneratorConfiguration.ExternalReferences
Updated to use JsonSchema.Net v7.0.0, which contains breaking changes ( release notes ).
Updated to use JsonSchema.Net v7.0.0, which contains breaking changes ( release notes ).
#767 - Missing description keyword from XML comments on multi-nested types. Thanks to @parnic-sks for reporting this.
Added EnumIntent constructors that take JsonNodes .
Added EnumIntent constructors that take JsonNodes .
Added NotIntent .
The following have been updated:
#696 - Number-based constraints ignored for nullable number types. Thanks to @rhwork for reporting this.
The following have been updated:
[Minimum]
[ExclusiveMinimum]
[Maximum]
[ExclusiveMaximum]
[IfMin]
[IfMax]
Added extension method bool IsNullableNumber(this Type) .
Add support for multiple [If] attributes for the same property under the same group creating an enum keyword with all of the values.
Add support for multiple [If] attributes for the same property under the same group creating an enum keyword with all of the values.
#667 - Add support for description keyword creation from XML comments . Thanks to @zlepper for applying pressure on this feature.
#667 - Add support for description keyword creation from XML comments <Summary> . Thanks to @zlepper for applying pressure on this feature.
Updated for multi-framework support with .Net Standard 2.0 and .Net 8, including updating System.Text.Json from v6 to v8.
Updated for multi-framework support with .Net Standard 2.0 and .Net 8, including updating System.Text.Json from v6 to v8.
AOT support is not currently supported for this library. Appropriate attributes have been added to public API.
Dropping support for .Net Standard 3.1 - May still be used, but exact behavior cannot be guaranteed.
PropertyNamingMethods removed. Previously marked obsolete.
SchemaGeneratorConfiguration.PropertyNamingMethod removed. Previously marked obsolete.
Nothing published for this version
Also fixed a hash code collision issue with property ordering.
#579 - Types which contained properties with both nullable and non-nullable versions of the same value type would attribute all properties as nullable. Thanks to @tjochums for reporting.
Also fixed a hash code collision issue with property ordering.
#551 - Strings implement IEnumerable and thus were considered arrays. As a result minItems and maxItems were being applied. Thanks to @domchlouba for
#551 - Strings implement IEnumerable<T> and thus were considered arrays. As a result minItems and maxItems were being applied. Thanks to @domchlouba for reporting this and recommending the fix.
Also affected by this were [JsonPropertyName] and [JsonIgnore] .
#544 - Objects that have two properties of the same type, one of which is marked with an [Obsolete] attribute will cause all properties to have a deprecated: true added to their schemas. Thanks to @filzrev for reporting this.
Also affected by this were [JsonPropertyName] and [JsonIgnore] .
SchemaGeneratorConfiguration.PropertyNamingMethod has been deprecated. It’s still functional but will be removed with the next major version.
#528 - @juwens suggesting adding PropertyNameResolver for property naming that takes the entire MemberInfo (instead of just the member name) in place of PropertyNamingMethod so that additional information can be used to determine a name for the JSON property.
SchemaGeneratorConfiguration.PropertyNamingMethod has been deprecated. It’s still functional but will be removed with the next major version.
#512 - There was no support for JsonNode , explicitly. Instead it would attempt to generate via reflection. This update adds that support and just gen
#512 - There was no support for JsonNode , explicitly. Instead it would attempt to generate via reflection. This update adds that support and just generates a true schema. Thanks to @ashek-simeon for reporting and recommending a solution.
#488 - [Maximum(double.MaxValue)] throws an overflow exception when attempting to convert to decimal. This fix updates all min/max-related attributes.
#488 - [Maximum(double.MaxValue)] throws an overflow exception when attempting to convert to decimal. This fix updates all min/max-related attributes.
Added conditional schema generation using new attributes to define condition groups and then assigning other attributes to those groups.
Added conditional schema generation using new attributes to define condition groups and then assigning other attributes to those groups.
Also added ITypeNameGenerator and SchemaGenerationContextOptimizer.TypeNameGenerator to allow custom naming.
#455 - Better naming for $defs keys.
Also added ITypeNameGenerator and SchemaGenerationContextOptimizer.TypeNameGenerator to allow custom naming.
#450 - Fixed an edge case issue where a recursive class structure defining the same property type caused a stack overflow when the outer class propert
#450 - Fixed an edge case issue where a recursive class structure defining the same property type caused a stack overflow when the outer class property was decorated with [Nullable] .
Updated JsonSchema.Net reference to v4.0.0.
Updated JsonSchema.Net reference to v4.0.0.
#325 - @jnystad found an issue with [Nullable] where it was propagating to other properties of the same type and suggested a fix.
#325 - @jnystad found an issue with [Nullable] where it was propagating to other properties of the same type and suggested a fix.
#296 - Updated handling logic for [JsonIgnore] to consider the attribute’s Condition property.
#296 - Updated handling logic for [JsonIgnore] to consider the attribute’s Condition property.
#288 - Just bumping version to pick up the latest Json.More.Net by default. This package pull Json.More.Net transitively via JsonPointer.Net which was
#288 - Just bumping version to pick up the latest Json.More.Net by default. This package pull Json.More.Net transitively via JsonPointer.Net which wasn’t updated with the move to JsonNode .
Updated all functionality to use JsonNode instead of JsonElement in line with JsonSchema.Net v3.
Updated all functionality to use JsonNode instead of JsonElement in line with JsonSchema.Net v3.
JsonElement -> JsonNode type exchange changes not listed.
IContextContainer.GetContexts() and implementations removed as it was obsolete
TypeExtensions.IsInteger() , .IsFloatingPoint() , and .IsNumber() moved to Json.More.Net
Nothing published for this version
Added SchemaGeneratorConfiguration.Optimize to control whether common subschemas are collected into $defs .
#272 - Miscellaneous attributes can cause incorrect optimizations.
Added SchemaGeneratorConfiguration.Optimize to control whether common subschemas are collected into $defs .
Exposed SchemaGeneratorConfiguration.Current static property for read use by custom generators, etc.
Improved support for array types that inherit IEnumerable but aren’t generic themselves, e.g. MyList : List .
#264 - Added support for additionalProperties and additionalItems .
Improved support for array types that inherit IEnumerable<T> but aren’t generic themselves, e.g. MyList : List<int> .
Also updated return value of SchemaGenerationContextBase.Apply() from JsonSchemaBuilder to JsonSchema . This is pretty hidden, so it shouldn’t break anyone, thus not strictly adhering to semver for this change. Calling it out just in case.
Exposed SchemaGenerationContextBase.Hash property. Required to implement IContextContainer.Replace() .
Exposed SchemaGenerationContextBase.Hash property. Required to implement IContextContainer.Replace() .
Marked IContextContainer.GetContexts() obsolete as it’s not used.
Intents no longer require equality methods ( Equals() & GetHashCode() ). 🎉
#202 - Added support for read-only & write-only keywords for properties that only have getters or setters. The attributes override this detection behavior.
#256 - Added support for type-level attributes.
Intents no longer require equality methods ( Equals() & GetHashCode() ). 🎉
SchemaGeneratorContext replaced by SchemaGenerationContextBase , TypeGenerationContext , and MemberGenerationContext .
The “Type” version represents generation of a “pure” type; that is, it’s not a member of another type. This will only handle attributes that are placed on the type itself.
The “Member” version represents object members. This will handle attributes placed on the member. The Attributes property is only present on this version since the type carries the attributes for the other.
SchemaGenerationContextCache.Get() has two overloads, only with member attributes, and one without. If attributes are supplied, a MemberGenerationContext will be returned; otherwise a TypeGenerationContext will be returned.
SchemaGeneratorConfiguration converted into a thread-static singleton (the static property is Current ) for easier access.
IAttributeHandler is now just a placeholder. Attribute handlers will now need to implement IAttributeHandler<T> where T is the attribute type.
IAttributeHandler.AddConstraints() now has an attribute parameter.
#206 - Some XML comments were inaccurate or had copy/paste errors.
#243 - Updated System.Text.Json to version 6.
Most attributes can now be placed on:
properties & fields
all types (class, struct, enum, interface)
Your coding agent can read these notes before it upgrades. Set up the MCP server →