Quantcast
Channel: Json.NET
Viewing all articles
Browse latest Browse all 1767

Created Issue: JSON schema with data annotation [23819]

$
0
0
Hello,
I had the requirements of being able to add more constraints to properties in the JSON schema. I then implemented a post processing schema generation that scans all property attributes and adds the details in the schema (see attachment). The code satisfy my requirements and probably need to be truly extended to cover all cases.

I think it would be more efficient to have it in the JsonSchemaGenerator.Generate method, perhaps with an optional setting "useDataAnnotations" to enable it.

What do you think?

Thanks,
Pedro

Viewing all articles
Browse latest Browse all 1767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>