NJsonSchema
NJsonSchema copied to clipboard
DescriptionAttributes are not serializing with latest verison.
Here's my code
var generatorSettings = new JsonSchemaGeneratorSettings {
SerializerSettings = null,
SerializerOptions = JsonSerializerSettings.AIInputOptions,
UseXmlDocumentation = false
};
var schema = JsonSchema.FromType<TType>(generatorSettings) ??
throw new InvalidOperationException();
return schema.ToJson();
Here's an example object.
[Description("The Details of An Article")]
private record PreProcessRequest([Description("The title of the article")] string title, [Description("The Summary of the article")] string summary);
Does this not work with records?