RicoSuter/NJsonSchema
Feature Suggestion: Support Additional Data Annotation Attributes
Aperta
#182 aperta il 30 ago 2016
help wantedtype: enhancement
Metriche repository
- Star
- (1581 stelle)
- Metriche merge PR
- (Merge medio 39g 6h) (1 PR mergiata in 30 g)
Descrizione
Would you consider adding support for the full set of annotation attributes supported by JSON.Net Schema?
From the page:
- RequiredAttribute | Property will be required.
- MinLengthAttribute | minLength of a string or the minItems in an array.
- MaxLengthAttribute | maxLength of a string or the maxItems in an array.
- RegularExpressionAttribute | String pattern.
- RangeAttribute | Number minimum and maximum.
- StringLengthAttribute | String minLength and maxLength. https://github.com/NJsonSchema/NJsonSchema/commit/fe0b60ae23c7fc1f242eb7d2a4fac889b85b1ffb
- EnumDataTypeAttribute | Enum type used to generate enum values.
- DataTypeAttribute | String format depending on the DataType value. Supports Url, Date, Time, DateTime, EmailAddress, PhoneNumber (sets the JSON Schema "format").
- UrlAttribute | String uri format (sets the JSON Schema "format").
- PhoneAttribute | String phone format (sets the JSON Schema "format").
- EmailAddressAttribute | String email format (sets the JSON Schema "format").
Definition of Done:
- Implemented attribute handling
- Added unit test
- Updated wiki