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

@tsed/schema

Package Overview
Dependencies
Maintainers
5
Versions
842
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsed/schema - npm Package Compare versions

Comparing version 6.0.0-beta.14 to 6.0.0-beta.15

lib/decorators/operations/contentType.d.ts

6

lib/decorators/common/ignore.d.ts
import { IgnoreCallback } from "../../interfaces";
/**
* Disable serialization for this property when the Converters service will render the JSON object.
* Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.
*
* ::: tip
* This decorator is used by the Converters to serialize correctly your model.
* :::
*
* ::: warning

@@ -10,0 +6,0 @@ * Swagger will not generate documentation for the ignored property.

@@ -6,8 +6,4 @@ "use strict";

/**
* Disable serialization for this property when the Converters service will render the JSON object.
* Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.
*
* ::: tip
* This decorator is used by the Converters to serialize correctly your model.
* :::
*
* ::: warning

@@ -14,0 +10,0 @@ * Swagger will not generate documentation for the ignored property.

@@ -12,2 +12,3 @@ export * from "./collections/collectionContains";

export * from "./operations/consumes";
export * from "./operations/contentType";
export * from "./operations/in";

@@ -19,2 +20,4 @@ export * from "./operations/operationId";

export * from "./operations/returns";
export * from "./operations/status";
export * from "./operations/header";
export * from "./operations/security";

@@ -21,0 +24,0 @@ export * from "./operations/tags";

@@ -18,2 +18,3 @@ "use strict";

tslib_1.__exportStar(require("./operations/consumes"), exports);
tslib_1.__exportStar(require("./operations/contentType"), exports);
tslib_1.__exportStar(require("./operations/in"), exports);

@@ -25,2 +26,4 @@ tslib_1.__exportStar(require("./operations/operationId"), exports);

tslib_1.__exportStar(require("./operations/returns"), exports);
tslib_1.__exportStar(require("./operations/status"), exports);
tslib_1.__exportStar(require("./operations/header"), exports);
tslib_1.__exportStar(require("./operations/security"), exports);

@@ -27,0 +30,0 @@ tslib_1.__exportStar(require("./operations/tags"), exports);

import { Hooks } from "@tsed/core";
/**
* @ignore
* @param schema
* @param options
*/
export declare function alterIgnore(schema: {
$hooks: Hooks;
}, options: any): any;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.alterIgnore = void 0;
/**
* @ignore
* @param schema
* @param options
*/
function alterIgnore(schema, options) {

@@ -5,0 +10,0 @@ var _a;

@@ -6,4 +6,5 @@ import { OS3Header } from "@tsed/openspec";

[key: string]: number | string | (JsonHeader & {
type?: string;
value?: string | number;
});
}

@@ -6,2 +6,5 @@ import { Type } from "@tsed/core";

export declare type GenericsMap = Map<string, Type<any>>;
/**
* @ignore
*/
export interface GenericTypes {

@@ -11,2 +14,5 @@ genericTypes: Type<any>[];

}
/**
* @ignore
*/
export interface GenericLabels {

@@ -16,2 +22,5 @@ genericLabels: string[];

}
/**
* @ignore
*/
export interface NestedGenerics {

@@ -21,2 +30,5 @@ nestedGenerics: Type<any>[][];

}
/**
* @ignore
*/
export interface GenericsContext extends GenericTypes, GenericLabels, NestedGenerics {

@@ -23,0 +35,0 @@ generics: GenericsMap;

import { Type } from "@tsed/core";
/**
* @ignore
*/
export declare function getComputedType(target: any): Type<any>;

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

const core_1 = require("@tsed/core");
/**
* @ignore
*/
function getComputedType(target) {

@@ -7,0 +10,0 @@ if (core_1.isPromise(target)) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getJsonPathParameters = void 0;
/**
* @ignore
*/
function getVariable(subpath) {

@@ -5,0 +8,0 @@ const splited = subpath.split(".");

@@ -7,6 +7,15 @@ "use strict";

const serializeJsonSchema_1 = require("./serializeJsonSchema");
/**
* @ignore
*/
const CACHE_KEY = "$cache:schemes";
/**
* @ignore
*/
function getKey(options) {
return JSON.stringify(options);
}
/**
* @ignore
*/
function get(entity, options) {

@@ -13,0 +22,0 @@ const cache = entity.store.get(CACHE_KEY) || new Map();

/**
*
* @type {string[]}
* @ignore
*/
export declare const JSON_TYPES: string[];
export declare function getJsonType(value: any): string;

@@ -6,4 +6,3 @@ "use strict";

/**
*
* @type {string[]}
* @ignore
*/

@@ -10,0 +9,0 @@ exports.JSON_TYPES = ["string", "number", "integer", "boolean", "object", "array", "null", "any"];

@@ -11,3 +11,9 @@ "use strict";

const operationIdFormatter_1 = require("./operationIdFormatter");
/**
* @ignore
*/
const caches = new Map();
/**
* @ignore
*/
function get(model, options, cb) {

@@ -14,0 +20,0 @@ if (!caches.has(model)) {

@@ -1,1 +0,1 @@

export declare const isSuccessStatus: (code: string | number | undefined) => boolean;
export declare const isSuccessStatus: (code: string | number | undefined) => boolean | 0;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSuccessStatus = void 0;
exports.isSuccessStatus = (code) => !!(Number(code) && 200 <= Number(code) && Number(code) < 300);
exports.isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;
//# sourceMappingURL=isSuccessStatus.js.map

@@ -5,4 +5,4 @@ "use strict";

const core_1 = require("@tsed/core");
const JsonAliasMap_1 = require("../domain/JsonAliasMap");
const SpecTypes_1 = require("../domain/SpecTypes");
const JsonAliasMap_1 = require("../domain/JsonAliasMap");
const ignoreHook_1 = require("../hooks/ignoreHook");

@@ -12,9 +12,21 @@ const generics_1 = require("./generics");

const getJsonEntityStore_1 = require("./getJsonEntityStore");
/**
* @ignore
*/
const IGNORES = ["name", "$required", "$hooks", "_nestedGenerics"];
/**
* @ignore
*/
function isEmptyProperties(key, value) {
return typeof value === "object" && ["items", "properties", "additionalProperties"].includes(key) && Object.keys(value).length === 0;
}
/**
* @ignore
*/
function shouldMapAlias(key, value, useAlias) {
return typeof value === "object" && useAlias && ["properties", "additionalProperties"].includes(key);
}
/**
* @ignore
*/
function getRequired(schema, useAlias) {

@@ -21,0 +33,0 @@ return Array.from(schema.$required).map((key) => (useAlias ? schema.alias.get(key) || key : key));

{
"name": "@tsed/schema",
"version": "6.0.0-beta.14",
"version": "6.0.0-beta.15",
"description": "JsonSchema module for Ts.ED Framework",

@@ -18,4 +18,4 @@ "main": "./lib/index.js",

"dependencies": {
"@tsed/core": "6.0.0-beta.14",
"@tsed/openspec": "6.0.0-beta.14",
"@tsed/core": "6.0.0-beta.15",
"@tsed/openspec": "6.0.0-beta.15",
"change-case": "4.1.1",

@@ -22,0 +22,0 @@ "tslib": "2.0.1"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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