@tsed/schema 6.102.7 → 6.102.8-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/package.json +3 -0
- package/lib/esm/components/anyMapper.js +4 -4
- package/lib/esm/components/classMapper.js +4 -4
- package/lib/esm/components/genericsMapper.js +4 -4
- package/lib/esm/components/index.js +11 -11
- package/lib/esm/components/inheritedClassMapper.js +2 -2
- package/lib/esm/components/itemMapper.js +1 -1
- package/lib/esm/components/lazyRefMapper.js +3 -3
- package/lib/esm/components/mapMapper.js +2 -2
- package/lib/esm/components/objectMapper.js +3 -3
- package/lib/esm/components/ofMapper.js +1 -1
- package/lib/esm/components/propertiesMapper.js +1 -1
- package/lib/esm/components/schemaMapper.js +6 -6
- package/lib/esm/decorators/class/children.js +1 -1
- package/lib/esm/decorators/collections/collectionContains.js +1 -1
- package/lib/esm/decorators/collections/collectionOf.js +1 -1
- package/lib/esm/decorators/collections/maxItems.js +1 -1
- package/lib/esm/decorators/collections/maxProperties.js +1 -1
- package/lib/esm/decorators/collections/minItems.js +1 -1
- package/lib/esm/decorators/collections/minProperties.js +1 -1
- package/lib/esm/decorators/collections/uniqueItems.js +1 -1
- package/lib/esm/decorators/common/additionalProperties.js +1 -1
- package/lib/esm/decorators/common/allOf.js +1 -1
- package/lib/esm/decorators/common/allow.js +2 -2
- package/lib/esm/decorators/common/any.js +1 -1
- package/lib/esm/decorators/common/anyOf.js +1 -1
- package/lib/esm/decorators/common/const.js +1 -1
- package/lib/esm/decorators/common/customKey.js +1 -1
- package/lib/esm/decorators/common/default.js +1 -1
- package/lib/esm/decorators/common/description.js +1 -1
- package/lib/esm/decorators/common/enum.js +1 -1
- package/lib/esm/decorators/common/example.js +1 -1
- package/lib/esm/decorators/common/examples.js +1 -1
- package/lib/esm/decorators/common/exclusiveMaximum.js +1 -1
- package/lib/esm/decorators/common/exclusiveMinimum.js +1 -1
- package/lib/esm/decorators/common/format.js +2 -2
- package/lib/esm/decorators/common/forwardGroups.js +1 -1
- package/lib/esm/decorators/common/groups.js +2 -2
- package/lib/esm/decorators/common/ignore.js +1 -1
- package/lib/esm/decorators/common/integer.js +1 -1
- package/lib/esm/decorators/common/jsonEntityFn.js +1 -1
- package/lib/esm/decorators/common/maxLength.js +1 -1
- package/lib/esm/decorators/common/maximum.js +1 -1
- package/lib/esm/decorators/common/minLength.js +1 -1
- package/lib/esm/decorators/common/minimum.js +1 -1
- package/lib/esm/decorators/common/multipleOf.js +1 -1
- package/lib/esm/decorators/common/name.js +1 -1
- package/lib/esm/decorators/common/nullable.js +2 -2
- package/lib/esm/decorators/common/oneOf.js +1 -1
- package/lib/esm/decorators/common/optional.js +1 -1
- package/lib/esm/decorators/common/pattern.js +1 -1
- package/lib/esm/decorators/common/property.js +1 -1
- package/lib/esm/decorators/common/readOnly.js +1 -1
- package/lib/esm/decorators/common/required.js +2 -2
- package/lib/esm/decorators/common/requiredGroups.js +2 -2
- package/lib/esm/decorators/common/schema.js +1 -1
- package/lib/esm/decorators/common/title.js +1 -1
- package/lib/esm/decorators/common/writeOnly.js +1 -1
- package/lib/esm/decorators/config/jsonEntityComponent.js +1 -1
- package/lib/esm/decorators/generics/genericOf.js +2 -2
- package/lib/esm/decorators/generics/generics.js +1 -1
- package/lib/esm/decorators/index.js +70 -70
- package/lib/esm/decorators/operations/acceptMime.js +1 -1
- package/lib/esm/decorators/operations/consumes.js +1 -1
- package/lib/esm/decorators/operations/contentType.js +1 -1
- package/lib/esm/decorators/operations/deprecated.js +1 -1
- package/lib/esm/decorators/operations/header.js +1 -1
- package/lib/esm/decorators/operations/in.js +1 -1
- package/lib/esm/decorators/operations/inFile.js +5 -5
- package/lib/esm/decorators/operations/location.js +1 -1
- package/lib/esm/decorators/operations/operationId.js +1 -1
- package/lib/esm/decorators/operations/operationPath.js +1 -1
- package/lib/esm/decorators/operations/partial.js +1 -1
- package/lib/esm/decorators/operations/path.js +1 -1
- package/lib/esm/decorators/operations/produces.js +1 -1
- package/lib/esm/decorators/operations/redirect.js +2 -2
- package/lib/esm/decorators/operations/returns.js +8 -8
- package/lib/esm/decorators/operations/route.js +3 -3
- package/lib/esm/decorators/operations/security.js +1 -1
- package/lib/esm/decorators/operations/status.js +1 -1
- package/lib/esm/decorators/operations/summary.js +1 -1
- package/lib/esm/decorators/operations/tags.js +1 -1
- package/lib/esm/domain/DecoratorContext.js +1 -1
- package/lib/esm/domain/JsonClassStore.js +3 -3
- package/lib/esm/domain/JsonLazyRef.js +2 -2
- package/lib/esm/domain/JsonMap.js +1 -1
- package/lib/esm/domain/JsonMethodStore.js +4 -4
- package/lib/esm/domain/JsonOperation.js +8 -8
- package/lib/esm/domain/JsonOperationPathsMap.js +1 -1
- package/lib/esm/domain/JsonOperationRoute.js +1 -1
- package/lib/esm/domain/JsonParameter.js +6 -6
- package/lib/esm/domain/JsonParameterStore.js +4 -4
- package/lib/esm/domain/JsonPropertyStore.js +3 -3
- package/lib/esm/domain/JsonRequestBody.js +2 -2
- package/lib/esm/domain/JsonResponse.js +4 -4
- package/lib/esm/domain/JsonSchema.js +6 -6
- package/lib/esm/domain/index.js +16 -16
- package/lib/esm/index.js +20 -20
- package/lib/esm/interfaces/index.js +4 -4
- package/lib/esm/package.json +3 -0
- package/lib/esm/utils/from.js +4 -4
- package/lib/esm/utils/getInheritedStores.js +1 -1
- package/lib/esm/utils/getJsonEntityStore.js +5 -5
- package/lib/esm/utils/getJsonSchema.js +4 -4
- package/lib/esm/utils/getOperationsRoutes.js +3 -3
- package/lib/esm/utils/getOperationsStores.js +4 -4
- package/lib/esm/utils/getPropertiesStores.js +3 -3
- package/lib/esm/utils/getRequiredProperties.js +1 -1
- package/lib/esm/utils/getSpec.js +6 -6
- package/lib/esm/utils/mapNullableType.js +1 -1
- package/lib/esm/utils/mapRouteOptions.js +1 -1
- package/lib/esm/utils/mergeOperation.js +3 -3
- package/lib/esm/utils/ref.js +1 -1
- package/lib/esm/utils/toJsonMapCollection.js +1 -1
- package/package.json +12 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { JsonLazyRef } from "../domain/JsonLazyRef";
|
|
2
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
3
|
-
import { mapGenericsOptions } from "../utils/generics";
|
|
4
|
-
import { toRef } from "../utils/ref";
|
|
1
|
+
import { JsonLazyRef } from "../domain/JsonLazyRef.js";
|
|
2
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
3
|
+
import { mapGenericsOptions } from "../utils/generics.js";
|
|
4
|
+
import { toRef } from "../utils/ref.js";
|
|
5
5
|
export function anyMapper(input, options = {}) {
|
|
6
6
|
if (typeof input !== "object" || input === null) {
|
|
7
7
|
return input;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { JsonEntityStore } from "../domain/JsonEntityStore";
|
|
2
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
3
|
-
import { mapGenericsOptions, popGenerics } from "../utils/generics";
|
|
4
|
-
import { createRef, createRefName } from "../utils/ref";
|
|
1
|
+
import { JsonEntityStore } from "../domain/JsonEntityStore.js";
|
|
2
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
3
|
+
import { mapGenericsOptions, popGenerics } from "../utils/generics.js";
|
|
4
|
+
import { createRef, createRefName } from "../utils/ref.js";
|
|
5
5
|
export function classMapper(value, options) {
|
|
6
6
|
const store = JsonEntityStore.from(value.class);
|
|
7
7
|
const name = createRefName(store.schema.getName() || value.getName(), options);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isClass, isPrimitiveClass } from "@tsed/core";
|
|
2
|
-
import { JsonEntityStore } from "../domain/JsonEntityStore";
|
|
3
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
4
|
-
import { popGenerics } from "../utils/generics";
|
|
5
|
-
import { getJsonType } from "../utils/getJsonType";
|
|
2
|
+
import { JsonEntityStore } from "../domain/JsonEntityStore.js";
|
|
3
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
4
|
+
import { popGenerics } from "../utils/generics.js";
|
|
5
|
+
import { getJsonType } from "../utils/getJsonType.js";
|
|
6
6
|
/**
|
|
7
7
|
* @ignore
|
|
8
8
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from "./anyMapper";
|
|
2
|
-
export * from "./classMapper";
|
|
3
|
-
export * from "./genericsMapper";
|
|
4
|
-
export * from "./inheritedClassMapper";
|
|
5
|
-
export * from "./itemMapper";
|
|
6
|
-
export * from "./lazyRefMapper";
|
|
7
|
-
export * from "./mapMapper";
|
|
8
|
-
export * from "./objectMapper";
|
|
9
|
-
export * from "./schemaMapper";
|
|
10
|
-
export * from "./ofMapper";
|
|
11
|
-
export * from "./propertiesMapper";
|
|
1
|
+
export * from "./anyMapper.js";
|
|
2
|
+
export * from "./classMapper.js";
|
|
3
|
+
export * from "./genericsMapper.js";
|
|
4
|
+
export * from "./inheritedClassMapper.js";
|
|
5
|
+
export * from "./itemMapper.js";
|
|
6
|
+
export * from "./lazyRefMapper.js";
|
|
7
|
+
export * from "./mapMapper.js";
|
|
8
|
+
export * from "./objectMapper.js";
|
|
9
|
+
export * from "./schemaMapper.js";
|
|
10
|
+
export * from "./ofMapper.js";
|
|
11
|
+
export * from "./propertiesMapper.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { classOf, deepMerge } from "@tsed/core";
|
|
2
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
3
|
-
import { getInheritedStores } from "../utils/getInheritedStores";
|
|
2
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
3
|
+
import { getInheritedStores } from "../utils/getInheritedStores.js";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
1
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
2
2
|
export function itemMapper(value, options) {
|
|
3
3
|
return value && value.isClass ? execMapper("class", value, options) : execMapper("any", value, options);
|
|
4
4
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
2
|
-
import { mapGenericsOptions } from "../utils/generics";
|
|
3
|
-
import { createRef, toRef } from "../utils/ref";
|
|
1
|
+
import { registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
2
|
+
import { mapGenericsOptions } from "../utils/generics.js";
|
|
3
|
+
import { createRef, toRef } from "../utils/ref.js";
|
|
4
4
|
export function lazyRefMapper(input, options) {
|
|
5
5
|
var _a;
|
|
6
6
|
const name = input.name;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mapGenericsOptions } from "../utils/generics";
|
|
2
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
1
|
+
import { mapGenericsOptions } from "../utils/generics.js";
|
|
2
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
3
3
|
/**
|
|
4
4
|
* Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.
|
|
5
5
|
* @param input
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isArray } from "@tsed/core";
|
|
2
|
-
import { alterIgnore } from "../hooks/alterIgnore";
|
|
3
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
4
|
-
import { mapNullableType } from "../utils/mapNullableType";
|
|
2
|
+
import { alterIgnore } from "../hooks/alterIgnore.js";
|
|
3
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
4
|
+
import { mapNullableType } from "../utils/mapNullableType.js";
|
|
5
5
|
/**
|
|
6
6
|
* Serialize Any object to a json schema
|
|
7
7
|
* @param input
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
1
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
2
2
|
export function ofMapper(input, options, parent) {
|
|
3
3
|
return input.map((value) => {
|
|
4
4
|
return execMapper("item", value, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
1
|
+
import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
2
2
|
export function propertiesMapper(input, options, parent) {
|
|
3
3
|
if (input.isClass) {
|
|
4
4
|
return execMapper("class", input, options);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isObject } from "@tsed/core";
|
|
2
|
-
import { mapAliasedProperties } from "../domain/JsonAliasMap";
|
|
3
|
-
import { SpecTypes } from "../domain/SpecTypes";
|
|
4
|
-
import { execMapper, hasMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
|
|
5
|
-
import { getRequiredProperties } from "../utils/getRequiredProperties";
|
|
6
|
-
import { alterOneOf } from "../hooks/alterOneOf";
|
|
7
|
-
import { mapNullableType } from "../utils/mapNullableType";
|
|
2
|
+
import { mapAliasedProperties } from "../domain/JsonAliasMap.js";
|
|
3
|
+
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
4
|
+
import { execMapper, hasMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
5
|
+
import { getRequiredProperties } from "../utils/getRequiredProperties.js";
|
|
6
|
+
import { alterOneOf } from "../hooks/alterOneOf.js";
|
|
7
|
+
import { mapNullableType } from "../utils/mapNullableType.js";
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
10
10
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonEntityFn } from "../common/jsonEntityFn";
|
|
1
|
+
import { JsonEntityFn } from "../common/jsonEntityFn.js";
|
|
2
2
|
/**
|
|
3
3
|
* If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.
|
|
4
4
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DecoratorTypes, isClass, useDecorators } from "@tsed/core";
|
|
2
|
-
import { JsonEntityFn } from "./jsonEntityFn";
|
|
3
|
-
import { Property } from "./property";
|
|
2
|
+
import { JsonEntityFn } from "./jsonEntityFn.js";
|
|
3
|
+
import { Property } from "./property.js";
|
|
4
4
|
/**
|
|
5
5
|
* Add allowed values when the property or parameters is required.
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonFormatTypes } from "../../domain/JsonFormatTypes";
|
|
2
|
-
import { JsonEntityFn } from "./jsonEntityFn";
|
|
1
|
+
import { JsonFormatTypes } from "../../domain/JsonFormatTypes.js";
|
|
2
|
+
import { JsonEntityFn } from "./jsonEntityFn.js";
|
|
3
3
|
/**
|
|
4
4
|
* The following formats are supported for string validation with `format` keyword:
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DecoratorTypes } from "@tsed/core";
|
|
2
|
-
import { matchGroups } from "../../utils/matchGroups";
|
|
3
|
-
import { JsonEntityFn } from "./jsonEntityFn";
|
|
2
|
+
import { matchGroups } from "../../utils/matchGroups.js";
|
|
3
|
+
import { JsonEntityFn } from "./jsonEntityFn.js";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonEntityFn } from "./jsonEntityFn";
|
|
1
|
+
import { JsonEntityFn } from "./jsonEntityFn.js";
|
|
2
2
|
/**
|
|
3
3
|
* The pattern and Pattern Properties keywords use regular expressions to express constraints.
|
|
4
4
|
* The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { matchGroups } from "../../utils/matchGroups";
|
|
2
|
-
import { JsonEntityFn } from "./jsonEntityFn";
|
|
1
|
+
import { matchGroups } from "../../utils/matchGroups.js";
|
|
2
|
+
import { JsonEntityFn } from "./jsonEntityFn.js";
|
|
3
3
|
/**
|
|
4
4
|
* Apply groups validation strategy for required property.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isObject } from "@tsed/core";
|
|
2
|
-
import { JsonEntityStore } from "../../domain/JsonEntityStore";
|
|
3
|
-
import { string } from "../../utils/from";
|
|
2
|
+
import { JsonEntityStore } from "../../domain/JsonEntityStore.js";
|
|
3
|
+
import { string } from "../../utils/from.js";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|