RicoSuter / NJsonSchema

JSON Schema reader, generator and validator for .NET
http://NJsonSchema.org
MIT License
1.38k stars 532 forks source link

Feature Suggestion: Support Additional Data Annotation Attributes #182

Open nickcox opened 8 years ago

nickcox commented 8 years ago

Would you consider adding support for the full set of annotation attributes supported by JSON.Net Schema?

From the page:

Definition of Done:

RicoSuter commented 8 years ago

Thanks for listing all of available attributes. We should implement these in the JSON Schema generator...

nickcox commented 8 years ago

Awesome. I'm happy to have a crack at this if it's not too difficult.

RicoSuter commented 8 years ago

Yes, I think most attributes should be easy to implement...

RicoSuter commented 8 years ago

Implemented StringLengthAttribute in commit https://github.com/NJsonSchema/NJsonSchema/commit/fe0b60ae23c7fc1f242eb7d2a4fac889b85b1ffb

RicoSuter commented 8 years ago

With https://github.com/NJsonSchema/NJsonSchema/issues/189 phone and email should be handled too.. we should add unit tests for them

psandgren commented 2 years ago

Hey! Is this supposed to be implemented? I see the tests, but codegeneration from NSwag doesn't really add the EmailAddressAttribute. Where to look? What to fix? How can I help? :)

RicoSuter commented 2 years ago

I think the idea is to add this support in the DTO to JSON Schema side, not the code generator...

danielniccoli commented 1 year ago

Is there a chance to also include CustomValidation support?