@tsed/schema 7.0.0-beta.2 → 7.0.0-beta.20
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/coverage.json +6 -0
- package/jest.config.js +1 -6
- package/lib/cjs/components/lazyRefMapper.js +1 -2
- package/lib/cjs/components/lazyRefMapper.js.map +1 -1
- package/lib/cjs/components/objectMapper.js +1 -1
- package/lib/cjs/components/objectMapper.js.map +1 -1
- package/lib/cjs/components/schemaMapper.js +1 -1
- package/lib/cjs/components/schemaMapper.js.map +1 -1
- package/lib/cjs/constants/httpStatusMessages.js +14 -100
- package/lib/cjs/constants/httpStatusMessages.js.map +1 -1
- package/lib/cjs/decorators/collections/collectionOf.js +3 -4
- package/lib/cjs/decorators/collections/collectionOf.js.map +1 -1
- package/lib/cjs/decorators/common/anyOf.js +4 -0
- package/lib/cjs/decorators/common/anyOf.js.map +1 -1
- package/lib/cjs/decorators/common/description.js +1 -2
- package/lib/cjs/decorators/common/description.js.map +1 -1
- package/lib/cjs/decorators/common/enum.js +1 -20
- package/lib/cjs/decorators/common/enum.js.map +1 -1
- package/lib/cjs/decorators/common/ignore.js.map +1 -1
- package/lib/cjs/decorators/common/jsonEntityFn.js.map +1 -1
- package/lib/cjs/decorators/common/oneOf.js +4 -0
- package/lib/cjs/decorators/common/oneOf.js.map +1 -1
- package/lib/cjs/decorators/common/recordOf.js +63 -0
- package/lib/cjs/decorators/common/recordOf.js.map +1 -0
- package/lib/cjs/decorators/operations/acceptMime.js +28 -0
- package/lib/cjs/decorators/operations/acceptMime.js.map +1 -0
- package/lib/cjs/decorators/operations/in.js +6 -4
- package/lib/cjs/decorators/operations/in.js.map +1 -1
- package/lib/cjs/decorators/operations/redirect.js +1 -2
- package/lib/cjs/decorators/operations/redirect.js.map +1 -1
- package/lib/cjs/decorators/operations/returns.js +43 -21
- package/lib/cjs/decorators/operations/returns.js.map +1 -1
- package/lib/cjs/decorators/operations/route.js +1 -4
- package/lib/cjs/decorators/operations/route.js.map +1 -1
- package/lib/cjs/decorators/operations/view.js +31 -0
- package/lib/cjs/decorators/operations/view.js.map +1 -0
- package/lib/cjs/domain/DecoratorContext.js +6 -3
- package/lib/cjs/domain/DecoratorContext.js.map +1 -1
- package/lib/cjs/domain/JsonClassStore.js +5 -8
- package/lib/cjs/domain/JsonClassStore.js.map +1 -1
- package/lib/cjs/domain/JsonEntityStore.js +40 -1
- package/lib/cjs/domain/JsonEntityStore.js.map +1 -1
- package/lib/cjs/domain/JsonLazyRef.js +2 -1
- package/lib/cjs/domain/JsonLazyRef.js.map +1 -1
- package/lib/cjs/domain/JsonMap.js.map +1 -1
- package/lib/cjs/domain/JsonMethodStore.js +85 -39
- package/lib/cjs/domain/JsonMethodStore.js.map +1 -1
- package/lib/cjs/domain/JsonOperation.js +15 -34
- package/lib/cjs/domain/JsonOperation.js.map +1 -1
- package/lib/cjs/domain/JsonOperationPathsMap.js +2 -16
- package/lib/cjs/domain/JsonOperationPathsMap.js.map +1 -1
- package/lib/cjs/domain/JsonOperationRoute.js +11 -8
- package/lib/cjs/domain/JsonOperationRoute.js.map +1 -1
- package/lib/cjs/domain/JsonParameter.js +42 -48
- package/lib/cjs/domain/JsonParameter.js.map +1 -1
- package/lib/cjs/domain/JsonParameterStore.js +26 -10
- package/lib/cjs/domain/JsonParameterStore.js.map +1 -1
- package/lib/cjs/domain/JsonPropertyStore.js +7 -6
- package/lib/cjs/domain/JsonPropertyStore.js.map +1 -1
- package/lib/cjs/domain/JsonResponse.js +7 -18
- package/lib/cjs/domain/JsonResponse.js.map +1 -1
- package/lib/cjs/domain/JsonSchema.js +62 -71
- package/lib/cjs/domain/JsonSchema.js.map +1 -1
- package/lib/cjs/domain/SpecTypes.js +1 -0
- package/lib/cjs/domain/SpecTypes.js.map +1 -1
- package/lib/cjs/hooks/alterIgnore.js +2 -3
- package/lib/cjs/hooks/alterIgnore.js.map +1 -1
- package/lib/cjs/hooks/alterRequiredGroups.js +1 -2
- package/lib/cjs/hooks/alterRequiredGroups.js.map +1 -1
- package/lib/cjs/index.js +150 -20
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces/JsonSchemaOptions.js.map +1 -1
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/utils/concatPath.js +16 -1
- package/lib/cjs/utils/concatPath.js.map +1 -1
- package/lib/cjs/utils/from.js +9 -8
- package/lib/cjs/utils/from.js.map +1 -1
- package/lib/cjs/utils/generateSpec.js +46 -0
- package/lib/cjs/utils/generateSpec.js.map +1 -0
- package/lib/cjs/utils/generics.js.map +1 -1
- package/lib/cjs/utils/getJsonPathParameters.js +20 -6
- package/lib/cjs/utils/getJsonPathParameters.js.map +1 -1
- package/lib/cjs/utils/getJsonSchema.js +12 -3
- package/lib/cjs/utils/getJsonSchema.js.map +1 -1
- package/lib/cjs/utils/getJsonType.js +1 -1
- package/lib/cjs/utils/getJsonType.js.map +1 -1
- package/lib/cjs/utils/getOperationsRoutes.js +2 -1
- package/lib/cjs/utils/getOperationsRoutes.js.map +1 -1
- package/lib/cjs/utils/getRequiredProperties.js +3 -3
- package/lib/cjs/utils/getRequiredProperties.js.map +1 -1
- package/lib/cjs/utils/getSpec.js +58 -43
- package/lib/cjs/utils/getSpec.js.map +1 -1
- package/lib/cjs/utils/getSpecType.js +21 -0
- package/lib/cjs/utils/getSpecType.js.map +1 -0
- package/lib/cjs/utils/mapNullableType.js +1 -1
- package/lib/cjs/utils/mapNullableType.js.map +1 -1
- package/lib/cjs/utils/mapOpenSpec.js +41 -0
- package/lib/cjs/utils/mapOpenSpec.js.map +1 -0
- package/lib/cjs/utils/mapOpenSpec2.js +34 -0
- package/lib/cjs/utils/mapOpenSpec2.js.map +1 -0
- package/lib/cjs/utils/mapOpenSpec3.js +26 -0
- package/lib/cjs/utils/mapOpenSpec3.js.map +1 -0
- package/lib/cjs/utils/mapOpenSpecInfo.js +21 -0
- package/lib/cjs/utils/mapOpenSpecInfo.js.map +1 -0
- package/lib/cjs/utils/matchGroups.js +1 -1
- package/lib/cjs/utils/matchGroups.js.map +1 -1
- package/lib/cjs/utils/mergeOperation.js +2 -2
- package/lib/cjs/utils/mergeOperation.js.map +1 -1
- package/lib/cjs/utils/mergeSpec.js.map +1 -1
- package/lib/cjs/utils/operationIdFormatter.js +3 -3
- package/lib/cjs/utils/operationIdFormatter.js.map +1 -1
- package/lib/cjs/utils/ref.js +2 -2
- package/lib/cjs/utils/ref.js.map +1 -1
- package/lib/cjs/utils/serializeEnumValues.js +26 -0
- package/lib/cjs/utils/serializeEnumValues.js.map +1 -0
- package/lib/cjs/utils/transformToOS2.js +510 -0
- package/lib/cjs/utils/transformToOS2.js.map +1 -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/inheritedClassMapper.js +2 -2
- package/lib/esm/components/itemMapper.js +1 -1
- package/lib/esm/components/lazyRefMapper.js +4 -5
- package/lib/esm/components/lazyRefMapper.js.map +1 -1
- package/lib/esm/components/mapMapper.js +2 -2
- package/lib/esm/components/objectMapper.js +4 -4
- package/lib/esm/components/objectMapper.js.map +1 -1
- package/lib/esm/components/ofMapper.js +1 -1
- package/lib/esm/components/propertiesMapper.js +1 -1
- package/lib/esm/components/schemaMapper.js +7 -7
- package/lib/esm/components/schemaMapper.js.map +1 -1
- package/lib/esm/constants/httpStatusMessages.js +13 -100
- package/lib/esm/constants/httpStatusMessages.js.map +1 -1
- 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 +4 -5
- package/lib/esm/decorators/collections/collectionOf.js.map +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 +5 -1
- package/lib/esm/decorators/common/anyOf.js.map +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 +2 -3
- package/lib/esm/decorators/common/description.js.map +1 -1
- package/lib/esm/decorators/common/enum.js +2 -21
- package/lib/esm/decorators/common/enum.js.map +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/ignore.js.map +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/jsonEntityFn.js.map +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 +5 -1
- package/lib/esm/decorators/common/oneOf.js.map +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/recordOf.js +59 -0
- package/lib/esm/decorators/common/recordOf.js.map +1 -0
- 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/operations/acceptMime.js +24 -0
- package/lib/esm/decorators/operations/acceptMime.js.map +1 -0
- 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 +3 -1
- package/lib/esm/decorators/operations/in.js.map +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 +3 -4
- package/lib/esm/decorators/operations/redirect.js.map +1 -1
- package/lib/esm/decorators/operations/returns.js +51 -29
- package/lib/esm/decorators/operations/returns.js.map +1 -1
- package/lib/esm/decorators/operations/route.js +4 -7
- package/lib/esm/decorators/operations/route.js.map +1 -1
- 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/decorators/operations/view.js +27 -0
- package/lib/esm/decorators/operations/view.js.map +1 -0
- package/lib/esm/domain/DecoratorContext.js +6 -3
- package/lib/esm/domain/DecoratorContext.js.map +1 -1
- package/lib/esm/domain/JsonClassStore.js +7 -10
- package/lib/esm/domain/JsonClassStore.js.map +1 -1
- package/lib/esm/domain/JsonEntityStore.js +40 -1
- package/lib/esm/domain/JsonEntityStore.js.map +1 -1
- package/lib/esm/domain/JsonLazyRef.js +4 -3
- package/lib/esm/domain/JsonLazyRef.js.map +1 -1
- package/lib/esm/domain/JsonMap.js +1 -1
- package/lib/esm/domain/JsonMap.js.map +1 -1
- package/lib/esm/domain/JsonMethodStore.js +86 -40
- package/lib/esm/domain/JsonMethodStore.js.map +1 -1
- package/lib/esm/domain/JsonOperation.js +22 -41
- package/lib/esm/domain/JsonOperation.js.map +1 -1
- package/lib/esm/domain/JsonOperationPathsMap.js +3 -17
- package/lib/esm/domain/JsonOperationPathsMap.js.map +1 -1
- package/lib/esm/domain/JsonOperationRoute.js +12 -9
- package/lib/esm/domain/JsonOperationRoute.js.map +1 -1
- package/lib/esm/domain/JsonParameter.js +46 -52
- package/lib/esm/domain/JsonParameter.js.map +1 -1
- package/lib/esm/domain/JsonParameterStore.js +29 -13
- package/lib/esm/domain/JsonParameterStore.js.map +1 -1
- package/lib/esm/domain/JsonPropertyStore.js +8 -7
- package/lib/esm/domain/JsonPropertyStore.js.map +1 -1
- package/lib/esm/domain/JsonRequestBody.js +2 -2
- package/lib/esm/domain/JsonResponse.js +10 -21
- package/lib/esm/domain/JsonResponse.js.map +1 -1
- package/lib/esm/domain/JsonSchema.js +67 -76
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/esm/domain/SpecTypes.js +1 -0
- package/lib/esm/domain/SpecTypes.js.map +1 -1
- package/lib/esm/hooks/alterIgnore.js +2 -3
- package/lib/esm/hooks/alterIgnore.js.map +1 -1
- package/lib/esm/hooks/alterRequiredGroups.js +1 -2
- package/lib/esm/hooks/alterRequiredGroups.js.map +1 -1
- package/lib/esm/index.js +150 -20
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/JsonSchemaOptions.js.map +1 -1
- package/lib/esm/package.json +3 -0
- package/lib/esm/utils/concatPath.js +16 -1
- package/lib/esm/utils/concatPath.js.map +1 -1
- package/lib/esm/utils/from.js +5 -4
- package/lib/esm/utils/from.js.map +1 -1
- package/lib/esm/utils/generateSpec.js +41 -0
- package/lib/esm/utils/generateSpec.js.map +1 -0
- package/lib/esm/utils/generics.js.map +1 -1
- package/lib/esm/utils/getInheritedStores.js +1 -1
- package/lib/esm/utils/getJsonEntityStore.js +5 -5
- package/lib/esm/utils/getJsonPathParameters.js +20 -6
- package/lib/esm/utils/getJsonPathParameters.js.map +1 -1
- package/lib/esm/utils/getJsonSchema.js +15 -6
- package/lib/esm/utils/getJsonSchema.js.map +1 -1
- package/lib/esm/utils/getJsonType.js +2 -2
- package/lib/esm/utils/getJsonType.js.map +1 -1
- package/lib/esm/utils/getOperationsRoutes.js +5 -4
- package/lib/esm/utils/getOperationsRoutes.js.map +1 -1
- package/lib/esm/utils/getOperationsStores.js +4 -4
- package/lib/esm/utils/getPropertiesStores.js +3 -3
- package/lib/esm/utils/getRequiredProperties.js +4 -4
- package/lib/esm/utils/getRequiredProperties.js.map +1 -1
- package/lib/esm/utils/getSpec.js +65 -50
- package/lib/esm/utils/getSpec.js.map +1 -1
- package/lib/esm/utils/getSpecType.js +16 -0
- package/lib/esm/utils/getSpecType.js.map +1 -0
- package/lib/esm/utils/mapNullableType.js +2 -2
- package/lib/esm/utils/mapNullableType.js.map +1 -1
- package/lib/esm/utils/mapOpenSpec.js +37 -0
- package/lib/esm/utils/mapOpenSpec.js.map +1 -0
- package/lib/esm/utils/mapOpenSpec2.js +30 -0
- package/lib/esm/utils/mapOpenSpec2.js.map +1 -0
- package/lib/esm/utils/mapOpenSpec3.js +22 -0
- package/lib/esm/utils/mapOpenSpec3.js.map +1 -0
- package/lib/esm/utils/mapOpenSpecInfo.js +17 -0
- package/lib/esm/utils/mapOpenSpecInfo.js.map +1 -0
- package/lib/esm/utils/mapRouteOptions.js +1 -1
- package/lib/esm/utils/mergeOperation.js +5 -5
- package/lib/esm/utils/mergeOperation.js.map +1 -1
- package/lib/esm/utils/mergeSpec.js.map +1 -1
- package/lib/esm/utils/operationIdFormatter.js +1 -1
- package/lib/esm/utils/operationIdFormatter.js.map +1 -1
- package/lib/esm/utils/ref.js +2 -2
- package/lib/esm/utils/ref.js.map +1 -1
- package/lib/esm/utils/serializeEnumValues.js +21 -0
- package/lib/esm/utils/serializeEnumValues.js.map +1 -0
- package/lib/esm/utils/toJsonMapCollection.js +1 -1
- package/lib/esm/utils/transformToOS2.js +504 -0
- package/lib/esm/utils/transformToOS2.js.map +1 -0
- package/lib/types/constants/httpStatusMessages.d.ts +2 -263
- package/lib/types/decorators/common/anyOf.d.ts +4 -0
- package/lib/types/decorators/common/ignore.d.ts +1 -1
- package/lib/types/decorators/common/jsonEntityFn.d.ts +1 -1
- package/lib/types/decorators/common/oneOf.d.ts +4 -0
- package/lib/types/decorators/common/recordOf.d.ts +46 -0
- package/lib/types/decorators/operations/acceptMime.d.ts +19 -0
- package/lib/types/decorators/operations/in.d.ts +1 -1
- package/lib/types/decorators/operations/returns.d.ts +7 -2
- package/lib/types/decorators/operations/view.d.ts +23 -0
- package/lib/types/domain/JsonEntityStore.d.ts +1 -0
- package/lib/types/domain/JsonMap.d.ts +1 -1
- package/lib/types/domain/JsonMethodStore.d.ts +56 -4
- package/lib/types/domain/JsonOperation.d.ts +2 -2
- package/lib/types/domain/JsonOperationPathsMap.d.ts +0 -2
- package/lib/types/domain/JsonOperationRoute.d.ts +7 -6
- package/lib/types/domain/JsonParameter.d.ts +2 -1
- package/lib/types/domain/JsonParameterStore.d.ts +23 -1
- package/lib/types/domain/JsonPropertyStore.d.ts +7 -0
- package/lib/types/domain/JsonResponse.d.ts +3 -1
- package/lib/types/domain/JsonSchema.d.ts +2 -2
- package/lib/types/domain/SpecTypes.d.ts +1 -0
- package/lib/types/index.d.ts +143 -13
- package/lib/types/interfaces/JsonSchemaOptions.d.ts +2 -2
- package/lib/types/utils/concatPath.d.ts +1 -1
- package/lib/types/utils/generateSpec.d.ts +16 -0
- package/lib/types/utils/generics.d.ts +1 -1
- package/lib/types/utils/getJsonSchema.d.ts +12 -2
- package/lib/types/utils/getOperationsRoutes.d.ts +2 -2
- package/lib/types/utils/getSpec.d.ts +5 -4
- package/lib/types/utils/getSpecType.d.ts +12 -0
- package/lib/types/utils/mapNullableType.d.ts +1 -1
- package/lib/types/utils/mapOpenSpec.d.ts +10 -0
- package/lib/types/utils/mapOpenSpec2.d.ts +9 -0
- package/lib/types/utils/mapOpenSpec3.d.ts +8 -0
- package/lib/types/utils/mapOpenSpecInfo.d.ts +6 -0
- package/lib/types/utils/mergeSpec.d.ts +2 -2
- package/lib/types/utils/serializeEnumValues.d.ts +5 -0
- package/lib/types/utils/transformToOS2.d.ts +25 -0
- package/package.json +35 -18
- package/readme.md +4 -2
- package/tsconfig.compile.esm.json +4 -13
- package/benchmark/cold-start.js +0 -17
- package/lib/cjs/components/index.js +0 -15
- package/lib/cjs/components/index.js.map +0 -1
- package/lib/cjs/decorators/index.js +0 -77
- package/lib/cjs/decorators/index.js.map +0 -1
- package/lib/cjs/domain/index.js +0 -20
- package/lib/cjs/domain/index.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -8
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/esm/components/index.js +0 -12
- package/lib/esm/components/index.js.map +0 -1
- package/lib/esm/decorators/index.js +0 -74
- package/lib/esm/decorators/index.js.map +0 -1
- package/lib/esm/domain/index.js +0 -17
- package/lib/esm/domain/index.js.map +0 -1
- package/lib/esm/interfaces/index.js +0 -5
- package/lib/esm/interfaces/index.js.map +0 -1
- package/lib/types/components/index.d.ts +0 -11
- package/lib/types/decorators/index.d.ts +0 -68
- package/lib/types/domain/index.d.ts +0 -16
- package/lib/types/interfaces/index.d.ts +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hooks, Type, ValueOf } from "@tsed/core";
|
|
2
2
|
import type { JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version } from "json-schema";
|
|
3
|
-
import { JsonSchemaOptions } from "../interfaces";
|
|
3
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
4
4
|
import { IgnoreCallback } from "../interfaces/IgnoreCallback";
|
|
5
5
|
import { NestedGenerics } from "../utils/generics";
|
|
6
6
|
import { AliasMap, AliasType } from "./JsonAliasMap";
|
|
@@ -218,7 +218,7 @@ export declare class JsonSchema extends Map<string, any> implements NestedGeneri
|
|
|
218
218
|
*
|
|
219
219
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23
|
|
220
220
|
*/
|
|
221
|
-
enum(enumValues:
|
|
221
|
+
enum(...enumValues: any[]): this;
|
|
222
222
|
/**
|
|
223
223
|
* @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1
|
|
224
224
|
*/
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,20 +1,150 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Automatically generated by barrelsby.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./components/anyMapper";
|
|
5
|
+
export * from "./components/classMapper";
|
|
6
|
+
export * from "./components/genericsMapper";
|
|
7
|
+
export * from "./components/inheritedClassMapper";
|
|
8
|
+
export * from "./components/itemMapper";
|
|
9
|
+
export * from "./components/lazyRefMapper";
|
|
10
|
+
export * from "./components/mapMapper";
|
|
11
|
+
export * from "./components/objectMapper";
|
|
12
|
+
export * from "./components/ofMapper";
|
|
13
|
+
export * from "./components/propertiesMapper";
|
|
14
|
+
export * from "./components/schemaMapper";
|
|
2
15
|
export * from "./constants/httpMethods";
|
|
16
|
+
export * from "./constants/httpStatusMessages";
|
|
17
|
+
export * from "./decorators/class/children";
|
|
18
|
+
export * from "./decorators/collections/collectionContains";
|
|
19
|
+
export * from "./decorators/collections/collectionOf";
|
|
20
|
+
export * from "./decorators/collections/maxItems";
|
|
21
|
+
export * from "./decorators/collections/maxProperties";
|
|
22
|
+
export * from "./decorators/collections/minItems";
|
|
23
|
+
export * from "./decorators/collections/minProperties";
|
|
24
|
+
export * from "./decorators/collections/uniqueItems";
|
|
25
|
+
export * from "./decorators/common/additionalProperties";
|
|
26
|
+
export * from "./decorators/common/allOf";
|
|
27
|
+
export * from "./decorators/common/allow";
|
|
28
|
+
export * from "./decorators/common/any";
|
|
29
|
+
export * from "./decorators/common/anyOf";
|
|
30
|
+
export * from "./decorators/common/const";
|
|
31
|
+
export * from "./decorators/common/customKey";
|
|
32
|
+
export * from "./decorators/common/default";
|
|
33
|
+
export * from "./decorators/common/description";
|
|
34
|
+
export * from "./decorators/common/enum";
|
|
35
|
+
export * from "./decorators/common/example";
|
|
36
|
+
export * from "./decorators/common/examples";
|
|
37
|
+
export * from "./decorators/common/exclusiveMaximum";
|
|
38
|
+
export * from "./decorators/common/exclusiveMinimum";
|
|
39
|
+
export * from "./decorators/common/format";
|
|
40
|
+
export * from "./decorators/common/forwardGroups";
|
|
41
|
+
export * from "./decorators/common/groups";
|
|
42
|
+
export * from "./decorators/common/hidden";
|
|
43
|
+
export * from "./decorators/common/ignore";
|
|
44
|
+
export * from "./decorators/common/integer";
|
|
45
|
+
export * from "./decorators/common/jsonEntityFn";
|
|
46
|
+
export * from "./decorators/common/maxLength";
|
|
47
|
+
export * from "./decorators/common/maximum";
|
|
48
|
+
export * from "./decorators/common/minLength";
|
|
49
|
+
export * from "./decorators/common/minimum";
|
|
50
|
+
export * from "./decorators/common/multipleOf";
|
|
51
|
+
export * from "./decorators/common/name";
|
|
52
|
+
export * from "./decorators/common/nullable";
|
|
53
|
+
export * from "./decorators/common/oneOf";
|
|
54
|
+
export * from "./decorators/common/optional";
|
|
55
|
+
export * from "./decorators/common/pattern";
|
|
56
|
+
export * from "./decorators/common/property";
|
|
57
|
+
export * from "./decorators/common/readOnly";
|
|
58
|
+
export * from "./decorators/common/recordOf";
|
|
59
|
+
export * from "./decorators/common/required";
|
|
60
|
+
export * from "./decorators/common/requiredGroups";
|
|
61
|
+
export * from "./decorators/common/schema";
|
|
62
|
+
export * from "./decorators/common/title";
|
|
63
|
+
export * from "./decorators/common/writeOnly";
|
|
64
|
+
export * from "./decorators/config/jsonEntityComponent";
|
|
65
|
+
export * from "./decorators/generics/genericOf";
|
|
66
|
+
export * from "./decorators/generics/generics";
|
|
67
|
+
export * from "./decorators/operations/acceptMime";
|
|
68
|
+
export * from "./decorators/operations/consumes";
|
|
69
|
+
export * from "./decorators/operations/contentType";
|
|
70
|
+
export * from "./decorators/operations/deprecated";
|
|
71
|
+
export * from "./decorators/operations/header";
|
|
72
|
+
export * from "./decorators/operations/in";
|
|
73
|
+
export * from "./decorators/operations/inFile";
|
|
74
|
+
export * from "./decorators/operations/location";
|
|
75
|
+
export * from "./decorators/operations/operationId";
|
|
76
|
+
export * from "./decorators/operations/operationPath";
|
|
77
|
+
export * from "./decorators/operations/partial";
|
|
78
|
+
export * from "./decorators/operations/path";
|
|
79
|
+
export * from "./decorators/operations/produces";
|
|
80
|
+
export * from "./decorators/operations/redirect";
|
|
81
|
+
export * from "./decorators/operations/returns";
|
|
82
|
+
export * from "./decorators/operations/route";
|
|
83
|
+
export * from "./decorators/operations/security";
|
|
84
|
+
export * from "./decorators/operations/status";
|
|
85
|
+
export * from "./decorators/operations/summary";
|
|
86
|
+
export * from "./decorators/operations/tags";
|
|
87
|
+
export * from "./decorators/operations/view";
|
|
88
|
+
export * from "./domain/DecoratorContext";
|
|
89
|
+
export * from "./domain/JsonAliasMap";
|
|
90
|
+
export * from "./domain/JsonClassStore";
|
|
91
|
+
export * from "./domain/JsonEntityStore";
|
|
92
|
+
export * from "./domain/JsonFormatTypes";
|
|
93
|
+
export * from "./domain/JsonLazyRef";
|
|
94
|
+
export * from "./domain/JsonMap";
|
|
95
|
+
export * from "./domain/JsonMethodStore";
|
|
96
|
+
export * from "./domain/JsonOperation";
|
|
97
|
+
export * from "./domain/JsonOperationPathsMap";
|
|
98
|
+
export * from "./domain/JsonOperationRoute";
|
|
99
|
+
export * from "./domain/JsonParameter";
|
|
100
|
+
export * from "./domain/JsonParameterStore";
|
|
101
|
+
export * from "./domain/JsonParameterTypes";
|
|
102
|
+
export * from "./domain/JsonPropertyStore";
|
|
103
|
+
export * from "./domain/JsonRequestBody";
|
|
104
|
+
export * from "./domain/JsonResponse";
|
|
105
|
+
export * from "./domain/JsonSchema";
|
|
106
|
+
export * from "./domain/SpecTypes";
|
|
107
|
+
export * from "./hooks/alterIgnore";
|
|
108
|
+
export * from "./hooks/alterOneOf";
|
|
109
|
+
export * from "./hooks/alterRequiredGroups";
|
|
110
|
+
export * from "./interfaces/IgnoreCallback";
|
|
111
|
+
export * from "./interfaces/JsonHookContext";
|
|
112
|
+
export * from "./interfaces/JsonOpenSpec";
|
|
113
|
+
export * from "./interfaces/JsonSchemaOptions";
|
|
114
|
+
export * from "./registries/JsonSchemaMapperContainer";
|
|
115
|
+
export * from "./utils/buildPath";
|
|
116
|
+
export * from "./utils/concatParameters";
|
|
117
|
+
export * from "./utils/concatPath";
|
|
118
|
+
export * from "./utils/defineStatusModel";
|
|
119
|
+
export * from "./utils/from";
|
|
120
|
+
export * from "./utils/generateSpec";
|
|
121
|
+
export * from "./utils/generics";
|
|
122
|
+
export * from "./utils/getComputedType";
|
|
123
|
+
export * from "./utils/getInheritedStores";
|
|
124
|
+
export * from "./utils/getJsonEntityStore";
|
|
125
|
+
export * from "./utils/getJsonPathParameters";
|
|
3
126
|
export * from "./utils/getJsonSchema";
|
|
4
127
|
export * from "./utils/getJsonType";
|
|
5
|
-
export * from "./utils/getPropertiesStores";
|
|
6
|
-
export * from "./utils/getOperationsStores";
|
|
7
128
|
export * from "./utils/getOperationsRoutes";
|
|
129
|
+
export * from "./utils/getOperationsStores";
|
|
130
|
+
export * from "./utils/getPropertiesStores";
|
|
131
|
+
export * from "./utils/getRequiredProperties";
|
|
8
132
|
export * from "./utils/getSpec";
|
|
9
|
-
export * from "./utils/
|
|
10
|
-
export * from "./utils/
|
|
133
|
+
export * from "./utils/getSpecType";
|
|
134
|
+
export * from "./utils/isSuccessStatus";
|
|
11
135
|
export * from "./utils/mapHeaders";
|
|
136
|
+
export * from "./utils/mapNullableType";
|
|
137
|
+
export * from "./utils/mapOpenSpec";
|
|
138
|
+
export * from "./utils/mapOpenSpec2";
|
|
139
|
+
export * from "./utils/mapOpenSpec3";
|
|
140
|
+
export * from "./utils/mapOpenSpecInfo";
|
|
141
|
+
export * from "./utils/mapRouteOptions";
|
|
12
142
|
export * from "./utils/matchGroups";
|
|
13
|
-
export * from "./utils/
|
|
14
|
-
export * from "./utils/
|
|
15
|
-
export * from "./utils/
|
|
16
|
-
export * from "./utils/
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
143
|
+
export * from "./utils/mergeOperation";
|
|
144
|
+
export * from "./utils/mergeSpec";
|
|
145
|
+
export * from "./utils/operationIdFormatter";
|
|
146
|
+
export * from "./utils/ref";
|
|
147
|
+
export * from "./utils/serializeEnumValues";
|
|
148
|
+
export * from "./utils/toJsonMapCollection";
|
|
149
|
+
export * from "./utils/toJsonRegex";
|
|
150
|
+
export * from "./utils/transformToOS2";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenSpecHash, OS3Schema } from "@tsed/openspec";
|
|
1
|
+
import { OpenSpecHash, OS2Schema, OS3Schema } from "@tsed/openspec";
|
|
2
2
|
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
3
|
export interface JsonSchemaOptions {
|
|
4
4
|
/**
|
|
@@ -8,7 +8,7 @@ export interface JsonSchemaOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* Reference to Schema Object.
|
|
10
10
|
*/
|
|
11
|
-
schemas?: OpenSpecHash<OS3Schema>;
|
|
11
|
+
schemas?: OpenSpecHash<OS3Schema | OS2Schema>;
|
|
12
12
|
/**
|
|
13
13
|
* Define Spec types level
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function concatPath(basePath: string | undefined, path: string | undefined):
|
|
1
|
+
export declare function concatPath(basePath: string | undefined | RegExp, path: string | undefined | RegExp): any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
|
|
2
|
+
import { JsonTokenOptions, SpecSerializerOptions } from "./getSpec";
|
|
3
|
+
export interface GenerateSpecOptions extends Omit<SpecSerializerOptions, "specType"> {
|
|
4
|
+
tokens: JsonTokenOptions;
|
|
5
|
+
version?: string;
|
|
6
|
+
acceptMimes?: string;
|
|
7
|
+
specPath?: string;
|
|
8
|
+
specVersion?: string;
|
|
9
|
+
spec?: any;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generate OpenAPI spec from multiple sources (models, files, conf)
|
|
13
|
+
* @param tokens
|
|
14
|
+
* @param options
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateSpec({ tokens, ...options }: GenerateSpecOptions): Promise<OpenSpec2 | OpenSpec3>;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
-
import "../components";
|
|
3
|
-
import
|
|
2
|
+
import "../components/anyMapper";
|
|
3
|
+
import "../components/classMapper";
|
|
4
|
+
import "../components/genericsMapper";
|
|
5
|
+
import "../components/inheritedClassMapper";
|
|
6
|
+
import "../components/itemMapper";
|
|
7
|
+
import "../components/lazyRefMapper";
|
|
8
|
+
import "../components/mapMapper";
|
|
9
|
+
import "../components/objectMapper";
|
|
10
|
+
import "../components/ofMapper";
|
|
11
|
+
import "../components/propertiesMapper";
|
|
12
|
+
import "../components/schemaMapper";
|
|
13
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
4
14
|
export declare function getJsonSchema(model: Type<any> | any, options?: JsonSchemaOptions): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
|
+
import { JsonMethodStore } from "../domain/JsonMethodStore";
|
|
2
3
|
import { JsonOperationRoute } from "../domain/JsonOperationRoute";
|
|
3
|
-
import { JsonEntityStore } from "../domain/JsonEntityStore";
|
|
4
4
|
export interface GetOperationsRoutesOptions {
|
|
5
5
|
withChildren?: boolean;
|
|
6
6
|
basePath?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare function getOperationsRoutes<Entity extends
|
|
8
|
+
export declare function getOperationsRoutes<Entity extends JsonMethodStore = JsonMethodStore>(token: Type<any> | any, options?: GetOperationsRoutesOptions): JsonOperationRoute<Entity>[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Type } from "@tsed/core";
|
|
2
2
|
import { OpenSpec3 } from "@tsed/openspec";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
4
|
+
export declare type JsonTokenOptions = ({
|
|
5
|
+
token: Type<any>;
|
|
6
|
+
} & Partial<SpecSerializerOptions>)[];
|
|
5
7
|
export interface SpecSerializerOptions extends JsonSchemaOptions {
|
|
6
|
-
specType?: SpecTypes.OPENAPI;
|
|
7
8
|
/**
|
|
8
9
|
* Paths
|
|
9
10
|
*/
|
|
@@ -26,4 +27,4 @@ export interface SpecSerializerOptions extends JsonSchemaOptions {
|
|
|
26
27
|
* @param model
|
|
27
28
|
* @param options
|
|
28
29
|
*/
|
|
29
|
-
export declare function getSpec(model: Type<any
|
|
30
|
+
export declare function getSpec(model: Type<any> | JsonTokenOptions, options?: SpecSerializerOptions): Partial<OpenSpec3>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
|
|
2
|
+
import { SpecTypes } from "../domain/SpecTypes";
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
* @param version
|
|
6
|
+
*/
|
|
7
|
+
export declare function getSpecType(version: string): SpecTypes.SWAGGER | SpecTypes.OPENAPI;
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
* @param spec
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSpecTypeFromSpec(spec: Partial<OpenSpec2 | OpenSpec3>): SpecTypes.SWAGGER | SpecTypes.OPENAPI;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JsonSchema } from "../domain/JsonSchema";
|
|
2
2
|
import type { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
|
|
3
|
-
export declare function mapNullableType(obj: any, schema: JsonSchema, options: JsonSchemaOptions): any;
|
|
3
|
+
export declare function mapNullableType(obj: any, schema: JsonSchema | null, options: JsonSchemaOptions): any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
* @param spec
|
|
5
|
+
* @param fileSpec
|
|
6
|
+
* @param version
|
|
7
|
+
* @param acceptMimes
|
|
8
|
+
* @param specVersion
|
|
9
|
+
*/
|
|
10
|
+
export declare function mapOpenSpec(spec: any, { fileSpec, acceptMimes, specVersion, version }: any): Partial<OpenSpec2 | OpenSpec3>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OpenSpec2 } from "@tsed/openspec";
|
|
2
|
+
/**
|
|
3
|
+
* @ignore
|
|
4
|
+
* @param spec
|
|
5
|
+
* @param version
|
|
6
|
+
* @param specVersion
|
|
7
|
+
* @param acceptMimes
|
|
8
|
+
*/
|
|
9
|
+
export declare function mapOpenSpec2(spec: Partial<OpenSpec2>, { version, specVersion, acceptMimes }: any): Partial<OpenSpec2>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenSpec3 } from "@tsed/openspec";
|
|
1
|
+
import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
|
|
2
2
|
/**
|
|
3
3
|
* @ignore
|
|
4
4
|
*/
|
|
@@ -20,4 +20,4 @@ export declare const tagsReducer: (collection: any[], value: any, options: impor
|
|
|
20
20
|
* @param spec
|
|
21
21
|
* @param input
|
|
22
22
|
*/
|
|
23
|
-
export declare function mergeSpec<Spec = OpenSpec3>(spec: Partial<Spec>, input: Partial<Spec>): Partial<Spec>;
|
|
23
|
+
export declare function mergeSpec<Spec = OpenSpec2 | OpenSpec3>(spec: Partial<Spec>, input: Partial<Spec>): Partial<Spec>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OpenSpec2, OpenSpec3, OS3Operation } from "@tsed/openspec";
|
|
2
|
+
export declare function transformSecurity(securitySchemes: any): {};
|
|
3
|
+
export declare function transformInformation(server: any): {
|
|
4
|
+
host: string | undefined;
|
|
5
|
+
basePath: string;
|
|
6
|
+
schemes: string[] | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare class Converter {
|
|
9
|
+
private spec;
|
|
10
|
+
constructor(spec: Partial<OpenSpec3>);
|
|
11
|
+
convertInfos(): {};
|
|
12
|
+
resolveReference(base: any, obj: any, shouldClone: boolean): any;
|
|
13
|
+
convert(): any;
|
|
14
|
+
convertOperations(paths: any, spec: any): any;
|
|
15
|
+
convertOperationParameters(operation: OS3Operation): void;
|
|
16
|
+
convertParameters(obj: any): void;
|
|
17
|
+
copySchemaProperties(obj: any, props: any[]): void;
|
|
18
|
+
copySchemaXProperties(obj: Record<string, any>): void;
|
|
19
|
+
convertResponses(operation: Record<string, any>): void;
|
|
20
|
+
convertSchema(def: any, operationDirection?: any): void;
|
|
21
|
+
convertSchemas(): void;
|
|
22
|
+
convertDiscriminatorMapping(mapping: any): void;
|
|
23
|
+
convertSecurityDefinitions(): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function transformToOS2(spec: any): Partial<OpenSpec2>;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/schema",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.20",
|
|
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",
|
|
@@ -13,10 +14,12 @@
|
|
|
13
14
|
"default": "./lib/esm/index.js"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
+
"clean": "rm -rf lib",
|
|
18
|
+
"build": "yarn clean && yarn barrels && yarn run build:esm && yarn run build:cjs",
|
|
17
19
|
"build:cjs": "tsc --build tsconfig.compile.json",
|
|
18
20
|
"build:esm": "tsc --build tsconfig.compile.esm.json",
|
|
19
|
-
"
|
|
21
|
+
"barrels": "yarn barrelsby --delete -d ./src -e \"\\.spec\\.ts\" -e \"__mock__\" -e \".benchmark.ts\"",
|
|
22
|
+
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2"
|
|
20
23
|
},
|
|
21
24
|
"keywords": [
|
|
22
25
|
"TypeScript",
|
|
@@ -29,30 +32,44 @@
|
|
|
29
32
|
"tsed"
|
|
30
33
|
],
|
|
31
34
|
"dependencies": {
|
|
32
|
-
"@tsed/
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
+
"@tsed/openspec": "7.0.0-beta.20",
|
|
36
|
+
"change-case": "^4.1.2",
|
|
37
|
+
"fs-extra": "^10.0.1",
|
|
35
38
|
"json-schema": "0.4.0",
|
|
36
|
-
"micromatch": "4.0.
|
|
37
|
-
"
|
|
38
|
-
"tslib": "2.
|
|
39
|
+
"micromatch": "4.0.5",
|
|
40
|
+
"statuses": ">=2.0.1",
|
|
41
|
+
"tslib": "2.4.0"
|
|
39
42
|
},
|
|
40
43
|
"devDependencies": {
|
|
41
|
-
"@apidevtools/swagger-parser": "10.0.
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@types/
|
|
45
|
-
"
|
|
44
|
+
"@apidevtools/swagger-parser": "10.0.3",
|
|
45
|
+
"@tsed/core": "7.0.0-beta.20",
|
|
46
|
+
"@tsed/openspec": "7.0.0-beta.20",
|
|
47
|
+
"@types/fs-extra": "9.0.13",
|
|
48
|
+
"@types/json-schema": "7.0.11",
|
|
49
|
+
"@types/micromatch": "4.0.2",
|
|
50
|
+
"@types/statuses": "2.0.0",
|
|
51
|
+
"api-spec-converter": "2.12.0"
|
|
46
52
|
},
|
|
47
53
|
"peerDependencies": {
|
|
48
|
-
"@tsed/core": "^7.0.0-beta.
|
|
49
|
-
"@tsed/openspec": "^7.0.0-beta.
|
|
54
|
+
"@tsed/core": "^7.0.0-beta.20",
|
|
55
|
+
"@tsed/openspec": "^7.0.0-beta.20"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"@tsed/openspec": {
|
|
59
|
+
"optional": false
|
|
60
|
+
},
|
|
61
|
+
"@tsed/core": {
|
|
62
|
+
"optional": false
|
|
63
|
+
}
|
|
50
64
|
},
|
|
51
65
|
"repository": "https://github.com/tsedio/tsed",
|
|
52
66
|
"bugs": {
|
|
53
67
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
54
68
|
},
|
|
55
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
69
|
+
"homepage": "https://github.com/tsedio/tsed/tree/beta/packages/specs/schema",
|
|
56
70
|
"author": "Romain Lenzotti",
|
|
57
|
-
"license": "MIT"
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"tag": "beta"
|
|
74
|
+
}
|
|
58
75
|
}
|
package/readme.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
12
12
|
[](https://github.com/semantic-release/semantic-release)
|
|
13
13
|
[](https://github.com/prettier/prettier)
|
|
14
|
-
[](https://github.com/sponsors/romakita)
|
|
15
|
+
[](https://opencollective.com/tsed)
|
|
15
16
|
|
|
16
17
|
</div>
|
|
17
18
|
|
|
@@ -44,6 +45,7 @@ npm install --save @tsed/schema
|
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
## Contributors
|
|
48
|
+
|
|
47
49
|
Please read [contributing guidelines here](https://tsed.io/CONTRIBUTING.html)
|
|
48
50
|
|
|
49
51
|
<a href="https://github.com/tsedio/ts-express-decorators/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
|
|
@@ -62,7 +64,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|
|
62
64
|
|
|
63
65
|
The MIT License (MIT)
|
|
64
66
|
|
|
65
|
-
Copyright (c) 2016 -
|
|
67
|
+
Copyright (c) 2016 - 2022 Romain Lenzotti
|
|
66
68
|
|
|
67
69
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
68
70
|
|
|
@@ -2,22 +2,13 @@
|
|
|
2
2
|
"extends": "./tsconfig.compile.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": ".",
|
|
5
|
-
"
|
|
5
|
+
"target": "esnext",
|
|
6
|
+
"module": "esnext",
|
|
6
7
|
"rootDir": "src",
|
|
7
8
|
"outDir": "./lib/esm",
|
|
8
9
|
"declaration": true,
|
|
9
10
|
"declarationDir": "./lib/types"
|
|
10
11
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"test",
|
|
14
|
-
"lib",
|
|
15
|
-
"benchmark",
|
|
16
|
-
"coverage",
|
|
17
|
-
"spec",
|
|
18
|
-
"**/*.benchmark.ts",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"keys",
|
|
21
|
-
"jest.config.js"
|
|
22
|
-
]
|
|
12
|
+
"include": ["src"],
|
|
13
|
+
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "jest.config.js"]
|
|
23
14
|
}
|
package/benchmark/cold-start.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
function printMemory(event) {
|
|
2
|
-
const used = process.memoryUsage();
|
|
3
|
-
const obj = {event};
|
|
4
|
-
|
|
5
|
-
for (let key in used) {
|
|
6
|
-
// console.log(`${key} ${} MB`);
|
|
7
|
-
obj[key] = Math.round((used[key] / 1024 / 1024) * 100) / 100;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
obj.timestamp = Date.now();
|
|
11
|
-
|
|
12
|
-
console.log(JSON.stringify(obj));
|
|
13
|
-
}
|
|
14
|
-
console.time("benchmark");
|
|
15
|
-
require("@tsed/schema");
|
|
16
|
-
console.timeEnd("benchmark");
|
|
17
|
-
printMemory();
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
(0, tslib_1.__exportStar)(require("./anyMapper"), exports);
|
|
5
|
-
(0, tslib_1.__exportStar)(require("./classMapper"), exports);
|
|
6
|
-
(0, tslib_1.__exportStar)(require("./genericsMapper"), exports);
|
|
7
|
-
(0, tslib_1.__exportStar)(require("./inheritedClassMapper"), exports);
|
|
8
|
-
(0, tslib_1.__exportStar)(require("./itemMapper"), exports);
|
|
9
|
-
(0, tslib_1.__exportStar)(require("./lazyRefMapper"), exports);
|
|
10
|
-
(0, tslib_1.__exportStar)(require("./mapMapper"), exports);
|
|
11
|
-
(0, tslib_1.__exportStar)(require("./objectMapper"), exports);
|
|
12
|
-
(0, tslib_1.__exportStar)(require("./schemaMapper"), exports);
|
|
13
|
-
(0, tslib_1.__exportStar)(require("./ofMapper"), exports);
|
|
14
|
-
(0, tslib_1.__exportStar)(require("./propertiesMapper"), exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,2DAA4B;AAC5B,6DAA8B;AAC9B,gEAAiC;AACjC,sEAAuC;AACvC,4DAA6B;AAC7B,+DAAgC;AAChC,2DAA4B;AAC5B,8DAA+B;AAC/B,8DAA+B;AAC/B,0DAA2B;AAC3B,kEAAmC","sourcesContent":["export * from \"./anyMapper\";\nexport * from \"./classMapper\";\nexport * from \"./genericsMapper\";\nexport * from \"./inheritedClassMapper\";\nexport * from \"./itemMapper\";\nexport * from \"./lazyRefMapper\";\nexport * from \"./mapMapper\";\nexport * from \"./objectMapper\";\nexport * from \"./schemaMapper\";\nexport * from \"./ofMapper\";\nexport * from \"./propertiesMapper\";\n"]}
|