RicoSuter/NJsonSchema
Feature Suggestion: Support Additional Data Annotation Attributes
开放
#182 创建于 2016年8月30日
help wantedtype: enhancement
仓库指标
- 星标
- (1,581 个星标)
- PR 合并指标
- (平均合并 39天 6小时) (30 天内合并 1 个 PR)
描述
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