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

@hoth/typescript-to-json-schema

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoth/typescript-to-json-schema - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

25

lib/index.js

@@ -78,2 +78,12 @@ "use strict";

}
for (const key in element) {
if (ret.hasOwnProperty(key)) {
if (lodash_1.isPlainObject(element[key])) {
ret[key] = walk(element[key], id, schemas);
}
if (lodash_1.isArray(element[key]) && ['oneOf', 'anyOf', 'allOf', 'items'].includes(key)) {
ret[key] = element[key].map(e => lodash_1.isPlainObject(e) && walk(e, id, schemas));
}
}
}
if (element.anyOf && mergeAnyOf) {

@@ -95,16 +105,7 @@ ret = mergeSchema(lodash_1.omit(ret, 'anyOf'), walk(element.anyOf[0], id, schemas));

const allOfArray = [...ret.allOf];
for (const item of allOfArray) {
ret = mergeSchema(ret, walk(item, id, schemas));
}
ret = lodash_1.omit(ret, 'allOf');
}
}
for (const key in element) {
if (ret.hasOwnProperty(key)) {
if (lodash_1.isPlainObject(element[key])) {
ret[key] = walk(element[key], id, schemas);
for (let item of allOfArray) {
item = walk(item, id, schemas);
ret = mergeSchema(ret, item);
}
if (lodash_1.isArray(element[key]) && ['oneOf', 'anyOf', 'allOf', 'items'].includes(key)) {
ret[key] = element[key].map(e => lodash_1.isPlainObject(e) && walk(e, id, schemas));
}
}

@@ -111,0 +112,0 @@ }

{
"name": "@hoth/typescript-to-json-schema",
"version": "1.0.12",
"version": "1.0.13",
"description": "typescript to json-schema transpiler",

@@ -5,0 +5,0 @@ "keywords": [

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