Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-json-schema - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

2

package.json
{
"name": "fluent-json-schema",
"version": "2.0.2",
"version": "2.0.3",
"description": "JSON Schema fluent API",

@@ -5,0 +5,0 @@ "main": "src/FluentJSONSchema.js",

@@ -294,2 +294,3 @@ 'use strict'

),
required: schema.required.filter(p => properties.includes(p)),
},

@@ -296,0 +297,0 @@ ...options,

@@ -836,2 +836,30 @@ const { ObjectSchema } = require('./ObjectSchema')

})
it('works correctly with required properties', () => {
const base = S.object()
.id('base')
.title('base')
.prop('foo', S.string().required())
.prop('bar', S.string())
.prop('baz', S.string().required())
.prop('qux', S.string())
const only = base.only(['foo', 'bar'])
expect(only.valueOf()).toEqual({
$schema: 'http://json-schema.org/draft-07/schema#',
$id: 'base',
title: 'base',
properties: {
foo: {
type: 'string',
},
bar: {
type: 'string',
},
},
required: ['foo'],
type: 'object',
})
})
})

@@ -838,0 +866,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc