NJsonSchema icon indicating copy to clipboard operation
NJsonSchema copied to clipboard

DescriptionAttributes are not serializing with latest verison.

Open JohnGalt1717 opened this issue 1 year ago • 0 comments

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?

JohnGalt1717 avatar Nov 28 '23 17:11 JohnGalt1717