- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 60
 
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
it's a large refactoring in order to move toward 1.0
Create:
- BaseSchema (id, title, example, required, etc.)
 - StringSchema (format, pattern, etc)
 - ArraySchema (items, etc)
 - ObjectSchema (properties, etc)
 - NumberSchema (min, max, etc)
 - IntegerSchema (min, max, etc)
 - BooleanSchema
 - Refactor Typescript types
 
New syntax
const schema = FluentSchema()
      .id('http://bar.com/object')
      .title('A object')
      .description('A object desc')
      .prop(
        'name',
        FluentSchema()
          .asString()
          .id('http://foo.com/string')
          .title('A string')
          .description('A string desc')
          .pattern(/.*/g)
          .format('date-time')
      )
      .valueOf()it wont hint for wrong types like:
StringSchema().min(5) // Number validation keywordsor
FluentSchema().minLength(10) // String validation keywordsThis allows:
- better code hitting by type
 - smaller implementation files
 - Tests by type
 
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request