New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vingle/joi-to-json-schema

Package Overview
Dependencies
Maintainers
8
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vingle/joi-to-json-schema - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

.idea/codeStyles/codeStyleConfig.xml

6

build/index.js

@@ -194,3 +194,3 @@ 'use strict';

schema.properties[property.key] = convert(property.schema);
if (property.schema._flags.presence === 'required') {
if (property.schema._flags.presence !== 'optional') {
schema.required = schema.required || [];

@@ -242,2 +242,6 @@ schema.required.push(property.key);

if (joi._examples && joi._examples.length === 1) {
schema.example = joi._examples[0];
}
// Add the label as a title if it exists

@@ -244,0 +248,0 @@ if (joi._settings && joi._settings.language && joi._settings.language.label) {

8

package.json
{
"name": "@vingle/joi-to-json-schema",
"version": "3.1.0",
"version": "3.2.0",
"description": "Joi -> JSON Schema Converter",

@@ -28,5 +28,5 @@ "main": "build/index.js",

{
"name" : "MooYeol Prescott Lee",
"email" : "mooyoul@gmail.com",
"url" : "https://github.com/mooyoul"
"name": "MooYeol Prescott Lee",
"email": "mooyoul@gmail.com",
"url": "https://github.com/mooyoul"
}

@@ -33,0 +33,0 @@ ],

@@ -186,3 +186,3 @@ import assert from 'assert';

schema.properties[property.key] = convert(property.schema);
if (property.schema._flags.presence === 'required') {
if (property.schema._flags.presence !== 'optional') {
schema.required = schema.required || [];

@@ -230,2 +230,6 @@ schema.required.push(property.key);

schema.examples = joi._examples;
}
if (joi._examples && joi._examples.length === 1) {
schema.example = joi._examples[0];
}

@@ -232,0 +236,0 @@

@@ -86,2 +86,3 @@ //@formatter:off

additionalProperties: false,
example: { key: 'value' },
examples: [{ key: 'value' }]

@@ -88,0 +89,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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