Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade typia version to enhance swagger. #604

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/core": "^1.6.5",
"typia": "^4.2.3"
"@nestia/core": "^2.0.2",
"typia": "^5.0.3"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
Expand All @@ -47,6 +47,6 @@
"ts-node": "^10.9.1",
"ts-patch": "^3.0.2",
"tstl": "^2.5.13",
"typescript": "^5.1.6"
"typescript": "^5.2.2"
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"homepage": "https://github.com/samchon/nestia#readme",
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"prettier": "^2.8.8"
"prettier": "^2.8.8",
"rimraf": "^5.0.1"
}
}
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "2.0.1",
"version": "2.0.2",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.0.1",
"@nestia/fetcher": "^2.0.2",
"@nestjs/common": ">= 7.0.1",
"@nestjs/core": ">= 7.0.1",
"@nestjs/platform-express": ">= 7.0.1",
Expand All @@ -44,10 +44,10 @@
"raw-body": ">= 2.0.0",
"reflect-metadata": ">= 0.1.12",
"rxjs": ">= 6.0.0",
"typia": "^5.0.2"
"typia": "^5.0.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.0.1",
"@nestia/fetcher": ">=2.0.2",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"@nestjs/platform-express": ">=7.0.1",
Expand All @@ -56,7 +56,7 @@
"reflect-metadata": ">=0.1.12",
"rxjs": ">=6.0.0",
"typescript": ">=4.8.0",
"typia": ">=5.0.2 <6.0.0"
"typia": ">=5.0.3 <6.0.0"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ts-node": "^10.9.1",
"ts-patch": "^3.0.2",
"typescript": "^5.2.2",
"typia": "^5.0.2"
"typia": "^5.0.3"
},
"dependencies": {
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/fetcher",
"version": "2.0.1",
"version": "2.0.2",
"description": "Fetcher library of Nestia SDK",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"homepage": "https://github.com/samchon/nestia#readme",
"devDependencies": {
"@nestia/core": "^2.0.1",
"@nestia/fetcher": "^2.0.1",
"@nestia/core": "^2.0.2",
"@nestia/fetcher": "^2.0.2",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^20.3.3",
"prettier": "^2.8.8",
Expand All @@ -45,7 +45,7 @@
"typescript-transform-paths": "^3.4.6"
},
"dependencies": {
"typia": "^5.0.2"
"typia": "^5.0.3"
},
"files": [
"lib",
Expand Down
10 changes: 5 additions & 5 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "2.0.1",
"version": "2.0.2",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.0.1",
"@nestia/fetcher": "^2.0.2",
"cli": "^1.0.1",
"glob": "^7.2.0",
"path-to-regexp": "^6.2.1",
Expand All @@ -44,16 +44,16 @@
"tsconfck": "^2.0.1",
"tsconfig-paths": "^4.1.1",
"tstl": "^2.5.13",
"typia": "^5.0.2"
"typia": "^5.0.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.0.1",
"@nestia/fetcher": ">=2.0.2",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
"ts-node": ">=10.6.0",
"typescript": ">=4.8.0",
"typia": ">=5.0.2 <6.0.0"
"typia": ">=5.0.3 <6.0.0"
},
"devDependencies": {
"@nestjs/common": ">= 7.0.1",
Expand Down
104 changes: 99 additions & 5 deletions test/features/all/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,25 @@
"x-typia-optional": false,
"type": "string",
"maxLength": 50,
"minLength": 3
"minLength": 3,
"x-typia-typeTags": [
{
"name": "MinLength<3>",
"target": "string",
"kind": "minLength",
"value": 3,
"validate": "3 <= $input.length",
"exclusive": true
},
{
"name": "MaxLength<50>",
"target": "string",
"kind": "maxLength",
"value": 50,
"validate": "$input.length <= 50",
"exclusive": true
}
]
},
"body": {
"x-typia-required": true,
Expand Down Expand Up @@ -233,6 +251,16 @@
"x-typia-optional": false,
"type": "string",
"maxLength": 255,
"x-typia-typeTags": [
{
"name": "MaxLength<255>",
"target": "string",
"kind": "maxLength",
"value": 255,
"validate": "$input.length <= 255",
"exclusive": true
}
],
"nullable": true
},
"extension": {
Expand Down Expand Up @@ -261,6 +289,24 @@
"type": "string",
"maxLength": 8,
"minLength": 1,
"x-typia-typeTags": [
{
"name": "MinLength<1>",
"target": "string",
"kind": "minLength",
"value": 1,
"validate": "1 <= $input.length",
"exclusive": true
},
{
"name": "MaxLength<8>",
"target": "string",
"kind": "maxLength",
"value": 8,
"validate": "$input.length <= 8",
"exclusive": true
}
],
"nullable": true
},
"url": {
Expand All @@ -278,7 +324,17 @@
"x-typia-required": true,
"x-typia-optional": false,
"type": "string",
"format": "url"
"format": "url",
"x-typia-typeTags": [
{
"name": "Format<url>",
"target": "string",
"kind": "format",
"value": "url",
"validate": "/^[a-zA-Z0-9]+:\\/\\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test($input)",
"exclusive": true
}
]
}
},
"nullable": false,
Expand Down Expand Up @@ -307,7 +363,17 @@
"x-typia-required": true,
"x-typia-optional": false,
"type": "string",
"format": "uuid"
"format": "uuid",
"x-typia-typeTags": [
{
"name": "Format<uuid>",
"target": "string",
"kind": "format",
"value": "uuid",
"validate": "/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i.test($input)",
"exclusive": true
}
]
},
"created_at": {
"x-typia-jsDocTags": [
Expand All @@ -324,7 +390,17 @@
"x-typia-required": true,
"x-typia-optional": false,
"type": "string",
"format": "date-time"
"format": "date-time",
"x-typia-typeTags": [
{
"name": "Format<date-time>",
"target": "string",
"kind": "format",
"value": "date-time",
"validate": "!isNaN(new Date($input).getTime())",
"exclusive": true
}
]
},
"title": {
"x-typia-jsDocTags": [
Expand All @@ -351,7 +427,25 @@
"x-typia-optional": false,
"type": "string",
"maxLength": 50,
"minLength": 3
"minLength": 3,
"x-typia-typeTags": [
{
"name": "MinLength<3>",
"target": "string",
"kind": "minLength",
"value": 3,
"validate": "3 <= $input.length",
"exclusive": true
},
{
"name": "MaxLength<50>",
"target": "string",
"kind": "maxLength",
"value": 50,
"validate": "$input.length <= 50",
"exclusive": true
}
]
},
"body": {
"x-typia-required": true,
Expand Down
Loading