RicoSuter/NJsonSchema

Feature Suggestion: Support Additional Data Annotation Attributes

オープン

#182 opened on 2016/08/30

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)C# (549 件のフォーク)github user discovery
help wantedtype: enhancement

Repository metrics

Stars
 (1,581 個のスター)
PR merge metrics
 (平均マージ 39d 6h) (30d で 1 merged 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

コントリビューターガイド