<PackageReference Include="NJsonSchema" Version="11.0.0-preview003" />

JsonSchemaExtensionDataAttribute

Adds an extension data property to a class or property.
using System; using System.Collections.Generic; namespace NJsonSchema.Annotations { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)] public class JsonSchemaExtensionDataAttribute : Attribute, IJsonSchemaExtensionDataAttribute { public string Key { get; } public object Value { get; } public IReadOnlyDictionary<string, object> ExtensionData => new Dictionary<string, object> { { Key, Value } }; public JsonSchemaExtensionDataAttribute(string key, object value) { Key = key; Value = value; } } }