@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
package/lib/esm/utils/from.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isClass } from "@tsed/core";
|
|
2
|
-
import { JsonEntityStore, JsonFormatTypes } from "../domain";
|
|
3
|
-
import { JsonLazyRef } from "../domain/JsonLazyRef";
|
|
4
|
-
import { JsonSchema } from "../domain/JsonSchema";
|
|
5
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
2
|
+
import { JsonEntityStore, JsonFormatTypes } from "../domain.js";
|
|
3
|
+
import { JsonLazyRef } from "../domain/JsonLazyRef.js";
|
|
4
|
+
import { JsonSchema } from "../domain/JsonSchema.js";
|
|
5
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
6
6
|
/**
|
|
7
7
|
* Create a new model from the given type.
|
|
8
8
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DecoratorTypes } from "@tsed/core";
|
|
2
|
-
import { JsonEntitiesContainer, JsonEntityStore } from "../domain/JsonEntityStore";
|
|
3
|
-
import { JsonClassStore } from "../domain/JsonClassStore";
|
|
4
|
-
import { JsonPropertyStore } from "../domain/JsonPropertyStore";
|
|
5
|
-
import { JsonParameterStore } from "../domain/JsonParameterStore";
|
|
6
|
-
import { JsonMethodStore } from "../domain/JsonMethodStore";
|
|
2
|
+
import { JsonEntitiesContainer, JsonEntityStore } from "../domain/JsonEntityStore.js";
|
|
3
|
+
import { JsonClassStore } from "../domain/JsonClassStore.js";
|
|
4
|
+
import { JsonPropertyStore } from "../domain/JsonPropertyStore.js";
|
|
5
|
+
import { JsonParameterStore } from "../domain/JsonParameterStore.js";
|
|
6
|
+
import { JsonMethodStore } from "../domain/JsonMethodStore.js";
|
|
7
7
|
JsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);
|
|
8
8
|
JsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);
|
|
9
9
|
JsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../components";
|
|
2
|
-
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
|
-
import { execMapper } from "../registries/JsonSchemaMapperContainer";
|
|
4
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
1
|
+
import "../components.js";
|
|
2
|
+
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
3
|
+
import { execMapper } from "../registries/JsonSchemaMapperContainer.js";
|
|
4
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getOperationsStores } from "./getOperationsStores";
|
|
2
|
-
import { JsonOperationRoute } from "../domain/JsonOperationRoute";
|
|
3
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
1
|
+
import { getOperationsStores } from "./getOperationsStores.js";
|
|
2
|
+
import { JsonOperationRoute } from "../domain/JsonOperationRoute.js";
|
|
3
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
4
4
|
export function getOperationsRoutes(token, options = {}) {
|
|
5
5
|
const store = token.isStore ? token : getJsonEntityStore(token);
|
|
6
6
|
const basePath = ((options.basePath || "") + (store.path || "")).replace(/\/\//gi, "/");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { JsonMethodStore } from "../domain/JsonMethodStore";
|
|
2
|
-
import { JsonOperationPathsMap } from "../domain/JsonOperationPathsMap";
|
|
3
|
-
import { getInheritedStores } from "./getInheritedStores";
|
|
4
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
1
|
+
import { JsonMethodStore } from "../domain/JsonMethodStore.js";
|
|
2
|
+
import { JsonOperationPathsMap } from "../domain/JsonOperationPathsMap.js";
|
|
3
|
+
import { getInheritedStores } from "./getInheritedStores.js";
|
|
4
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
5
5
|
/**
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { alterIgnore } from "../hooks/alterIgnore";
|
|
2
|
-
import { getInheritedStores } from "./getInheritedStores";
|
|
3
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
1
|
+
import { alterIgnore } from "../hooks/alterIgnore.js";
|
|
2
|
+
import { getInheritedStores } from "./getInheritedStores.js";
|
|
3
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
4
4
|
/**
|
|
5
5
|
* Return the list of properties including properties from inherited classes
|
|
6
6
|
* @param target
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uniq } from "@tsed/core";
|
|
2
|
-
import { alterRequiredGroups } from "../hooks/alterRequiredGroups";
|
|
2
|
+
import { alterRequiredGroups } from "../hooks/alterRequiredGroups.js";
|
|
3
3
|
function applyStringRule(obj, propSchema) {
|
|
4
4
|
if (!(propSchema === null || propSchema === void 0 ? void 0 : propSchema.$allow.includes(""))) {
|
|
5
5
|
if ([].concat(propSchema === null || propSchema === void 0 ? void 0 : propSchema.get("type")).includes("string")) {
|
package/lib/esm/utils/getSpec.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cleanObject, uniqBy } from "@tsed/core";
|
|
2
|
-
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
|
-
import { buildPath } from "./buildPath";
|
|
4
|
-
import { getJsonEntityStore } from "./getJsonEntityStore";
|
|
5
|
-
import { getOperationsStores } from "./getOperationsStores";
|
|
6
|
-
import { mergeOperation } from "./mergeOperation";
|
|
7
|
-
import { operationIdFormatter } from "./operationIdFormatter";
|
|
2
|
+
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
3
|
+
import { buildPath } from "./buildPath.js";
|
|
4
|
+
import { getJsonEntityStore } from "./getJsonEntityStore.js";
|
|
5
|
+
import { getOperationsStores } from "./getOperationsStores.js";
|
|
6
|
+
import { mergeOperation } from "./mergeOperation.js";
|
|
7
|
+
import { operationIdFormatter } from "./operationIdFormatter.js";
|
|
8
8
|
/**
|
|
9
9
|
* @ignore
|
|
10
10
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SpecTypes } from "../domain/SpecTypes";
|
|
2
|
-
import { concatParameters } from "./concatParameters";
|
|
3
|
-
import { getJsonPathParameters } from "./getJsonPathParameters";
|
|
1
|
+
import { SpecTypes } from "../domain/SpecTypes.js";
|
|
2
|
+
import { concatParameters } from "./concatParameters.js";
|
|
3
|
+
import { getJsonPathParameters } from "./getJsonPathParameters.js";
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
*/
|
package/lib/esm/utils/ref.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/schema",
|
|
3
|
-
"version": "6.102.
|
|
3
|
+
"version": "6.102.8-rc.1",
|
|
4
4
|
"description": "JsonSchema module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
8
9
|
"typings": "./lib/types/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
"types": "./lib/types/index.d.ts",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"tsed"
|
|
30
31
|
],
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@tsed/openspec": "6.102.
|
|
33
|
+
"@tsed/openspec": "6.102.8-rc.1",
|
|
33
34
|
"camel-case": "4.1.2",
|
|
34
35
|
"json-schema": "0.4.0",
|
|
35
36
|
"micromatch": "4.0.4",
|
|
@@ -39,8 +40,8 @@
|
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@apidevtools/swagger-parser": "10.0.2",
|
|
42
|
-
"@tsed/core": "6.102.
|
|
43
|
-
"@tsed/openspec": "6.102.
|
|
43
|
+
"@tsed/core": "6.102.8-rc.1",
|
|
44
|
+
"@tsed/openspec": "6.102.8-rc.1",
|
|
44
45
|
"@types/fs-extra": "9.0.6",
|
|
45
46
|
"@types/json-schema": "7.0.7",
|
|
46
47
|
"@types/micromatch": "4.0.1",
|
|
@@ -48,13 +49,18 @@
|
|
|
48
49
|
"fs-extra": "9.0.1"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
|
-
"@tsed/core": "^6.102.
|
|
52
|
+
"@tsed/core": "^6.102.8-rc.1"
|
|
53
|
+
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"@tsed/code": {
|
|
56
|
+
"optional": false
|
|
57
|
+
}
|
|
52
58
|
},
|
|
53
59
|
"repository": "https://github.com/tsedio/tsed",
|
|
54
60
|
"bugs": {
|
|
55
61
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
56
62
|
},
|
|
57
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
63
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/specs/schema",
|
|
58
64
|
"author": "Romain Lenzotti",
|
|
59
65
|
"license": "MIT"
|
|
60
66
|
}
|