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

@tsoa/runtime

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsoa/runtime - npm Package Compare versions

Comparing version 3.5.0 to 3.5.2

13

dist/routeGeneration/templateHelpers.d.ts

@@ -24,2 +24,15 @@ /// <reference types="node" />

private toModelLike;
/**
* combine all schemas once without backwards combinations ie
* input: [[value1], [value2]] should be [[value1, value2]]
* not [[value1, value2],[value2, value1]]
* and
* input: [[value1], [value2], [value3]] should be [
* [value1, value2, value3],
* [value1, value2],
* [value1, value3],
* [value2, value3]
* ]
* @param modelSchemass
*/
private selfIntersectionExcludingCombinations;

@@ -26,0 +39,0 @@ private intersectRefObjectModelSchemas;

26

dist/routeGeneration/templateHelpers.js

@@ -572,2 +572,5 @@ "use strict";

var schemasWithRequiredProps = schemas.filter(function (schema) { return Object.keys(getRequiredPropError(schema)).length === 0; });
if (swaggerConfig.noImplicitAdditionalProperties === 'ignore') {
return __assign(__assign({}, value), cleanValues);
}
if (swaggerConfig.noImplicitAdditionalProperties === 'silently-remove-extras') {

@@ -586,3 +589,3 @@ if (schemasWithRequiredProps.length > 0) {

if (schemasWithRequiredProps.length > 0 && schemasWithRequiredProps.some(function (schema) { return _this.getExcessPropertiesFor(schema, Object.keys(value), swaggerConfig).length === 0; })) {
return value;
return cleanValues;
}

@@ -630,7 +633,26 @@ else {

};
/**
* combine all schemas once without backwards combinations ie
* input: [[value1], [value2]] should be [[value1, value2]]
* not [[value1, value2],[value2, value1]]
* and
* input: [[value1], [value2], [value3]] should be [
* [value1, value2, value3],
* [value1, value2],
* [value1, value3],
* [value2, value3]
* ]
* @param modelSchemass
*/
ValidationService.prototype.selfIntersectionExcludingCombinations = function (modelSchemass) {
var res = [];
for (var outerIndex = 0; outerIndex < modelSchemass.length; outerIndex++) {
var currentCollector = __assign({}, modelSchemass[outerIndex][0]);
for (var innerIndex = outerIndex + 1; innerIndex < modelSchemass.length; innerIndex++) {
res.push.apply(res, __spread(this.intersectRefObjectModelSchemas(modelSchemass[outerIndex], modelSchemass[innerIndex])));
currentCollector = __assign({}, this.intersectRefObjectModelSchemas([currentCollector], modelSchemass[innerIndex])[0]);
if (innerIndex - outerIndex > 1) {
res.push(currentCollector);
}
var currentCombination = this.intersectRefObjectModelSchemas(modelSchemass[outerIndex], modelSchemass[innerIndex]);
res.push.apply(res, __spread(currentCombination));
}

@@ -637,0 +659,0 @@ }

4

package.json
{
"name": "@tsoa/runtime",
"description": "Build swagger-compliant REST APIs using TypeScript and Node",
"version": "3.5.0",
"version": "3.5.2",
"main": "./dist/index.js",

@@ -47,3 +47,3 @@ "typings": "./dist/index.d.ts",

},
"gitHead": "337b85817ce61be53cea98e3d0c3db96166d01bd"
"gitHead": "460ba82e3d4b07581bd1337feb38e656bff6d7c2"
}

@@ -542,2 +542,6 @@ import * as moment from 'moment';

if (swaggerConfig.noImplicitAdditionalProperties === 'ignore') {
return { ...value, ...cleanValues };
}
if (swaggerConfig.noImplicitAdditionalProperties === 'silently-remove-extras') {

@@ -556,3 +560,3 @@ if (schemasWithRequiredProps.length > 0) {

if (schemasWithRequiredProps.length > 0 && schemasWithRequiredProps.some(schema => this.getExcessPropertiesFor(schema, Object.keys(value), swaggerConfig).length === 0)) {
return value;
return cleanValues;
} else {

@@ -594,8 +598,27 @@ fieldErrors[parent + name] = {

private selfIntersectionExcludingCombinations(modelSchemass: TsoaRoute.RefObjectModelSchema[][]) {
/**
* combine all schemas once without backwards combinations ie
* input: [[value1], [value2]] should be [[value1, value2]]
* not [[value1, value2],[value2, value1]]
* and
* input: [[value1], [value2], [value3]] should be [
* [value1, value2, value3],
* [value1, value2],
* [value1, value3],
* [value2, value3]
* ]
* @param modelSchemass
*/
private selfIntersectionExcludingCombinations(modelSchemass: TsoaRoute.RefObjectModelSchema[][]): TsoaRoute.RefObjectModelSchema[] {
const res: TsoaRoute.RefObjectModelSchema[] = [];
for (let outerIndex = 0; outerIndex < modelSchemass.length; outerIndex++) {
let currentCollector = { ...modelSchemass[outerIndex][0] };
for (let innerIndex = outerIndex + 1; innerIndex < modelSchemass.length; innerIndex++) {
res.push(...this.intersectRefObjectModelSchemas(modelSchemass[outerIndex], modelSchemass[innerIndex]));
currentCollector = { ...this.intersectRefObjectModelSchemas([currentCollector], modelSchemass[innerIndex])[0] };
if (innerIndex - outerIndex > 1) {
res.push(currentCollector);
}
const currentCombination = this.intersectRefObjectModelSchemas(modelSchemass[outerIndex], modelSchemass[innerIndex]);
res.push(...currentCombination);
}

@@ -602,0 +625,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